DensityPlotState
, HistogramPlotState
, LinesPlotState
, Plot3DState
public class PlotState
extends java.lang.Object
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.
Modifier and Type | Class | Description |
---|---|---|
protected static class |
PlotState.SimpleValueInfo |
ValueInfo implementation which ignores information that's not
relevant to plotting.
|
Constructor | Description |
---|---|
PlotState() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
compare(PlotState o) |
Returns a string giving a list of items in which this state differs
from a given state
o . |
boolean |
equals(java.lang.Object otherObject) |
|
boolean |
getAntialias() |
Determines whether antialiasing is preferred for drawing lines.
|
uk.ac.starlink.table.ValueInfo[] |
getAxes() |
Returns the metadata for the plotted axes.
|
java.lang.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(uk.ac.starlink.table.ValueInfo[] axes) |
Sets the metadata for axes to be plotted.
|
void |
setAxisLabels(java.lang.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.
|
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(uk.ac.starlink.table.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 uk.ac.starlink.table.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(java.lang.String[] labels)
labels
- axis annotation strings, one for each axis that
needs labellingpublic java.lang.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(java.lang.Object otherObject)
equals
in class java.lang.Object
public java.lang.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 onepublic int hashCode()
hashCode
in class java.lang.Object
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.