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

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

Introduction

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

Prototype

public boolean isDisabled() 

Source Link

Document

The control is unavailable in this context.

Usage

From source file:ch.unifr.pai.twice.multipointer.client.widgets.MultiFocusTextBox.java

License:Apache License

public void replaceTextInput(InputElement el) {
    if (!el.isDisabled() && !el.getAttribute("multifocus").equals("true")) {
        replacedElement = el;//from  w ww .  j  a  va2s .c  om
        RootPanel.get().add(this);
        setValue(el.getValue());
        currentWidth = el.getOffsetWidth();
        currentHeight = el.getOffsetHeight();
        this.getElement().getStyle().setPosition(Position.RELATIVE);
        this.getElement().getStyle().setPadding(0, Unit.PX);
        this.getElement().setId(el.getId());
        refreshDisplay();
    }
}

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:org.gwtbootstrap3.client.ui.InputToggleButtonGwt.java

License:Apache License

@Override
public <T extends UIObject & HasEnabled> void checkEnabled(T button) {
    final Element label = button.getElement();
    final InputElement input = InputElement.as(label.getFirstChildElement());
    assertFalse(label.hasClassName(Styles.DISABLED));
    assertFalse(label.hasAttribute(Styles.DISABLED));
    assertFalse(input.isDisabled());
    button.setEnabled(false);//from ww  w.  j a v a2 s  .  c  om
    assertTrue(label.hasClassName(Styles.DISABLED));
    assertFalse(label.hasAttribute(Styles.DISABLED));
    assertTrue(input.isDisabled());
    button.setEnabled(true);
    assertFalse(label.hasClassName(Styles.DISABLED));
    assertFalse(label.hasAttribute(Styles.DISABLED));
    assertFalse(input.isDisabled());
}