gcspy.vis.plugins
Class PluginListener

java.lang.Object
  extended by gcspy.vis.plugins.PluginListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
HistogramListener, HistoryListener, TextListener

public abstract class PluginListener
extends java.lang.Object
implements java.awt.event.ActionListener

A plugin view called MyView must provide a PluginListener called MyViewListener. This listener's actionPerformed will be called when the user clicks its button attached to a space in the visualiser's main view.

Author:
Richard Jones

Field Summary
protected  TileManagerColors colorConfig
          The tile manager colours for this space
protected  ClientInterpreter interpreter
          The Client Interpretet
protected  AbstractFrame owner
          The frame that owns this plugin
protected  java.util.List<PluginFrame> pluginFrames
          A The list of plugin frames known to the space manager
protected  int selectedStream
          The stream (if any) to be visualised
protected  ClientSpace space
          The client space being visualised
 
Constructor Summary
protected PluginListener(java.lang.String label)
          Create a new listener for this view.
 
Method Summary
 java.lang.String getLabel()
          Get the name of this view
 void init(AbstractFrame owner, java.util.List<PluginFrame> pluginFrames, ClientInterpreter interpreter, ClientSpace space, int selectedStream, TileManagerColors colorConfig)
          Initialise this view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

owner

protected AbstractFrame owner
The frame that owns this plugin


pluginFrames

protected java.util.List<PluginFrame> pluginFrames
A The list of plugin frames known to the space manager


interpreter

protected ClientInterpreter interpreter
The Client Interpretet


space

protected ClientSpace space
The client space being visualised


selectedStream

protected int selectedStream
The stream (if any) to be visualised


colorConfig

protected TileManagerColors colorConfig
The tile manager colours for this space

Constructor Detail

PluginListener

protected PluginListener(java.lang.String label)
Create a new listener for this view. Any subclass must provide a constructor with exactly this signature.

Parameters:
label - Text for a label to launch this view
Method Detail

init

public void init(AbstractFrame owner,
                 java.util.List<PluginFrame> pluginFrames,
                 ClientInterpreter interpreter,
                 ClientSpace space,
                 int selectedStream,
                 TileManagerColors colorConfig)
Initialise this view. This is necessary because instances of PluginListeners are created by the PluginManager with only a label as an argument, but are initialised by the a SpaceManager.

Parameters:
owner - The owning frame
pluginFrames - The list of plugin frames
interpreter - The client interpreter
space - The client space
selectedStream - The stream (if any) visualised
colorConfig - The tile manager colors to use

getLabel

public java.lang.String getLabel()
Get the name of this view

Returns:
the text used for this listener