List of usage examples for com.google.gwt.user.client DOM setElementPropertyBoolean
@Deprecated public static void setElementPropertyBoolean(Element elem, String prop, boolean value)
From source file:com.alkacon.geranium.client.ui.input.A_SelectBox.java
License:Open Source License
/** * @see com.alkacon.geranium.client.ui.input.I_FormWidget#setEnabled(boolean) *///from w ww.j a va 2 s .c om public void setEnabled(boolean enabled) { close(); m_enabled = enabled; DOM.setElementPropertyBoolean(getElement(), "disabled", !enabled); m_openClose.setEnabled(enabled); if (enabled) { removeStyleName(CSS.selectBoxDisabled()); } else { addStyleName(CSS.selectBoxDisabled()); } }
From source file:com.alkacon.geranium.client.ui.MenuButton.java
License:Open Source License
/** * Disables the menu button.<p>//ww w . j a v a 2s . c om * * @param disabledReason the reason to set in the button title */ public void disable(String disabledReason) { m_button.disable(disabledReason); DOM.setElementPropertyBoolean(getElement(), "disabled", true); }
From source file:com.alkacon.geranium.client.ui.MenuButton.java
License:Open Source License
/** * Enables or disables the button.<p> */ public void enable() { m_button.enable(); DOM.setElementPropertyBoolean(getElement(), "disabled", false); }
From source file:com.alkacon.geranium.client.ui.MenuButton.java
License:Open Source License
/** * Enables or disables the button.<p> * /*from www.j a v a 2 s . co m*/ * @param enabled if true, enables the button, else disables it */ public void setEnabled(boolean enabled) { if (enabled) { enable(); } else { m_button.setEnabled(enabled); DOM.setElementPropertyBoolean(getElement(), "disabled", true); } }
From source file:com.extjs.gxt.ui.client.widget.form.AdapterField.java
License:sencha.com license
@Override protected void onDisable() { super.onDisable(); if (widget instanceof Component) { ((Component) widget).disable(); } else {/*ww w . ja va2 s . c o m*/ DOM.setElementPropertyBoolean(widget.getElement(), "disabled", true); } }
From source file:com.extjs.gxt.ui.client.widget.form.AdapterField.java
License:sencha.com license
@Override protected void onEnable() { super.onEnable(); if (widget instanceof Component) { ((Component) widget).enable(); } else {/*from w ww . j ava 2 s. c o m*/ DOM.setElementPropertyBoolean(widget.getElement(), "disabled", false); } }
From source file:com.extjs.gxt.ui.client.widget.WidgetComponent.java
License:sencha.com license
@Override protected void onDisable() { super.onDisable(); DOM.setElementPropertyBoolean(widget.getElement(), "disabled", true); }
From source file:com.extjs.gxt.ui.client.widget.WidgetComponent.java
License:sencha.com license
@Override protected void onEnable() { super.onEnable(); DOM.setElementPropertyBoolean(widget.getElement(), "disabled", false); }
From source file:com.github.gwtbootstrap.client.ui.base.IconAnchor.java
License:Apache License
/** * {@inheritDoc}/*w w w. j ava2s . c om*/ */ @Override public void setEnabled(boolean enabled) { DOM.setElementPropertyBoolean(getElement(), "disabled", !enabled); }
From source file:com.google.gerrit.client.admin.PermissionRuleEditor.java
License:Apache License
public PermissionRuleEditor(boolean readOnly, AccessSection section, Permission permission, PermissionRange.WithDefaults validRange) { action = new ValueListBox<PermissionRule.Action>(actionRenderer); if (validRange != null && 10 < validRange.getRangeSize()) { min = new RangeBox.Box(); max = new RangeBox.Box(); } else if (validRange != null) { RangeBox.List minList = new RangeBox.List(); RangeBox.List maxList = new RangeBox.List(); List<Integer> valueList = validRange.getValuesAsList(); minList.list.setValue(validRange.getMin()); maxList.list.setValue(validRange.getMax()); minList.list.setAcceptableValues(valueList); maxList.list.setAcceptableValues(valueList); min = minList;/*from ww w . j a v a 2 s. co m*/ max = maxList; } else { min = new RangeBox.Box(); max = new RangeBox.Box(); if (GlobalCapability.PRIORITY.equals(permission.getName())) { action.setValue(PermissionRule.Action.INTERACTIVE); action.setAcceptableValues( Arrays.asList(PermissionRule.Action.INTERACTIVE, PermissionRule.Action.BATCH)); } else { action.setValue(PermissionRule.Action.ALLOW); action.setAcceptableValues(Arrays.asList(PermissionRule.Action.ALLOW, PermissionRule.Action.DENY, PermissionRule.Action.BLOCK)); } } initWidget(uiBinder.createAndBindUi(this)); String name = permission.getName(); boolean canForce = PUSH.equals(name) || PUSH_TAG.equals(name); if (canForce) { String ref = section.getName(); canForce = !ref.startsWith("refs/for/") && !ref.startsWith("^refs/for/"); force.setText(PermissionRule.FORCE_PUSH); } else { canForce = EDIT_TOPIC_NAME.equals(name); force.setText(PermissionRule.FORCE_EDIT); } force.setVisible(canForce); force.setEnabled(!readOnly); if (validRange != null) { min.setEnabled(!readOnly); max.setEnabled(!readOnly); action.getElement().getStyle().setDisplay(Display.NONE); } else { rangeEditor.getStyle().setDisplay(Display.NONE); DOM.setElementPropertyBoolean(action.getElement(), "disabled", readOnly); } if (readOnly) { deleteRule.removeFromParent(); deleteRule = null; } }