net.sf.doolin.gui.action.swing
Class AbstractJMenuBuilder

java.lang.Object
  extended by net.sf.doolin.gui.action.swing.AbstractMenuBuilder
      extended by net.sf.doolin.gui.action.swing.AbstractJMenuBuilder
All Implemented Interfaces:
MenuBuilder
Direct Known Subclasses:
JMenuBarBuilder, JMenuBuilder, JPopupMenuBuilder

public abstract class AbstractJMenuBuilder
extends AbstractMenuBuilder

Base implementation for the build of a JMenu.

Author:
Damien Coraboeuf

Constructor Summary
AbstractJMenuBuilder()
           
 
Method Summary
protected  JMenu createMenu(String name, String label)
          Creates a JMenu with the given name and label.
protected  JMenuItem createMenuItem(SubscriberValidator subscriberValidator, Action swingAction)
          Creates a JMenuItem.
 
Methods inherited from class net.sf.doolin.gui.action.swing.AbstractMenuBuilder
add, addSeparator, createSeparator, noSeparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.doolin.gui.action.swing.MenuBuilder
add, clear, createSubMenu
 

Constructor Detail

AbstractJMenuBuilder

public AbstractJMenuBuilder()
Method Detail

createMenu

protected JMenu createMenu(String name,
                           String label)
Creates a JMenu with the given name and label.

Parameters:
name - Identifier for the JMenu
label - Label for the JMenu
Returns:
Configured menu
See Also:
MnemonicInfo.configureButton(javax.swing.AbstractButton)

createMenuItem

protected JMenuItem createMenuItem(SubscriberValidator subscriberValidator,
                                   Action swingAction)
Creates a JMenuItem. The visibility of the menu item is bound to the visibility property of the SwingAction.

Parameters:
subscriberValidator - Validator for the subscription on the Bus *
swingAction - Action to associate with the menu item
Returns:
Menu item


Copyright © 2011. All Rights Reserved.