uk.ac.man.bioinf.apps.cinema.utils
Class CinemaMenuBuilder
java.lang.Object
|
+--uk.ac.man.bioinf.module.Module
|
+--uk.ac.man.bioinf.apps.xml.XMLModule
|
+--uk.ac.man.bioinf.apps.cinema.CinemaModule
|
+--uk.ac.man.bioinf.apps.cinema.utils.CinemaMenuBuilder
- All Implemented Interfaces:
- AlignmentEventProvider
- public class CinemaMenuBuilder
- extends CinemaModule
CinemaMenuBuilder.java
This class builds a menu system based upon the module configuration
information.
The format of the config info should look something like this...
<!-- The File Menu -->
<node>
<value>File</value>
<node>
<!-- Provides the open alignment -->
<name>SEQ_INPUT</name>
</node>
<node>
<!-- Provides the save alignment -->
<name>SEQ_OUTPUT</name>
</node>
</node>
<!-- The Colour Selector -->
<node>
<value>Colour Selector</value>
<node>
<name>CINEMA_COLOR_SELECTOR</name>
</node>
</node>
</node>
Essentially a "Value" is translated as the title of a menu whilst
"name" is translated as a Module which will provide actions for
that menu. This makes arbitrarily deep menu systems to be
constructed.
Created: Fri Oct 13 15:26:26 2000
- Version:
- $Id: CinemaMenuBuilder.java,v 1.5 2001/04/11 17:04:42 lord Exp $
- Author:
- Phillip Lord
Methods inherited from class uk.ac.man.bioinf.apps.cinema.CinemaModule |
addAlignmentListener, addCinemaPropertyChangeListener, addCinemaPropertyChangeListener, addVetoableAlignmentListener, clearSequenceTitleColor, destroy, fireCinemaPropertyChange, getAlignmentSelectionModel, getColorMap, getRequiredIdentifiers, getSequenceAlignment, removeAlignmentListener, removeCinemaPropertyChangeListener, removeCinemaPropertyChangeListener, removeVetoableAlignmentListener, sendStatusMessage, setAlignmentSelectionModel, setColorMap, setSequenceAlignment, setSequenceTitleColor |
Methods inherited from class uk.ac.man.bioinf.module.Module |
addPropertyChangeListener, addPropertyChangeListener, finalize, firePropertyChange, firePropertyChange, firePropertyChange, getContext, getIdentifier, getRequiredModule, getRequiredModules, hasListeners, isDestroyed, isStarted, load, removePropertyChangeListener, removePropertyChangeListener, runStart, setContext, start |
CinemaMenuBuilder
public CinemaMenuBuilder()
buildMenu
public void buildMenu(CinemaAlignmentFrame frame,
JMenuBar menuBar,
ConfigNode[] mainMenuItems)
- This is the build method. The ConfigNode should be the root nodes
which describe the menu system.
- Parameters:
frame
- this is optional and can be null. If it is present
then it will be passed to those menu items which require it.menuBar
- this is the JMenuBar to use.mainMenuItems
- this are there configuration nodes which
describe the menu system.
getVersion
public String getVersion()
- Description copied from class:
Module
- Returns the version of this module.
- Specified by:
getVersion
in class Module
- Returns:
- the version