Class PaintMode

java.lang.Object
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 Details

    • 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 Details

    • PaintMode

      protected PaintMode(String name)
      Constructor.
      Parameters:
      name - mode name
  • Method Details

    • createPainter

      public abstract Painter createPainter(uk.ac.starlink.task.Environment env, PaintModeParameter param) throws uk.ac.starlink.task.TaskException
      Constructs a new painter object given the state of the environment.
      Parameters:
      env - execution environment
      param - paint mode parameter instance
      Throws:
      uk.ac.starlink.task.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