/** @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); } } }
updateKey((JMenuItem) comp, action);
updateKey(item, action);
/** @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); } } }
/** @param changedProperty the name of property that has changed * or null if it is not known */ public void updateState (String changedProperty) { if (changedProperty == null || changedProperty.equals (SystemAction.PROP_ENABLED)) { button.setEnabled (action.isEnabled ()); } if (changedProperty == null || !changedProperty.equals (Action.ACCELERATOR_KEY)) { updateKey ((JMenuItem)comp, action); } if (!popup) { if (changedProperty == null || changedProperty.equals (SystemAction.PROP_ICON) || changedProperty.equals(Action.SMALL_ICON) || changedProperty.equals("iconBase")) { // NOI18N updateButtonIcon(); } } 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) { if (changedProperty == null || changedProperty.equals (SystemAction.PROP_ENABLED)) { button.setEnabled (action.isEnabled ()); } if (changedProperty == null || !changedProperty.equals (Action.ACCELERATOR_KEY)) { updateKey ((JMenuItem)comp, action); } if (!popup) { if (changedProperty == null || changedProperty.equals (SystemAction.PROP_ICON) || changedProperty.equals(Action.SMALL_ICON) || changedProperty.equals("iconBase")) { // NOI18N updateButtonIcon(); } } if (changedProperty == null || changedProperty.equals (Action.NAME)) { Object s = action.getValue (Action.NAME); if (s instanceof String) { setMenuText (((JMenuItem)comp), (String)s, !popup); } } }
Mnemonics.setLocalizedText(item, label); if (i == 0) updateKey(item, action); item.addActionListener(new ISubActionListener(i, model)); HelpCtx help = model.getHelpCtx (i);
Mnemonics.setLocalizedText(item, label); if (i == 0) updateKey(item, action); item.addActionListener(new ISubActionListener(i, model)); HelpCtx help = model.getHelpCtx (i);