dsto.dfc.swing.commands
Interface CustomMenuProvider

All Known Implementing Classes:
AbstractBooleanCommand, AbstractCompositeCommand, AbstractEnumeratedCommand, CompositeCmdMenuProvider, EnumeratedCmdMenuProvider

public interface CustomMenuProvider

Interface for commands that want to provide a custom menu UI.

Version:
$Revision$

Method Summary
 void addChangeListener(ChangeListener l)
          Custom menu providers should fire change events when the menu UI needs to be updated.
 List createMenuItems()
          Create the menu items that represent the UI for the command.
 void destroyMenuItems(List items)
          Destroy menu items created by createMenuItems ().
 void removeChangeListener(ChangeListener l)
           
 

Method Detail

createMenuItems

List createMenuItems()
Create the menu items that represent the UI for the command.

Returns:
A new list of JComponent's to be added to the menu for the command.

destroyMenuItems

void destroyMenuItems(List items)
Destroy menu items created by createMenuItems ().


addChangeListener

void addChangeListener(ChangeListener l)
Custom menu providers should fire change events when the menu UI needs to be updated. This event will trigger any interested listeners to destroy old menu items (destroyMenuItems ()) and create new ones (createMenuItems ()).


removeChangeListener

void removeChangeListener(ChangeListener l)


Copyright © 2008 Commonwealth of Australia