Class AutoSpecifier<T>

java.lang.Object
uk.ac.starlink.ttools.plot2.config.SpecifierPanel<T>
uk.ac.starlink.topcat.plot2.AutoSpecifier<T>
All Implemented Interfaces:
uk.ac.starlink.ttools.plot2.config.Specifier<T>

public class AutoSpecifier<T> extends uk.ac.starlink.ttools.plot2.config.SpecifierPanel<T>
Decorates a specifier with an Auto button. This is a checkbox which if checked overrides the state of the base specifier and returns an alternative externally supplied value instead.
Since:
13 Mar 2013
Author:
Mark Taylor
  • Constructor Summary

    Constructors
    Constructor
    Description
    AutoSpecifier(uk.ac.starlink.ttools.plot2.config.Specifier<T> base)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected JComponent
     
    Returns the value that will be returend when the auto button is on.
     
    boolean
    Indicates whether the auto button is on or off.
    void
    setAuto(boolean isAuto)
    Sets whether the auto button is on or off.
    void
    setAutoValue(T autoValue)
    Sets the value specified when the auto button is on.
    void
     
    void
    submitReport(uk.ac.starlink.ttools.plot2.ReportMap report)
     

    Methods inherited from class uk.ac.starlink.ttools.plot2.config.SpecifierPanel

    addActionListener, fireAction, getActionForwarder, getChangeForwarder, getComponent, isXFill, removeActionListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AutoSpecifier

      public AutoSpecifier(uk.ac.starlink.ttools.plot2.config.Specifier<T> base)
      Constructor.
      Parameters:
      base - base specifier
  • Method Details

    • createComponent

      protected JComponent createComponent()
      Specified by:
      createComponent in class uk.ac.starlink.ttools.plot2.config.SpecifierPanel<T>
    • setAutoValue

      public void setAutoValue(T autoValue)
      Sets the value specified when the auto button is on.
      Parameters:
      autoValue - new auto value
    • getAutoValue

      public T getAutoValue()
      Returns the value that will be returend when the auto button is on.
      Returns:
      auto value
    • setAuto

      public void setAuto(boolean isAuto)
      Sets whether the auto button is on or off.
      Parameters:
      isAuto - true for automatic values
    • isAuto

      public boolean isAuto()
      Indicates whether the auto button is on or off.
      Returns:
      true iff the auto value will be returned
    • getSpecifiedValue

      public T getSpecifiedValue()
    • setSpecifiedValue

      public void setSpecifiedValue(T value)
    • submitReport

      public void submitReport(uk.ac.starlink.ttools.plot2.ReportMap report)