Example usage for javax.swing Action SHORT_DESCRIPTION

List of usage examples for javax.swing Action SHORT_DESCRIPTION

Introduction

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

Prototype

String SHORT_DESCRIPTION

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

Click Source Link

Document

The key used for storing a short String description for the action, used for tooltip text.

Usage

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

/**
 * Constructor./*from   w  w  w.  jav  a 2  s.  com*/
 * @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.query.ValidateSqlsAction.java

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

    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.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:org.roche.antibody.ui.actions.menu.AntibodySaveXmlAction.java

public AntibodySaveXmlAction(JFrame parentFrame) {
    super(parentFrame, NAME);

    ImageIcon icon = getImageIcon(IMAGE_PATH);
    if (icon != null) {
        this.putValue(Action.SMALL_ICON, icon);
    }//from w  w  w . ja  va2 s.c  o m
    this.putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION);
}

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

/**
 * Creates a new instance.//from  w ww. j  a v  a2  s.  c  o  m
 * 
 * @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:ro.nextreports.designer.action.chart.OpenChartAction.java

public OpenChartAction(boolean fullName) {
    if (fullName) {
        putValue(Action.NAME, I18NSupport.getString("open.chart"));
    } else {//from   w  w w. j a v  a2  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: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:net.sf.jabref.importer.OpenDatabaseAction.java

public OpenDatabaseAction(JabRefFrame frame, boolean showDialog) {
    super(IconTheme.JabRefIcon.OPEN.getIcon());
    this.frame = frame;
    this.showDialog = showDialog;
    putValue(Action.NAME, Localization.menuTitle("Open database"));
    putValue(Action.ACCELERATOR_KEY, Globals.getKeyPrefs().getKey(KeyBinding.OPEN_DATABASE));
    putValue(Action.SHORT_DESCRIPTION, Localization.lang("Open BibTeX database"));
}

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

public PreviewChartAction(String chartRunnerType, byte chartGraphicType) {
    String image = "chart_preview_flash";
    if (ChartRunner.IMAGE_FORMAT.equals(chartRunnerType)) {
        image = "chart_preview_image";
    } else if (ChartRunner.HTML5_TYPE == chartGraphicType) {
        image = "chart_preview_html5";
    }/*from   w  w  w  .j  a  v a 2s. co m*/
    Icon icon = ImageUtil.getImageIcon(image);
    putValue(Action.SMALL_ICON, icon);
    String descKey = "preview.chart.flash";
    if (ChartRunner.IMAGE_FORMAT.equals(chartRunnerType)) {
        descKey = "preview.chart.image";
    } else if (ChartRunner.HTML5_TYPE == chartGraphicType) {
        descKey = "preview.chart.html5";
    }
    putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString(descKey));
    putValue(Action.LONG_DESCRIPTION, I18NSupport.getString(descKey));
    this.chartRunnerType = chartRunnerType;
    this.chartGraphicType = chartGraphicType;
    loaded = true;
}

From source file:com.generalbioinformatics.rdf.gui.ProjectManager.java

private void refreshRecentFilesMenu() {
    for (int i = 0; i < MarrsPreference.RECENT_FILE_NUM; ++i) {
        AbstractAction act = recentActions[i];
        RecentItem item = (i >= recentItems.size()) ? null : recentItems.get(i);
        if (item == null || item.file == null) {
            act.setEnabled(false);/*from www  .ja v  a2  s  . co m*/
            String menuTitle = i + "";
            act.putValue(Action.NAME, menuTitle);
            act.putValue(Action.SHORT_DESCRIPTION, null);
        } else {
            act.setEnabled(true);
            String menuTitle = i + " - " + item.file.getName();

            if (!StringUtils.emptyOrNull(item.title))
                menuTitle += " - " + item.title;

            act.putValue(Action.NAME, menuTitle);
            act.putValue(Action.SHORT_DESCRIPTION, item.file.getAbsolutePath());
        }
    }
}