Binds the hovered state of the supplied target widgets to the supplied boolean value. The
supplied value will be toggled to true when the mouse is hovering over any of the supplied
targets and false otherwise.
164917
public static <T extends HasMouseOverHandlers & HasMouseOutHandlers> void bindHovered (
        final Value<Boolean> value, T... targets)
    {
        HoverHandler handler = new HoverHandler(value);
        for (T target : targets) {
            target.addMouseOverHandler(handler);
            target.addMouseOutHandler(handler);
        }
    }
318663
public void setFocus(CmsAttributeValueView target) {

        if (m_currentFocus == target) {
            return;
        }

        if ((m_currentFocus != null)) {
            m_currentFocus.toggleFocus(false);
        }
        m_currentFocus = target;
        m_currentFocus.toggleFocus(true);
    }
361330
protected void onSelectedInstantChanged() {
        if (selectedInstant == null) {
            getInputWidget().setText("");
            anchorLabel();
        } else {
            getInputWidget().setText(getInstantPrinter().print(selectedInstant));
            floatLabel();
        }

        if (instantPickerListener != null)
            instantPickerListener.onInstantChanged(this, selectedInstant);
    }
391965
@Override
	protected void applyAction(final SubordinateTarget target, final Object value) {
		// Should always be Boolean, but check anyway
		if (value instanceof Boolean) {
			applyEnableAction(target, ((Boolean) value));
		}
	}
714554
function () {
            var newValue = !this.getProperty("value");
            this._cfg.value = newValue;
            this.setProperty("value", newValue);
            // setProperty on value might destroy the widget
            if (this._cfg) {
                this._setState();
                this._updateDomForState();
                var changeCallback = this._cfg.onchange;
                if (changeCallback) {
                    this.evalCallback(changeCallback);
                }
            }
        }
1049004
function (event) {
        if (this.hover === true) {
            this.grabOffset.set(event.gameX, event.gameY);
            this.grabOffset.sub(this.pos);
            this.selected = true;
            // don"t propagate the event furthermore
            return false;
        }
    }
275610
public static void animate(Widget source, final Widget target) {
        animate(source.getElement(), target.getElement());
    }
887420
def onselection(self, widget):
        """"""
        self._selected_key = None
        for k in self.children:
            if self.children[k] == widget:  # widget is the selected ListItem
                self._selected_key = k
                if (self._selected_item is not None) and self._selectable:
                    self._selected_item.attributes['selected'] = False
                self._selected_item = self.children[self._selected_key]
                if self._selectable:
                    self._selected_item.attributes['selected'] = True
                break
        return (self._selected_key,)
175840
@Override
	protected void applyAction(final SubordinateTarget target, final Object value) {
		// Should always be Boolean, but check anyway
		if (value instanceof Boolean) {
			applyMandatoryAction(target, ((Boolean) value));
		}
	}
832852
private void addActivationHandler() {

        if (m_activationHandlerRegistration == null) {
            m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {

                public void onMouseDown(MouseDownEvent event) {

                    // only act on click if not inside the button bar
                    if (!m_buttonBar.getElement().isOrHasChild((Node)event.getNativeEvent().getEventTarget().cast())) {
                        activateWidget();
                    }
                }
            });
        }
    }
1364727
function () {
                this.$InputElement.initWidget.call(this);

                var bindings = this._cfg.bind;
                var binding = bindings.selectedValue;
                if (binding) {
                    var newValue = this._transform(binding.transform, binding.inside[binding.to], "toWidget");
                    this._domElt.checked = (newValue === this._cfg.value);
                } else {
                    this.$logWarn(this.BINDING_NEEDED, [this.$class, "selectedValue"]);
                }
            }
701410
public void setValueWidget(I_CmsFormEditWidget widget, String value, String defaultValue, boolean active) {

        if (m_hasValue) {
            throw new RuntimeException("Value has already been set");
        }
        m_defaultValue = defaultValue;
        m_hasValue = true;
        m_isSimpleValue = true;
        m_widget = widget;
        if (CmsAttributeHandler.hasResizeHandler() && (m_widget instanceof HasResizeHandlers)) {
            ((HasResizeHandlers)m_widget).addResizeHandler(CmsAttributeHandler.getResizeHandler());
        }
        m_widgetHolder.clear();
        m_widget.setWidgetInfo(m_label, m_help);
        if (active) {
            m_widget.setValue(value, false);
        } else {
            m_widget.setValue("");
        }
        m_widgetHolder.add(m_widget);
        m_widget.setName(getHandler().getAttributeName());
        m_widget.addValueChangeHandler(new ChangeHandler());
        m_widget.addFocusHandler(new FocusHandler() {

            public void onFocus(FocusEvent event) {

                CmsValueFocusHandler.getInstance().setFocus(CmsAttributeValueView.this);
                activateWidget();
            }
        });
        m_widget.setActive(active);
        if (!active) {
            addActivationHandler();
        } else {
            removeStyleName(formCss().emptyValue());
        }
        addStyleName(formCss().simpleValue());

        if (m_widget instanceof CmsFormWidgetWrapper) {
            addLabelHoverHandler(((CmsFormWidgetWrapper)m_widget).getLabel());
        } else {
            removeLabelHoverHandler();
        }
    }
1242390
def toggle(self, event=None):
        """"""
        if self.choice.get() == "yes":
            self.rbno.select()
        else:
            self.rbyes.select()
        self.widgetEdited()
96648
def set_triggered_by_event(self, value):
        
        if value is None or not isinstance(value, bool):
            raise TypeError("TriggeredByEvent must be set to a bool")
        else:
            self.__triggered_by_event = value
696405
def on_hover(self, callback, remove=False):
        '''
        
        '''
        self._hover_callbacks.register_callback(callback, remove=remove)
295314
function (applySwitchMargins) {
            var value;
            var binding = this._binding;
            if (!binding) {
                return;
            }

            value = binding.inside[binding.to];
            if (value == null) {
                value = 0;
            }
            if (value < 0) {
                value = 0;
            }
            if (value > 1) {
                value = 1;
            }
            if (this._isSwitch && applySwitchMargins) {
                if (value >= this._switchThreshold) {
                    value = 1;
                } else {
                    value = 0;
                }
            }
            this._value = value;
            this._storeValue();
        }
1121642
public static void bindDown (final Value<Boolean> value, final ToggleButton toggle)
    {
        toggle.addClickHandler(new ClickHandler() {
            public void onClick (ClickEvent event) {
                value.updateIf(toggle.isDown());
            }
        });
        value.addListenerAndTrigger(new Value.Listener<Boolean>() {
            public void valueChanged (Boolean value) {
                toggle.setDown(value);
            }
        });
    }