|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.PlotState
public class PlotState
Characterises the details of how a plot is to be done. An instance of this class contains all the information which a plot component needs to draw a plot. There are specific subclasses for the various different plot types.
Some of the items held by this object are arrays with one element per axis. Where appropriate these can be used to hold values for the main axes, followed by values for any visible auxiliary axes.
Nested Class Summary | |
---|---|
protected static class |
PlotState.SimpleValueInfo
ValueInfo implementation which ignores information that's not relevant to plotting. |
Constructor Summary | |
---|---|
PlotState()
|
Method Summary | |
---|---|
String |
compare(PlotState o)
Returns a string giving a list of items in which this state differs from a given state o . |
boolean |
equals(Object otherObject)
|
boolean |
getAntialias()
Determines whether antialiasing is preferred for drawing lines. |
ValueInfo[] |
getAxes()
Returns the metadata for the plotted axes. |
String[] |
getAxisLabels()
Returns the labels to use for annotating axes. |
ValueConverter[] |
getConverters()
Returns the array of numeric converter objects, one for each axis. |
boolean[] |
getFlipFlags()
Returns flags for which axes will be plotted inverted. |
boolean |
getGrid()
Indicates whether a grid is to be plotted. |
boolean[] |
getLogFlags()
Returns flags for which axes will be plotted logarithmically. |
int |
getMainNdim()
Returns the number of non-auxiliary axes represented by this state. |
PlotData |
getPlotData()
Returns the plot data object for this state. |
double[][] |
getRanges()
Returns the data ranges for each axis. |
Shader[] |
getShaders()
Returns the shader objects for using auxiliary axis data. |
boolean |
getValid()
Indicates whether this state can be used to attempt a successful plot. |
int |
hashCode()
|
void |
setAntialias(boolean antialias)
Sets whether antialiasing hint is preferred for drawing lines. |
void |
setAxes(ValueInfo[] axes)
Sets the metadata for axes to be plotted. |
void |
setAxisLabels(String[] labels)
Sets the text labels to use for annotating axes. |
void |
setConverters(ValueConverter[] converters)
Sets an array of numeric converter objects, one for each axis. |
void |
setFlipFlags(boolean[] flipFlags)
Sets flags for which axes will be plotted inverted. |
void |
setGrid(boolean grid)
Sets whether a grid is to be plotted. |
void |
setLogFlags(boolean[] logFlags)
Sets flags for which axes will be plotted logarithmically. |
void |
setMainNdim(int mainNdim)
Sets the number of non-auxiliary axes represented by this state. |
void |
setPlotData(PlotData plotData)
Sets the plot data object for this state. |
void |
setRanges(double[][] ranges)
Sets data ranges for each axis. |
void |
setShaders(Shader[] shaders)
Sets the shader objects to use for modifying the colour of plotted points according to auxiliary axis data. |
void |
setValid(boolean valid)
Sets whether this state should be used to attempt a successful plot. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlotState()
Method Detail |
---|
public void setValid(boolean valid)
valid
- validity flagpublic boolean getValid()
public void setMainNdim(int mainNdim)
mainNdim
- number of normal axespublic int getMainNdim()
public void setAxes(ValueInfo[] axes)
axes
array is not used directly, the relevant information
is abstracted from it and stored (subsequent calls of getAxes()
will not return the same array or component objects).
axes
- axis metadata arraypublic ValueInfo[] getAxes()
public void setLogFlags(boolean[] logFlags)
logFlags
- log flagspublic boolean[] getLogFlags()
public void setFlipFlags(boolean[] flipFlags)
flipFlags
- flip flagspublic boolean[] getFlipFlags()
public void setGrid(boolean grid)
grid
- whether to draw a gridpublic boolean getGrid()
public void setAntialias(boolean antialias)
antialias
- true to antialias, false notpublic boolean getAntialias()
public void setRanges(double[][] ranges)
ranges
is an N-element array of 2-element double arrays.
Each of its elements gives (low,high) limits for one dimension
of the region to be displayed.
ranges
- array of (low,high) fixed range limitspublic double[][] getRanges()
setRanges(double[][])
public void setAxisLabels(String[] labels)
labels
- axis annotation strings, one for each axis that
needs labellingpublic String[] getAxisLabels()
public void setShaders(Shader[] shaders)
shaders
- shaders, one per auxiliary axispublic Shader[] getShaders()
public void setConverters(ValueConverter[] converters)
ValueConverter.unconvert(java.lang.Object)
method of these should convert a numeric value back to the
formatted (text) version of a value on the corresponding axis.
Any of the elements may be null if the value is numeric anyway.
converters
- numeric converter array, one for each axispublic ValueConverter[] getConverters()
public void setPlotData(PlotData plotData)
plotData
- plot data objectpublic PlotData getPlotData()
public boolean equals(Object otherObject)
equals
in class Object
public String compare(PlotState o)
o
. This method is used only for
debugging purposes, and may not be fully implemented at any given
time.
o
- state for comparison with this one
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |