uk.ac.starlink.topcat.plot2
Class LayerControlAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by uk.ac.starlink.topcat.BasicAction
          extended by uk.ac.starlink.topcat.plot2.LayerControlAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public abstract class LayerControlAction
extends BasicAction

Action for adding a single-plotter layer control to the plot stack.

Since:
25 Jul 2013
Author:
Mark Taylor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
LayerControlAction(uk.ac.starlink.ttools.plot2.Plotter plotter, ControlStack stack)
          Constructs a LayerControlAction from a Plotter.
LayerControlAction(String name, Icon layerIcon, String descrip, ControlStack stack)
          Constructs a LayerControlAction from name, icon and description.
 
Method Summary
 void actionPerformed(ActionEvent evt)
           
abstract  LayerControl createLayerControl()
          Creates a layer control for this action's plotter.
static LayerControlAction createPlotterAction(uk.ac.starlink.ttools.plot2.Plotter plotter, ControlStack stack, TypedListModel<TopcatModel> tablesModel, ZoneFactory zfact, NextSupplier nextSupplier, TopcatListener tcListener, MultiConfigger baseConfigger)
          Attempts to return an instance of this class corresponding to a given plotter.
 
Methods inherited from class uk.ac.starlink.topcat.BasicAction
getEventWindow
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerControlAction

public LayerControlAction(String name,
                          Icon layerIcon,
                          String descrip,
                          ControlStack stack)
Constructs a LayerControlAction from name, icon and description.

Parameters:
name - action name
layerIcon - icon representing the type of layer the action will add; it may get doctored to generate the icon for this action
descrip - action description
stack - plot stack

LayerControlAction

public LayerControlAction(uk.ac.starlink.ttools.plot2.Plotter plotter,
                          ControlStack stack)
Constructs a LayerControlAction from a Plotter.

Parameters:
plotter - plotter which will be added to the stack
stack - plot stack
Method Detail

createLayerControl

public abstract LayerControl createLayerControl()
Creates a layer control for this action's plotter.

Returns:
new layer control

actionPerformed

public void actionPerformed(ActionEvent evt)

createPlotterAction

public static LayerControlAction createPlotterAction(uk.ac.starlink.ttools.plot2.Plotter plotter,
                                                     ControlStack stack,
                                                     TypedListModel<TopcatModel> tablesModel,
                                                     ZoneFactory zfact,
                                                     NextSupplier nextSupplier,
                                                     TopcatListener tcListener,
                                                     MultiConfigger baseConfigger)
Attempts to return an instance of this class corresponding to a given plotter. If no suitable implementation is available, null is returned.

Parameters:
plotter - plotter to provide an action for
stack - stack to which controls are to be added
tablesModel - list of available tables
zfact - zone id factory
nextSupplier - manages global dispensing for some style options
tcListener - listener for TopcatEvents
baseConfigger - configuration source for some global config options
Returns:
new action to add plotter control to stack, or null


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.