/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
/** * Turns read-only mode on or off. * * @param readOnly if <code>true</code>, the widget becomes read-only; if * <code>false</code> the widget becomes editable */ public void setReadOnly(boolean readOnly) { getElement().setPropertyBoolean("readOnly", readOnly); String readOnlyStyle = "readonly"; if (readOnly) { addStyleDependentName(readOnlyStyle); } else { removeStyleDependentName(readOnlyStyle); } }
/** * Disables the element. * * @return this */ public El disable() { dom.setPropertyBoolean("disabled", true); return this; }
/** * Enables the element. * * @return this */ public El enable() { dom.setPropertyBoolean("disabled", false); return this; }
/** * Sets whether this widget is enabled. * * @param enabled * <code>true</code> to enable the widget, <code>false</code> to * disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
public void setMultiple(boolean multiple) { if (multiple) { upload.getElement().setPropertyBoolean("multiple", true); } }
/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
/** * Sets whether this widget is enabled. * * @param enabled <code>true</code> to enable the widget, <code>false</code> * to disable it */ public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); }
public void setEnabled(boolean enabled) { getElement().setPropertyBoolean("disabled", !enabled); } }
public void setMultiple(boolean multiple) { if (multiple) { upload.getElement().setPropertyBoolean("multiple", true); } }
@Override public void setEnabled(final boolean enabled) { getElement().setPropertyBoolean(DISABLED, !enabled); }
/*************************************** * @see HasEnabled#setEnabled(boolean) */ @Override public void setEnabled(boolean bEnabled) { getElement().setPropertyBoolean("disabled", !bEnabled); setResource(bEnabled ? rDefaultImage : rDisabledImage); }
@Override public void setValue(final T value) { final String inputType = getElement().getPropertyString("type"); final Class<?> valueType = getValueClassForInputType(inputType); if (Boolean.class.equals(valueType)) { getElement().setPropertyBoolean("checked", (Boolean) value); } else if (String.class.equals(valueType)) { getElement().setPropertyObject("value", value != null ? value : ""); } else { throw new IllegalArgumentException("Cannot set value " + value + " to element input[type=\"" + inputType + "\"]."); } }
/** * Sets the field's read only state. * * @param readOnly the read only state */ public void setReadOnly(boolean readOnly) { this.readOnly = readOnly; if (rendered) { el().setStyleName(readOnlyFieldStyle, readOnly); getInputEl().dom.setPropertyBoolean("readOnly", readOnly); } }
Element window = ScriptInjector.TOP_WINDOW.cast(); window.setPropertyJSO("key_jso", JsArray.createArray()); JavaScriptObject jso = window.getPropertyJSO("key_jso") window.setPropertyBoolean("key_boolean", true); boolean b = window.getPropertyBoolean("key_boolean") // and the same with: // setPropertyDouble, getPropertyDouble // setPropertyInt, getPropertyInt // setPropertyString, getPropertyString // setPropertyObject, getPropertyObject
@Override public void setReadOnly(boolean readOnly) { this.readOnly = readOnly; if (rendered) { el().setStyleName(readOnlyFieldStyle, readOnly); if (editable || (readOnly && !editable)) { getInputEl().dom.setPropertyBoolean("readOnly", readOnly); } } }
@Override public void setValue(final T value) { final String inputType = getElement().getPropertyString("type"); final Class<?> valueType = getValueClassForInputType(inputType); if (Boolean.class.equals(valueType)) { getElement().setPropertyBoolean("checked", (Boolean) value); } else if (String.class.equals(valueType)) { getElement().setPropertyObject("value", value != null ? value : ""); } else { throw new IllegalArgumentException("Cannot set value " + value + " to element input[type=\"" + inputType + "\"]."); } }