Class PaintMode


  • public abstract class PaintMode
    extends java.lang.Object
    Defines a mode for disposing of a plot.
    Since:
    4 Aug 2008
    Author:
    Mark Taylor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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

      Constructors 
      Modifier Constructor Description
      protected PaintMode​(java.lang.String name)
      Constructor.
    • 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​(java.lang.String name)
        Constructor.
        Parameters:
        name - mode name
    • Method Detail

      • 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 java.lang.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 java.lang.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 java.lang.String getName()
        Returns this mode's name.
        Returns:
        name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.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