/** * Sets the long description of the action. This will also set the * value of the short description if that value is null. * <p> * This is a convenience method for <code>putValue</code> with the * <code>Action.LONG_DESCRIPTION</code> key. * * @param desc the long description; can be <code>null</code> * @see Action#LONG_DESCRIPTION * @see Action#putValue */ public void setLongDescription(String desc) { putValue(Action.LONG_DESCRIPTION, desc); if (desc != null && getShortDescription() == null) { setShortDescription(desc); } }
/** * Sets the long description of the action. This will also set the * value of the short description if that value is null. * <p> * This is a convenience method for <code>putValue</code> with the * <code>Action.LONG_DESCRIPTION</code> key. * * @param desc the long description; can be <code>null</code> * @see Action#LONG_DESCRIPTION * @see Action#putValue */ public void setLongDescription(String desc) { putValue(Action.LONG_DESCRIPTION, desc); if (desc != null && getShortDescription() == null) { setShortDescription(desc); } }
/** * Sets the long description of the action. This will also set the * value of the short description if that value is null. * <p> * This is a convenience method for <code>putValue</code> with the * <code>Action.LONG_DESCRIPTION</code> key. * * @param desc the long description; can be <code>null</code> * @see Action#LONG_DESCRIPTION * @see Action#putValue */ public void setLongDescription(String desc) { putValue(Action.LONG_DESCRIPTION, desc); if (desc != null && getShortDescription() == null) { setShortDescription(desc); } }
/** * Sets the long description of the action. This will also set the * value of the short description if that value is null. * <p> * This is a convenience method for <code>putValue</code> with the * <code>Action.LONG_DESCRIPTION</code> key. * * @param desc the long description; can be <code>null</code> * @see Action#LONG_DESCRIPTION * @see Action#putValue */ public void setLongDescription(String desc) { putValue(Action.LONG_DESCRIPTION, desc); if (desc != null && getShortDescription() == null) { setShortDescription(desc); } }
private static Action configureAction(AbstractActionExt action, String mnemonic, boolean toggle, String group) { action.setMnemonic(mnemonic); String description = action.getName() + " action with comand " + action.getActionCommand(); action.setShortDescription(description); action.setLongDescription(description); if (toggle) { action.setStateAction(); } if (group != null) { action.setGroup(group); } return action; }
private static Action configureAction(AbstractActionExt action, String mnemonic, boolean toggle, String group) { action.setMnemonic(mnemonic); String description = action.getName() + " action with comand " + action.getActionCommand(); action.setShortDescription(description); action.setLongDescription(description); if (toggle) { action.setStateAction(); } if (group != null) { action.setGroup(group); } return action; }
private static Action configureAction(AbstractActionExt action, String mnemonic, boolean toggle, String group) { action.setMnemonic(mnemonic); String description = action.getName() + " action with comand " + action.getActionCommand(); action.setShortDescription(description); action.setLongDescription(description); if (toggle) { action.setStateAction(); } if (group != null) { action.setGroup(group); } return action; }
private static Action configureAction(AbstractActionExt action, String mnemonic, boolean toggle, String group) { action.setMnemonic(mnemonic); String description = action.getName() + " action with comand " + action.getActionCommand(); action.setShortDescription(description); action.setLongDescription(description); if (toggle) { action.setStateAction(); } if (group != null) { action.setGroup(group); } return action; }
/** * Add additional attributes to the action. If any of these attributes * are null then they will still be set on the action. Many of these * attributes map to the set methods on <code>AbstractActionExt</code> * * @see AbstractActionExt * @param action the action which will all the attributes will be applied */ public static void decorateAction(AbstractAction action, String shortDesc, String longDesc, Icon smallIcon, Icon largeIcon, KeyStroke accel) { if (action instanceof AbstractActionExt) { AbstractActionExt a = (AbstractActionExt)action; a.setShortDescription(shortDesc); a.setLongDescription(longDesc); a.setSmallIcon(smallIcon); a.setLargeIcon(largeIcon); a.setAccelerator(accel); } else { action.putValue(Action.SHORT_DESCRIPTION, shortDesc); action.putValue(Action.LONG_DESCRIPTION, longDesc); action.putValue(Action.SMALL_ICON, smallIcon); action.putValue(AbstractActionExt.LARGE_ICON, largeIcon); action.putValue(Action.ACCELERATOR_KEY, accel); } } }
/** * Add additional attributes to the action. If any of these attributes * are null then they will still be set on the action. Many of these * attributes map to the set methods on <code>AbstractActionExt</code> * * @see AbstractActionExt * @param action the action which will all the attributes will be applied */ public static void decorateAction(AbstractAction action, String shortDesc, String longDesc, Icon smallIcon, Icon largeIcon, KeyStroke accel) { if (action instanceof AbstractActionExt) { AbstractActionExt a = (AbstractActionExt)action; a.setShortDescription(shortDesc); a.setLongDescription(longDesc); a.setSmallIcon(smallIcon); a.setLargeIcon(largeIcon); a.setAccelerator(accel); } else { action.putValue(Action.SHORT_DESCRIPTION, shortDesc); action.putValue(Action.LONG_DESCRIPTION, longDesc); action.putValue(Action.SMALL_ICON, smallIcon); action.putValue(AbstractActionExt.LARGE_ICON, largeIcon); action.putValue(Action.ACCELERATOR_KEY, accel); } } }
/** * Add additional attributes to the action. If any of these attributes * are null then they will still be set on the action. Many of these * attributes map to the set methods on <code>AbstractActionExt</code> * * @see AbstractActionExt * @param action the action which will all the attributes will be applied */ public static void decorateAction(AbstractAction action, String shortDesc, String longDesc, Icon smallIcon, Icon largeIcon, KeyStroke accel) { if (action instanceof AbstractActionExt) { AbstractActionExt a = (AbstractActionExt)action; a.setShortDescription(shortDesc); a.setLongDescription(longDesc); a.setSmallIcon(smallIcon); a.setLargeIcon(largeIcon); a.setAccelerator(accel); } else { action.putValue(Action.SHORT_DESCRIPTION, shortDesc); action.putValue(Action.LONG_DESCRIPTION, longDesc); action.putValue(Action.SMALL_ICON, smallIcon); action.putValue(AbstractActionExt.LARGE_ICON, largeIcon); action.putValue(Action.ACCELERATOR_KEY, accel); } } }
/** * Add additional attributes to the action. If any of these attributes * are null then they will still be set on the action. Many of these * attributes map to the set methods on <code>AbstractActionExt</code> * * @see AbstractActionExt * @param action the action which will all the attributes will be applied */ public static void decorateAction(AbstractAction action, String shortDesc, String longDesc, Icon smallIcon, Icon largeIcon, KeyStroke accel) { if (action instanceof AbstractActionExt) { AbstractActionExt a = (AbstractActionExt)action; a.setShortDescription(shortDesc); a.setLongDescription(longDesc); a.setSmallIcon(smallIcon); a.setLargeIcon(largeIcon); a.setAccelerator(accel); } else { action.putValue(Action.SHORT_DESCRIPTION, shortDesc); action.putValue(Action.LONG_DESCRIPTION, longDesc); action.putValue(Action.SMALL_ICON, smallIcon); action.putValue(AbstractActionExt.LARGE_ICON, largeIcon); action.putValue(Action.ACCELERATOR_KEY, accel); } } }