/** @param changedProperty the name of property that has changed * or null if it is not known */ @Override public void updateState(String changedProperty) { super.updateState(changedProperty); if ((changedProperty == null) || !changedProperty.equals(Action.ACCELERATOR_KEY)) { updateKey((JMenuItem) comp, action); } if ((changedProperty == null) || changedProperty.equals(Action.NAME)) { Object s = action.getValue(Action.NAME); if (s instanceof String) { setMenuText(((JMenuItem) comp), (String) s, true); } } }
/** @param changedProperty the name of property that has changed * or null if it is not known */ public void updateState (String changedProperty) { super.updateState (changedProperty); if (changedProperty == null || !changedProperty.equals (Action.ACCELERATOR_KEY)) { updateKey ((JMenuItem)comp, action); } if (changedProperty == null || changedProperty.equals (Action.NAME)) { Object s = action.getValue (Action.NAME); if (s instanceof String) { setMenuText (((JMenuItem)comp), (String)s, !popup); } } }
/** @param changedProperty the name of property that has changed * or null if it is not known */ public void updateState (String changedProperty) { super.updateState (changedProperty); if (changedProperty == null || !changedProperty.equals (Action.ACCELERATOR_KEY)) { updateKey ((JMenuItem)comp, action); } if (changedProperty == null || changedProperty.equals (Action.NAME)) { Object s = action.getValue (Action.NAME); if (s instanceof String) { setMenuText (((JMenuItem)comp), (String)s, !popup); } } }
protected void updateButtonIcon () { if (hasOwnIcon) { super.updateButtonIcon (); return ; } if (!popup) { button.setIcon (new ImageIcon(Utilities.loadImage("org/openide/resources/actions/gap.gif", true))); // NOI18N } }
/** Connects buttons to action. * @param button the button * @param action the action */ public static void connect (AbstractButton button, BooleanStateAction action) { Bridge b = new BooleanButtonBridge (button, action); b.updateState (null); }
protected void updateButtonIcon () { if (hasOwnIcon) { super.updateButtonIcon (); return ; } if (!popup) { button.setIcon (new ImageIcon(Utilities.loadImage("org/openide/resources/actions/gap.gif", true))); // NOI18N } }
/** Connects buttons to action. * @param button the button * @param action the action */ public static void connect (AbstractButton button, BooleanStateAction action) { Bridge b = new BooleanButtonBridge (button, action); b.updateState (null); }
@Override protected void updateButtonIcon() { if (hasOwnIcon) { super.updateButtonIcon(); return; } if (!popup) { button.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/actions/empty.gif", true)); // NOI18N } }
/** Connects buttons to action. * @param button the button * @param action the action */ public static void connect(AbstractButton button, BooleanStateAction action) { Bridge b = new BooleanButtonBridge(button, action); b.prepare(); }