uk.ac.starlink.ttools.plottask
Class PaintMode

java.lang.Object
  extended by uk.ac.starlink.ttools.plottask.PaintMode

public abstract class PaintMode
extends Object

Defines a mode for disposing of a plot.

Since:
4 Aug 2008
Author:
Mark Taylor

Field Summary
static PaintMode CGI_MODE
          Mode used for standard output in CGI form.
static PaintMode DISCARD_MODE
          Mode used to perform the plot internally, but produce no output.
static PaintMode SWING_MODE
          Mode used for displaying a live plot on the display.
 
Constructor Summary
protected PaintMode(String name)
          Constructor.
 
Method Summary
abstract  Painter createPainter(Environment env, PaintModeParameter param)
          Constructs a new painter object given the state of the environment.
abstract  String getDescription(PaintModeParameter modeParam)
          Returns a short XML description (no enclosing tag) of this mode's behaviour.
static PaintMode[] getKnownModes(GraphicExporter[] exporters)
          Returns a list of all available paint modes, given a list of available GraphicExporter objects.
abstract  String getModeUsage(PaintModeParameter modeParam)
          Returns a short text usage message describing usage of associated parameters, if any.
 String getName()
          Returns this mode's name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SWING_MODE

public static final PaintMode SWING_MODE
Mode used for displaying a live plot on the display.


CGI_MODE

public static final PaintMode CGI_MODE
Mode used for standard output in CGI form.


DISCARD_MODE

public static final PaintMode DISCARD_MODE
Mode used to perform the plot internally, but produce no output.

Constructor Detail

PaintMode

protected PaintMode(String name)
Constructor.

Parameters:
name - mode name
Method Detail

createPainter

public abstract Painter createPainter(Environment env,
                                      PaintModeParameter param)
                               throws TaskException
Constructs a new painter object given the state of the environment.

Parameters:
env - execution environment
param - paint mode parameter instance
Throws:
TaskException

getDescription

public abstract String getDescription(PaintModeParameter modeParam)
Returns a short XML description (no enclosing tag) of this mode's behaviour.

Parameters:
modeParam - mode parameter for context
Returns:
PCDATA

getModeUsage

public abstract String getModeUsage(PaintModeParameter modeParam)
Returns a short text usage message describing usage of associated parameters, if any. If no other parameters are referenced, an empty string should be returned.

Parameters:
modeParam - mode parameter for context
Returns:
plain text

getName

public String getName()
Returns this mode's name.

Returns:
name

toString

public String toString()
Overrides:
toString in class Object

getKnownModes

public static PaintMode[] getKnownModes(GraphicExporter[] exporters)
Returns a list of all available paint modes, given a list of available GraphicExporter objects.

Parameters:
exporters - known graphic exporters
Returns:
known paint modes


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.