org.virion.jam.controlpalettes
Interface Controller

All Known Implementing Classes:
AbstractController, LabelPainterController, MultipleTreeViewerController, NodeBarController, NodeShapeController, PolarTreeLayoutController, RadialTreeLayoutController, RectilinearTreeLayoutController, ScaleBarPainterController, TreeAppearanceController, TreePaneController, TreeViewerController

public interface Controller

Author:
Andrew Rambaut

Method Summary
 void addControllerListener(ControllerListener listener)
          Add a ControllerListener to this controllers list of listeners The main listener will be the ControlPalette itself which will use this to resize the panels if the components changed
 JPanel getPanel()
          Get a JPanel which is the main section for the palette.
 void getSettings(Map<String,Object> settings)
          Collect the settings for this controller.
 JComponent getTitleComponent()
          Get a component that will be put in the title bar of the palette section.
 void initialize()
          Initialize this controller when a new document is created.
 boolean isInitiallyVisible()
           
 void removeControllerListener(ControllerListener listener)
          Remove a listener
 void setSettings(Map<String,Object> settings)
          Set the settings for this controller.
 

Method Detail

getTitleComponent

JComponent getTitleComponent()
Get a component that will be put in the title bar of the palette section. If a simple text title is required, this should return a JLabel.

Returns:
A component

getPanel

JPanel getPanel()
Get a JPanel which is the main section for the palette.

Returns:
A panel

isInitiallyVisible

boolean isInitiallyVisible()
Returns:
whether the panel should be open or closed initially

initialize

void initialize()
Initialize this controller when a new document is created. At this point, settings can be adjusted to match the contents of the document.


getSettings

void getSettings(Map<String,Object> settings)
Collect the settings for this controller. These should be stored in the given settings map using string keys.

Parameters:
settings - the settings map

setSettings

void setSettings(Map<String,Object> settings)
Set the settings for this controller. These will have been stored as a map by the getSettings function.

Parameters:
settings - the settings map

addControllerListener

void addControllerListener(ControllerListener listener)
Add a ControllerListener to this controllers list of listeners The main listener will be the ControlPalette itself which will use this to resize the panels if the components changed

Parameters:
listener - the controller listener

removeControllerListener

void removeControllerListener(ControllerListener listener)
Remove a listener

Parameters:
listener - the controller listener