Class UnitRangeSpecifier
java.lang.Object
uk.ac.starlink.ttools.plot2.config.SpecifierPanel<Subrange>
uk.ac.starlink.ttools.plot2.config.UnitRangeSpecifier
Specifier for acquiring range for which both bounds fall between 0 and 1.
The range may be of zero extent, in which case the result can be
specified as a single value rather than a pair.
- Since:
- 15 Dec 2016
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAbstract method called lazily duringgetComponentto obtain the graphical component used by this specifier.Returns the typed value currently specified by the graphical component.booleanReturns true if the GUI is currently using the slider control, false if it's using the text fields.voidsetSliderActive(boolean isActive) Sets the GUI to use the slider rather than the text fields to acquire values.voidsetSpecifiedValue(Subrange range) Sets the typed value represented by the graphical component.voidsubmitReport(ReportMap report) Accepts information about a completed plot that was drawn with input from this specifier.Methods inherited from class SpecifierPanel
addActionListener, fireAction, getActionForwarder, getChangeForwarder, getComponent, isXFill, removeActionListener
-
Constructor Details
-
UnitRangeSpecifier
-
-
Method Details
-
createComponent
Description copied from class:SpecifierPanelAbstract method called lazily duringgetComponentto obtain the graphical component used by this specifier. It will be called a maximum of once. It is not necessary that the component actually be created in this method, for instance it may be created at construction time if that's more convenient.- Specified by:
createComponentin classSpecifierPanel<Subrange>- Returns:
- graphical component
-
getSpecifiedValue
-
setSpecifiedValue
Description copied from interface:SpecifierSets the typed value represented by the graphical component. Calling this method ought to make it clear to the user what value it is set at; in any case a subsequent call ofgetSpecifiedValueshould yield the same result.However if a value is set which is of the correct type but cannot be represented by this specifier, results are unpredictable.
- Parameters:
range- new value
-
submitReport
Description copied from interface:SpecifierAccepts information about a completed plot that was drawn with input from this specifier. In many cases, the implementation of this method will be a no-op, but it gives this object a chance to update its state or its component's appearance based on the way the plot was actually drawn, which may provide information not otherwise available to this object.- Parameters:
report- report of a plot partially specified by this object
-
isSliderActive
public boolean isSliderActive()Returns true if the GUI is currently using the slider control, false if it's using the text fields.- Returns:
- true iff slider is activated
-
setSliderActive
public void setSliderActive(boolean isActive) Sets the GUI to use the slider rather than the text fields to acquire values.- Parameters:
isActive- true for slider, false for text
-