List of usage examples for com.google.gwt.dom.client InputElement setAccessKey
public void setAccessKey(String accessKey)
From source file:com.cgxlib.xq.client.plugins.widgets.TextBoxBaseWidgetFactory.java
License:Apache License
protected void copyAttributes(Element src, Element dest) { InputElement source = src.cast();//from w w w. j a va 2s . c o m InputElement destination = dest.cast(); destination.setAccessKey(source.getAccessKey()); destination.setDefaultValue(source.getDefaultValue()); destination.setDisabled(source.isDisabled()); if (source.getMaxLength() > 0) destination.setMaxLength(source.getMaxLength()); destination.setReadOnly(source.isReadOnly()); destination.setSize(source.getSize()); destination.setName(source.getName()); destination.setValue(source.getValue()); }
From source file:gwtquery.plugins.enhance.client.gwt.CheckBoxWidgetFactory.java
License:Apache License
protected void copyAttributes(InputElement source, InputElement destination) { destination.setAccessKey(source.getAccessKey()); destination.setDisabled(source.isDisabled()); destination.setSize(source.getSize()); destination.setName(source.getName()); destination.setValue(source.getValue()); }
From source file:gwtquery.plugins.enhance.client.gwt.RadioButtonWidgetFactory.java
License:Apache License
protected void copyAttributes(InputElement source, InputElement destination) { destination.setAccessKey(source.getAccessKey()); destination.setDisabled(source.isDisabled()); destination.setSize(source.getSize()); destination.setValue(source.getValue()); }
From source file:gwtquery.plugins.enhance.client.gwt.TextBoxBaseWidgetFactory.java
License:Apache License
protected void copyAttributes(Element src, Element dest) { InputElement source = src.cast();/*from ww w .java 2 s. com*/ InputElement destination = dest.cast(); destination.setAccessKey(source.getAccessKey()); destination.setDefaultValue(source.getDefaultValue()); destination.setDisabled(source.isDisabled()); if (source.getMaxLength() > 0) destination.setMaxLength(source.getMaxLength()); destination.setReadOnly(source.isReadOnly()); destination.setSize(source.getSize()); destination.setName(source.getName()); destination.setValue(source.getValue()); }
From source file:rocket.widget.client.RadioButton.java
License:Apache License
/** * Replace the current input element with a new one. * /*w ww.j a v a2 s . c o m*/ * @param newElement * the new input element */ protected void replaceInputElement(final Element newElement) { // Collect information we need to set final InputElement oldInputElement = this.getElement().cast(); int tabIndex = getTabIndex(); boolean checked = isChecked(); boolean enabled = isEnabled(); String uid = oldInputElement.getId(); String accessKey = oldInputElement.getAccessKey(); // Clear out the old input element setChecked(false); oldInputElement.setId(""); oldInputElement.setAccessKey(""); // Quickly do the actual replace final Element parent = oldInputElement.getParentElement().cast(); final int index = DOM.getChildIndex(parent, (Element) oldInputElement.cast()); parent.removeChild(oldInputElement); DOM.insertChild(parent, (Element) newElement.cast(), index); this.invokeReplaceElement(newElement); // Setup the new element DOM.sinkEvents((Element) oldInputElement.cast(), DOM.getEventsSunk(this.getElement())); DOM.setEventListener((Element) oldInputElement.cast(), this); oldInputElement.setId(uid); if (accessKey != "") { oldInputElement.setAccessKey(accessKey); } setTabIndex(tabIndex); setChecked(checked); setEnabled(enabled); }