|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.data.CoordGroup
public abstract class CoordGroup
Expresses the content of a set of coordinates used for a plot layer, and how to find the values of these coordinates from a corresponding DataSpec. A given CoordGroup instance is tied to a particular arrangement of corresponding DataSpec objects.
This abstraction is defined in a somewhat ad hoc way at present; features have been introduced according to what is required from existing plotters. It may be changed or rationalised in the future. That is one reason this functionality is split out into its own class rather than being part of the Plotter interface itself, and also why implementation of this class is controlled (instances only available from factory methods of this class).
Method Summary | |
---|---|
static CoordGroup |
createCoordGroup(int npos,
Coord[] extras)
Returns a coord group which contains zero or more positions and zero or more additional ("extra") coordinates. |
static CoordGroup |
createEmptyCoordGroup()
Returns a coord group with no coordinates. |
static CoordGroup |
createPartialCoordGroup(Coord[] coords,
boolean[] rangeCoordFlags)
Returns a coord group which contains a single partial position. |
static CoordGroup |
createSinglePositionCoordGroup()
Returns a coord group which contains only a single data space position. |
abstract int |
getExtraCoordIndex(int iExtra,
DataGeom geom)
Returns the coordinate index in a DataSpec at which a given one of the non-positional coordinates represented by this coord group will appear. |
abstract Coord[] |
getExtraCoords()
|
abstract int |
getPosCoordIndex(int ipos,
DataGeom geom)
Returns the starting coordinate index in a DataSpec at which a given one of the positional coordinates represented by this coord group will appear. |
abstract int |
getPositionCount()
Returns the number of data positions per tuple used by this plotter. |
abstract int[] |
getRangeCoordIndices(DataGeom geom)
Returns a list of the coordinate indices in a DataSpec of those coordinates whose change should trigger a re-range of the plot surface. |
abstract boolean |
isSinglePartialPosition()
Indicates whether this group deals with "partial" positions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract int getPositionCount()
public abstract Coord[] getExtraCoords()
public abstract int getPosCoordIndex(int ipos, DataGeom geom)
ipos
- index of position supplied by this group
(first position is zero)geom
- data geom with which index will be used
public abstract int getExtraCoordIndex(int iExtra, DataGeom geom)
iExtra
- index of non-positional coordinate
(first extra coord is zero)geom
- data geom with which index will be used
public abstract int[] getRangeCoordIndices(DataGeom geom)
geom
- data geom with which indices will be used
public abstract boolean isSinglePartialPosition()
public static CoordGroup createSinglePositionCoordGroup()
public static CoordGroup createCoordGroup(int npos, Coord[] extras)
npos
- number of positionsextras
- non-positional coordinates
public static CoordGroup createPartialCoordGroup(Coord[] coords, boolean[] rangeCoordFlags)
coords
- all coordinates, starting with those constituting
the partial positionrangeCoordFlags
- array of flags corresponding to the
coords
array, true for any coord whose change
should cause a re-range
public static CoordGroup createEmptyCoordGroup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |