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

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

public abstract class AbstractMenuBuilder
extends Object
implements MenuBuilder

Base implementation for the MenuBuilder implementation. It provides the support for dealing with the separators.

Author:
Damien Coraboeuf

Constructor Summary
AbstractMenuBuilder()
           
 
Method Summary
 void add(JComponent component)
          Adds a direct component in this menu
 void addSeparator()
          Checks if a separator has been created before before creating a new one.
protected abstract  void createSeparator()
          This method is called when a sub-class must create a separator.
protected  void noSeparator()
          This method must be called by sub-classes whenever they create a component which is not a separator.
 
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

AbstractMenuBuilder

public AbstractMenuBuilder()
Method Detail

addSeparator

public void addSeparator()
Checks if a separator has been created before before creating a new one.

Specified by:
addSeparator in interface MenuBuilder

add

public void add(JComponent component)
Description copied from interface: MenuBuilder
Adds a direct component in this menu

Specified by:
add in interface MenuBuilder
Parameters:
component - Component to add

noSeparator

protected void noSeparator()
This method must be called by sub-classes whenever they create a component which is not a separator.


createSeparator

protected abstract void createSeparator()
This method is called when a sub-class must create a separator.



Copyright © 2011. All Rights Reserved.