net.sf.doolin.gui.action.swing
Interface MenuBuilder

All Known Implementing Classes:
AbstractJMenuBuilder, AbstractMenuBuilder, JButtonBarBuilder, JMenuBarBuilder, JMenuBuilder, JPopupMenuBuilder, JToolBarBuilder

public interface MenuBuilder

Defines a builder for a menu-like component. It can be menu bars, tool bars, etc.

Author:
Damien Coraboeuf

Method Summary
 void add(JComponent component)
          Adds a direct component in this menu
 void add(SubscriberValidator subscriberValidator, Action swingAction)
          Adds a single action to the builder
 void addSeparator()
          Adds a separator for this menu
 void clear()
          Removes all entries from the underlying component
 MenuBuilder createSubMenu(String name, String label)
          Creates a sub-menu builder from this builder
 

Method Detail

createSubMenu

MenuBuilder createSubMenu(String name,
                          String label)
Creates a sub-menu builder from this builder

Parameters:
name - Identifier for the sub-menu
label - Label for the sub-menu
Returns:
Builder for the sub-menu

addSeparator

void addSeparator()
Adds a separator for this menu


add

void add(JComponent component)
Adds a direct component in this menu

Parameters:
component - Component to add

add

void add(SubscriberValidator subscriberValidator,
         Action swingAction)
Adds a single action to the builder

Parameters:
subscriberValidator - Validator for any subscription on the Bus *
swingAction - Action to add

clear

void clear()
Removes all entries from the underlying component



Copyright © 2011. All Rights Reserved.