Example usage for javax.swing Action NAME

List of usage examples for javax.swing Action NAME

Introduction

In this page you can find the example usage for javax.swing Action NAME.

Prototype

String NAME

To view the source code for javax.swing Action NAME.

Click Source Link

Document

The key used for storing the String name for the action, used for a menu or button.

Usage

From source file:org.pmedv.blackboard.commands.CreateBoardCommand.java

public CreateBoardCommand() {
    title = "untitled";
    putValue(Action.NAME, resources.getResourceByKey("CreateBoardCommand.name"));
    putValue(Action.SMALL_ICON, resources.getIcon("icon.new"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("CreateBoardCommand.description"));
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));
}

From source file:net.sf.taverna.t2.activities.localworker.actions.LocalworkerActivityConfigurationAction.java

public LocalworkerActivityConfigurationAction(Activity activity, Frame owner, EditManager editManager,
        FileManager fileManager, ActivityIconManager activityIconManager,
        ServiceDescriptionRegistry serviceDescriptionRegistry,
        ApplicationConfiguration applicationConfiguration) {
    super(activity, activityIconManager, serviceDescriptionRegistry);
    this.editManager = editManager;
    this.fileManager = fileManager;
    this.applicationConfiguration = applicationConfiguration;
    putValue(Action.NAME, EDIT_LOCALWORKER_SCRIPT);
}

From source file:org.kepler.gui.ActorDialogAction.java

/**
 * Constructor//w  w  w .j  a v  a2s. co  m
 * 
 * @param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public ActorDialogAction(TableauFrame parent) {
    super("");
    if (parent == null) {
        IllegalArgumentException iae = new IllegalArgumentException(
                "ActorDialogAction constructor received NULL argument for TableauFrame");
        iae.fillInStackTrace();
        throw iae;
    }
    this.parent = parent;

    this.putValue(Action.NAME, DISPLAY_NAME);
    this.putValue(GUIUtilities.LARGE_ICON, LARGE_ICON);
    this.putValue("tooltip", TOOLTIP);
    this.putValue(GUIUtilities.ACCELERATOR_KEY, ACCELERATOR_KEY);
}

From source file:org.kepler.gui.kar.ViewManifestAction.java

/**
 * Constructor/*from ww  w.ja va2 s .  c o m*/
 * 
 *@param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public ViewManifestAction(TableauFrame parent) {
    super(DISPLAY_NAME);
    if (parent == null) {
        IllegalArgumentException iae = new IllegalArgumentException(
                "ViewManifestAction constructor received NULL argument for TableauFrame");
        iae.fillInStackTrace();
        throw iae;
    }
    this.parent = parent;

    this.putValue(Action.NAME, DISPLAY_NAME);
    this.putValue(GUIUtilities.LARGE_ICON, LARGE_ICON);
    this.putValue("tooltip", TOOLTIP);
    this.putValue(GUIUtilities.ACCELERATOR_KEY, ACCELERATOR_KEY);
}

From source file:org.kepler.gui.CookbookAction.java

/**
 * Constructor/*from w  w w  .j a va  2s  .  c om*/
 * 
 * @param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public CookbookAction(TableauFrame parent) {
    super();
    if (parent == null) {
        IllegalArgumentException iae = new IllegalArgumentException(
                "CookbookAction constructor received NULL argument for TableauFrame");
        iae.fillInStackTrace();
        throw iae;
    }
    this.parent = parent;

    this.putValue(Action.NAME, DISPLAY_NAME);
    this.putValue(GUIUtilities.LARGE_ICON, LARGE_ICON);
    this.putValue(GUIUtilities.MNEMONIC_KEY, MNEMONIC_KEY);
    this.putValue("tooltip", TOOLTIP);
    this.putValue(GUIUtilities.ACCELERATOR_KEY, ACCELERATOR_KEY);
}

From source file:org.kepler.gui.kar.ActorUploaderAction.java

protected void initialize() {

    this.putValue(Action.NAME, DISPLAY_NAME);
    this.putValue(GUIUtilities.LARGE_ICON, LARGE_ICON);
    this.putValue("tooltip", TOOLTIP);
    this.putValue(GUIUtilities.ACCELERATOR_KEY, ACCELERATOR_KEY);

}

From source file:org.kepler.gui.PreviewActorAction.java

/**
 * Constructor//from ww w . jav a  2  s .  c om
 * 
 * @param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public PreviewActorAction(TableauFrame parent) {
    super("");
    if (parent == null) {
        IllegalArgumentException iae = new IllegalArgumentException(
                "PreviewActorAction constructor received NULL argument for TableauFrame");
        iae.fillInStackTrace();
        throw iae;
    }
    this.parent = parent;

    this.putValue(Action.NAME, DISPLAY_NAME);
    this.putValue(GUIUtilities.LARGE_ICON, LARGE_ICON);
    this.putValue("tooltip", TOOLTIP);
    this.putValue(GUIUtilities.ACCELERATOR_KEY, ACCELERATOR_KEY);
}

From source file:org.openmicroscopy.shoola.agents.dataBrowser.actions.DownloadAction.java

/**
 * Creates a new instance./*w  w  w.  j  a  va  2  s .c  om*/
 * 
 * @param model Reference to the Model. Mustn't be <code>null</code>.
 */
public DownloadAction(DataBrowser model) {
    super(model);
    putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION));
    IconManager icons = IconManager.getInstance();
    putValue(Action.SMALL_ICON, icons.getIcon(IconManager.DOWNLOAD));
    putValue(Action.NAME, NAME);
}

From source file:org.pmedv.blackboard.commands.OpenBoardCommand.java

public OpenBoardCommand(String title) {
    this.title = title;
    putValue(Action.NAME, title);
    putValue(Action.SMALL_ICON, resources.getIcon("icon.open"));
    putValue(Action.SHORT_DESCRIPTION, resources.getResourceByKey("OpenBoardCommand.description"));
}

From source file:com.meghnasoft.async.AbstractAsynchronousAction.java

/**
 * This is constructor for AbstractAsynchronousAction class.
 *
 * @param name The name of the action, passed to the super class AbstractAction
 *//* w  w  w  .j ava  2  s  .  c  o  m*/
public AbstractAsynchronousAction(String name) {
    this();
    putValue(Action.NAME, name);

    final Runnable doFinished = new Runnable() {
        public void run() {
            finished();
            firePropertyChange("enabled", Boolean.FALSE, Boolean.TRUE);
        }
    };

    this.asynchronousActionRunnable = new Runnable() {
        public void run() {
            try {
                setTaskOutput(asynchronousActionPerformed(lastActionEvent));
            } catch (Exception excp) {
                log.error("Aysynchronous action got exception", excp);
            } finally {
                threadVar.clear();

                try {
                    SwingUtilities.invokeAndWait(doFinished);
                } catch (InterruptedException ex) {
                    if (log.isDebugEnabled()) {
                        log.debug("Asynchronous action got " + "interrupted exception", ex);
                    }
                } catch (InvocationTargetException ex) {
                    if (log.isDebugEnabled()) {
                        log.debug("Asynchronous action got invocation " + "target exception", ex);
                    }
                }
            }
        }
    };
}