public void setVisible(boolean visible) { if (this.visible == visible) { return; } this.visible = visible; if (visible) { firePropertyChange(PROP_VISIBLE, Boolean.FALSE, Boolean.TRUE); } else { firePropertyChange(PROP_VISIBLE, Boolean.TRUE, Boolean.FALSE); } }
/** * Sets icon image element. * * @param imageElement icon image element */ public void setImageElement(Element imageElement) { Element oldElement = this.imageElement; this.imageElement = imageElement; firePropertyChange(PROP_ICON, oldElement, imageElement); }
/** * Sets icon HTML resource. * * @param htmlResource html resource */ public void setHTMLResource(String htmlResource) { String oldHTMLResource = htmlResource; this.htmlResource = htmlResource; firePropertyChange(PROP_ICON, oldHTMLResource, htmlResource); }
public void setText(String text) { String oldText = this.text; this.text = text; firePropertyChange(PROP_TEXT, oldText, text); }
public void setDescription(String description) { String oldDescription = myDescription; myDescription = description; firePropertyChange(PROP_DESCRIPTION, oldDescription, myDescription); }
/** * Sets whether the action enabled or not. If an action is disabled, {@link * Action#actionPerformed} won't be called. In case when action represents a button or a menu * item, the representing button or item will be greyed out. * * @param enabled <code>true</code> if you want to enable action, <code>false</code> otherwise */ public void setEnabled(boolean enabled) { if (this.enabled == enabled) { return; } this.enabled = enabled; if (enabled) { firePropertyChange(PROP_ENABLED, Boolean.FALSE, Boolean.TRUE); } else { firePropertyChange(PROP_ENABLED, Boolean.TRUE, Boolean.FALSE); } }
public void putClientProperty(@NotNull String key, @Nullable Object value) { Object oldValue = userMap.get(key); userMap.put(key, value); firePropertyChange(key, oldValue, value); }
@Override public final void actionPerformed(final ActionEvent e) { boolean selected = !isSelected(e); setSelected(e, selected); e.getPresentation() .firePropertyChange( SELECTED_PROPERTY, Boolean.valueOf(!selected), Boolean.valueOf(selected)); }