本文整理了Java中javax.swing.JMenu.setToolTipText()
方法的一些代码示例,展示了JMenu.setToolTipText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.setToolTipText()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:setToolTipText
暂无
代码示例来源:origin: magefree/mage
rollbackMainItem.setToolTipText("The game will be rolled back to the start of the requested turn if all players agree.");
popupMenu.add(rollbackMainItem);
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setToolTipText(String aValue) {
super.setToolTipText(aValue);
}
代码示例来源:origin: igvteam/igv
static public JMenu createMenu(List<JComponent> menuItems, MenuAction action) {
final JMenu menu = new JMenu();
menu.setAction(action);
for (JComponent menuItem : menuItems) {
menu.add(menuItem);
}
String text = action.getToolTipText();
if (text != null) {
menu.setToolTipText(text);
}
return menu;
}
代码示例来源:origin: net.sf.taverna.t2.workbench.views/graph
@SuppressWarnings("unchecked")
protected Component createCustomComponent() {
saveDiagramMenu = new JMenu("Save Diagram");
saveDiagramMenu.setToolTipText("Open this menu to save diagram in various formats");
for (int i = 0; i < saveTypes.length; i++) {
String type = saveTypes[i];
String extension = saveExtensions[i];
ImageIcon icon = new ImageIcon(WorkbenchIcons.class
.getResource("graph/saveAs" + type.toUpperCase() + ".png"));
JMenuItem item = new JMenuItem("Save as " + saveTypeNames[i],
icon);
item.addActionListener(new DotInvoker(type, extension));
modelMap.addObserver(perspectiveObserver);
saveDiagramMenu.add(item);
}
return saveDiagramMenu;
}
代码示例来源:origin: pentaho/pentaho-reporting
public static JMenu createMenu( final ActionCategory cat ) {
final JMenu menu = new JMenu();
menu.setText( cat.getDisplayName() );
final Integer mnemonicKey = cat.getMnemonicKey();
if ( mnemonicKey != null ) {
menu.setMnemonic( mnemonicKey.intValue() );
}
final String toolTip = cat.getShortDescription();
if ( toolTip != null && toolTip.length() > 0 ) {
menu.setToolTipText( toolTip );
}
return menu;
}
代码示例来源:origin: Audiveris/audiveris
/**
* Create an {@code AssignAction} object.
*/
public AssignAction ()
{
super("Assign to...");
putValue(javax.swing.Action.SHORT_DESCRIPTION, "Assign a new shape");
ShapeSet.addAllShapes(popup, actionListener);
// Build menu for SamplePopup
menu = new JMenu("Assign to");
ShapeSet.addAllShapes(menu, actionListener);
menu.setToolTipText("Assign a new shape");
}
代码示例来源:origin: violetumleditor/violetumleditor
menu.setToolTipText(tooltip);
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override public void run() {
if (menu != null) {
menu.setText(setLabel);
menu.setToolTipText(Utility.makeTooltipText(object));
}
if (popup != null) {
popup.setLabel(setLabel);
popup.setToolTipText(Utility.makeTooltipText(object));
}
}
});
代码示例来源:origin: net.sf.ingenias/editor
nentry.add(generate);
nentry.setToolTipText(bcg.getDescription());
resources.getCodeGenerator().add(nentry);
代码示例来源:origin: net.sf.jung/jung-visualization
modeMenu.add(transformingButton);
modeMenu.add(pickingButton);
modeMenu.setToolTipText("Menu for setting Mouse Mode");
addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
代码示例来源:origin: jrtom/jung
modeMenu.add(transformingButton);
modeMenu.add(pickingButton);
modeMenu.setToolTipText("Menu for setting Mouse Mode");
addItemListener(
new ItemListener() {
代码示例来源:origin: jrtom/jung
modeMenu.add(transformingButton);
modeMenu.add(pickingButton);
modeMenu.setToolTipText("Menu for setting Mouse Mode");
addItemListener(
new ItemListener() {
代码示例来源:origin: hneemann/Digital
JMenuBar bar = new JMenuBar();
final JMenu memory = new JMenu(Lang.get("menu_probe_memory"));
memory.setToolTipText(Lang.get("menu_probe_memory_tt"));
for (Node n : memoryList) {
if (n instanceof RAMInterface) {
代码示例来源:origin: net.sf.jung/jung-visualization
modeMenu.add(transformingButton);
modeMenu.add(pickingButton);
modeMenu.setToolTipText("Menu for setting Mouse Mode");
addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
代码示例来源:origin: nu.zoom/eon2
private synchronized void rebuildMenuOnEventQueue() {
if (connectionFactoryMenu == null) {
connectionFactoryMenu = new JMenu(connectionFactory.getName());
connectionFactoryMenu.setToolTipText(connectionFactory.getDescription());
Icon connectionIcon = connectionFactory.getIcon();
if (connectionIcon != null) {
代码示例来源:origin: freeplane/freeplane
private JMenu getSubmenu( final IconGroup group) {
final JMenu menu = new JMenu("\u25ba") {
private static final long serialVersionUID = 1L;
@Override
protected Point getPopupMenuOrigin() {
return new Point(getWidth(), 0);
}
};
menu.setFont(ARROW_FONT);
menu.setMargin(ICON_SUBMENU_INSETS);
menu.setIcon(group.getGroupIcon().getIcon());
for (final MindIcon icon : group.getIcons()) {
addActionToIconSubmenu(menu, icon, icon.getFileName());
}
menu.setToolTipText(group.getDescription());
return menu;
}
代码示例来源:origin: org.jspresso/jspresso-swing-application
private JMenu createActionMenu(ActionList actionList) {
JMenu menu = new JMenu(actionList.getI18nName(getTranslationProvider(),
getLocale()));
if (actionList.getDescription() != null) {
menu.setToolTipText(actionList.getI18nDescription(
getTranslationProvider(), getLocale())
+ IActionFactory.TOOLTIP_ELLIPSIS);
}
menu.setIcon(getIconFactory().getIcon(actionList.getIconImageURL(),
IIconFactory.SMALL_ICON_SIZE));
for (IDisplayableAction action : actionList.getActions()) {
menu.add(new JMenuItem(getViewFactory().getActionFactory().createAction(
action, this, menu, null, null, getLocale())));
}
return menu;
}
代码示例来源:origin: org.gephi/desktop-datalab
subMenu.setText(item.getName());
if (item.getDescription() != null && !item.getDescription().isEmpty()) {
subMenu.setToolTipText(item.getDescription());
代码示例来源:origin: org.gephi/visualization
subMenu.setText(item.getName());
if (item.getDescription() != null && !item.getDescription().isEmpty()) {
subMenu.setToolTipText(item.getDescription());
代码示例来源:origin: org.gephi/desktop-datalab
subMenu.setText(item.getName());
if (item.getDescription() != null && !item.getDescription().isEmpty()) {
subMenu.setToolTipText(item.getDescription());
内容来源于网络,如有侵权,请联系作者删除!