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.pentaho.reporting.designer.core.actions.global.ScreenCaptureAction.java

public ScreenCaptureAction() {
    putValue(Action.NAME, ActionMessages.getString("ScreenCaptureAction.Text"));
    putValue(Action.SHORT_DESCRIPTION, ActionMessages.getString("ScreenCaptureAction.Description"));
    putValue(Action.MNEMONIC_KEY, ActionMessages.getOptionalMnemonic("ScreenCaptureAction.Mnemonic"));
    //putValue(Action.ACCELERATOR_KEY, ActionMessages.getOptionalKeyStroke("ScreenCaptureAction.Accelerator"));
    installGlobally();//  w w w.  j a va  2 s  .co  m
}

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

/**
 * Constructor//  w w  w . java  2 s .  c  om
 * 
 * @param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public AboutAction(TableauFrame parent) {
    super("");
    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.kineticsystem.commons.data.view.actions.MoveForwardAction.java

/**
  * Constructor.//  w  w  w .ja  va 2  s.  c  o  m
  * @param controller The navigator controller instance.
  */
public MoveForwardAction(Navigator navigator) {
    this.navigator = navigator;
    putValue(Action.SMALL_ICON, ResourceLoader.getIcon(NAVIGATOR_RESOURCE + "Next16.png"));
    putValue(Action.NAME, Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveForwardAction"));
    putValue(Action.SHORT_DESCRIPTION,
            Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveForwardAction_Description"));
    setEnabled(false);
}

From source file:org.kineticsystem.commons.data.view.actions.MoveBackAction.java

/**
 * Default constructor.// w w w  .  j a  v a2  s.  co  m
 * @param controller The navigation controller associate to the action.
 */
public MoveBackAction(Navigator navigator) {
    this.navigator = navigator;
    putValue(Action.SMALL_ICON, ResourceLoader.getIcon(NAVIGATOR_RESOURCE + "Previous16.png"));
    putValue(Action.NAME, Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveBackAction"));
    putValue(Action.SHORT_DESCRIPTION,
            Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveBackAction_Description"));
    setEnabled(false);
}

From source file:org.kineticsystem.commons.data.view.actions.MoveBackMouseAction.java

/**
 * Constructor.//from w  ww.  j a v a2 s. c o  m
 * @param navigator The navigator instance.
 */
public MoveBackMouseAction(Navigator navigator) {
    this.navigator = navigator;
    putValue(Action.SMALL_ICON, ResourceLoader.getIcon(NAVIGATOR_RESOURCE + "Previous16.png"));
    putValue(Action.NAME, Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveBackAction"));
    putValue(Action.SHORT_DESCRIPTION,
            Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveBackAction_Description"));
    setEnabled(false);
}

From source file:org.kineticsystem.commons.data.view.actions.MoveForwardMouseAction.java

/**
 * Constructor.//from  w  w w .java 2  s. co m
 * @param navigator The navigator instance.
 */
public MoveForwardMouseAction(Navigator navigator) {
    this.navigator = navigator;
    putValue(Action.SMALL_ICON, ResourceLoader.getIcon(NAVIGATOR_RESOURCE + "Next16.png"));
    putValue(Action.NAME, Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveForwardAction"));
    putValue(Action.SHORT_DESCRIPTION,
            Localizer.localizeString(NAVIGATOR_BUNDLE, "MoveForwardAction_Description"));
    setEnabled(false);
}

From source file:ro.nextreports.designer.action.chart.OpenChartAction.java

public OpenChartAction(boolean fullName) {
    if (fullName) {
        putValue(Action.NAME, I18NSupport.getString("open.chart"));
    } else {/*from ww w.  j av  a  2  s .c o m*/
        putValue(Action.NAME, I18NSupport.getString("open.chart.small"));
    }
    Icon icon = ImageUtil.getImageIcon("chart_open");
    putValue(Action.SMALL_ICON, icon);
    putValue(Action.MNEMONIC_KEY, ShortcutsUtil.getMnemonic("chart.open.mnemonic", new Integer('A')));
    putValue(Action.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(ShortcutsUtil.getShortcut("chart.open.accelerator", "control A")));
    putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString("open.chart"));
    putValue(Action.LONG_DESCRIPTION, I18NSupport.getString("open.chart"));
}

From source file:net.phyloviz.project.action.LoadDataSetAction.java

public LoadDataSetAction() {
    putValue(Action.NAME, "Load DataSet");
}

From source file:ro.nextreports.designer.action.query.ValidateSqlsAction.java

public ValidateSqlsAction(DBObject sqlObject) {
    String text;/*from  w  w w.j  a v a  2  s .c o  m*/

    multiple = (sqlObject.getType() == DBObject.REPORTS_GROUP)
            || (sqlObject.getType() == DBObject.QUERIES_GROUP) || (sqlObject.getType() == DBObject.CHARTS_GROUP)
            || (sqlObject.getType() == DBObject.FOLDER_QUERY) || (sqlObject.getType() == DBObject.FOLDER_REPORT)
            || (sqlObject.getType() == DBObject.FOLDER_CHART);

    if (multiple) {
        text = I18NSupport.getString("sql.validation");
    } else {
        text = I18NSupport.getString("sql.validation.single");
    }
    putValue(Action.NAME, text);
    putValue(Action.SMALL_ICON, ImageUtil.getImageIcon("sql_validation"));
    putValue(Action.SHORT_DESCRIPTION, text);
    putValue(Action.LONG_DESCRIPTION, text);
    this.sqlObject = sqlObject;
}

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

/**
 * Constructor/*from  w  w  w .j a v a2 s  . c om*/
 * 
 *@param parent
 *            the "frame" (derived from ptolemy.gui.Top) where the menu is
 *            being added.
 */
public DeleteArchiveAction(TableauFrame parent) {
    super("Open Archive (KAR)");
    if (parent == null) {
        IllegalArgumentException iae = new IllegalArgumentException(
                "OpenArchiveAction 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);
}