Example usage for com.google.gwt.dom.client InputElement getAccessKey

List of usage examples for com.google.gwt.dom.client InputElement getAccessKey

Introduction

In this page you can find the example usage for com.google.gwt.dom.client InputElement getAccessKey.

Prototype

public String getAccessKey() 

Source Link

Document

A single character access key to give access to the form control.

Usage

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();
    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();
    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  w  w .j  av  a 2 s.co 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);
}