public void propertyChange(final PropertyChangeEvent ev) { if ("ancestor".equals(ev.getPropertyName())) { // ancestor change - decide if parent is null or not if (ev.getNewValue() != null) { addNotify(); } else { removeNotify(); } } } }
public void propertyChange (final PropertyChangeEvent ev) { if ("ancestor".equals(ev.getPropertyName())) { // ancestor change - decide if parent is null or not if (ev.getNewValue() != null) { addNotify(); } else { removeNotify(); } } } }
public void propertyChange (final PropertyChangeEvent ev) { if ("ancestor".equals(ev.getPropertyName())) { // ancestor change - decide if parent is null or not if (ev.getNewValue() != null) { addNotify(); } else { removeNotify(); } } } }
/** @param comp component * @param action the action */ public Bridge (JComponent comp, Action action) { this.comp = comp; this.action = action; // visibility listener Bridge.this.comp.addPropertyChangeListener(new VisL()); if (Bridge.this.comp.isShowing ()) { addNotify (); } // associate context help, if applicable // [PENDING] probably belongs in ButtonBridge.updateState to make it dynamic HelpCtx help = findHelp (action); if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) HelpCtx.setHelpIDString (comp, help.getHelpID ()); }
/** @param comp component * @param action the action */ public Bridge (JComponent comp, Action action) { this.comp = comp; this.action = action; // visibility listener Bridge.this.comp.addPropertyChangeListener(new VisL()); if (Bridge.this.comp.isShowing ()) { addNotify (); } // associate context help, if applicable // [PENDING] probably belongs in ButtonBridge.updateState to make it dynamic HelpCtx help = findHelp (action); if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) HelpCtx.setHelpIDString (comp, help.getHelpID ()); }
protected void prepare() { comp.addPropertyChangeListener(new VisL()); if (comp.isShowing()) { addNotify(); } else { updateState(null); } }