Search in sources :

Example 6 with RunnableAction

use of com.revolsys.swing.action.RunnableAction in project com.revolsys.open by revolsys.

the class MenuFactory method newMenuItem.

public static RunnableAction newMenuItem(final CharSequence name, final String toolTip, final Icon icon, final EnableCheck enableCheck, final Runnable runnable) {
    final RunnableAction action = new RunnableAction(name, toolTip, icon, runnable);
    action.setEnableCheck(enableCheck);
    return action;
}
Also used : RunnableAction(com.revolsys.swing.action.RunnableAction)

Example 7 with RunnableAction

use of com.revolsys.swing.action.RunnableAction in project com.revolsys.open by revolsys.

the class MenuFactory method addMenuItemTitleIcon.

public RunnableAction addMenuItemTitleIcon(final String groupName, final int index, final CharSequence name, final String iconName, final EnableCheck enableCheck, final Runnable runnable) {
    final Icon icon = Icons.getIcon(iconName);
    final RunnableAction action = newMenuItem(name, null, icon, enableCheck, runnable);
    addComponentFactory(groupName, index, action);
    return action;
}
Also used : RunnableAction(com.revolsys.swing.action.RunnableAction) Icon(javax.swing.Icon)

Example 8 with RunnableAction

use of com.revolsys.swing.action.RunnableAction in project com.revolsys.open by revolsys.

the class MenuFactory method addMenuItem.

public void addMenuItem(final String groupName, final int index, final String title, final String iconName, final Runnable runnable) {
    final Icon icon = Icons.getIcon(iconName);
    final RunnableAction menuItem = newMenuItem(title, title, icon, null, runnable);
    addComponentFactory(groupName, index, menuItem);
}
Also used : RunnableAction(com.revolsys.swing.action.RunnableAction) Icon(javax.swing.Icon)

Example 9 with RunnableAction

use of com.revolsys.swing.action.RunnableAction in project com.revolsys.open by revolsys.

the class MenuFactory method addMenuItemTitleIcon.

public RunnableAction addMenuItemTitleIcon(final String groupName, final CharSequence name, final String iconName, final Runnable runnable) {
    final Icon icon = Icons.getIcon(iconName);
    final RunnableAction action = newMenuItem(name, null, icon, null, runnable);
    addComponentFactory(groupName, action);
    return action;
}
Also used : RunnableAction(com.revolsys.swing.action.RunnableAction) Icon(javax.swing.Icon)

Example 10 with RunnableAction

use of com.revolsys.swing.action.RunnableAction in project com.revolsys.open by revolsys.

the class MenuFactory method addMenuItem.

public void addMenuItem(final String groupName, final String title, final String toolTip, final String iconName, final Runnable runnable) {
    final Icon icon = Icons.getIcon(iconName);
    final RunnableAction menuItem = newMenuItem(title, toolTip, icon, null, runnable);
    addComponentFactory(groupName, menuItem);
}
Also used : RunnableAction(com.revolsys.swing.action.RunnableAction) Icon(javax.swing.Icon)

Aggregations

RunnableAction (com.revolsys.swing.action.RunnableAction)19 Icon (javax.swing.Icon)10 ActionMap (javax.swing.ActionMap)4 InputMap (javax.swing.InputMap)4 EnableCheck (com.revolsys.swing.action.enablecheck.EnableCheck)2 JComponent (javax.swing.JComponent)2 KeyStroke (javax.swing.KeyStroke)2 ObjectPropertyEnableCheck (com.revolsys.swing.action.enablecheck.ObjectPropertyEnableCheck)1 MeasureOverlay (com.revolsys.swing.map.overlay.MeasureOverlay)1 MenuFactory (com.revolsys.swing.menu.MenuFactory)1 BorderLayout (java.awt.BorderLayout)1 Dimension (java.awt.Dimension)1 FlowLayout (java.awt.FlowLayout)1 Window (java.awt.Window)1 KeyEvent (java.awt.event.KeyEvent)1 KeyListener (java.awt.event.KeyListener)1 ButtonGroup (javax.swing.ButtonGroup)1 JButton (javax.swing.JButton)1 JCheckBoxMenuItem (javax.swing.JCheckBoxMenuItem)1 JComboBox (javax.swing.JComboBox)1