public abstract class CoordGroup
extends java.lang.Object
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).
Modifier and Type | Method | Description |
---|---|---|
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.
|
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 usedpublic 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 usedpublic abstract int[] getRangeCoordIndices(DataGeom geom)
geom
- data geom with which indices will be usedpublic abstract boolean isSinglePartialPosition()
public static CoordGroup createSinglePositionCoordGroup()
public static CoordGroup createCoordGroup(int npos, Coord[] extras)
npos
- number of positionsextras
- non-positional coordinatespublic 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-rangepublic static CoordGroup createEmptyCoordGroup()
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.