public abstract class CoordGroup extends 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 and Description |
---|---|
static CoordGroup |
createCoordGroup(int nBasicPos,
Coord[] extras)
Returns a coord group which contains zero or more basic positions and
zero or more additional non-positional ("extra") coordinates.
|
static CoordGroup |
createCoordGroup(int nBasicPos,
Coord[] extras,
int nExtraPos)
Returns a coord group with zero or more basic positions and
zero or more extra coordinates, some of which may be positional.
|
static CoordGroup |
createEmptyCoordGroup()
Returns a coord group with no coordinates.
|
static CoordGroup |
createNoBasicCoordGroup(Coord[] coords,
int nExtraPos,
boolean[] rangeCoordFlags)
Returns a coord group with no basic positional 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 |
getBasicPositionCount()
Returns the number of basic data positions per tuple.
|
abstract int |
getExtraCoordIndex(int iExtra,
DataGeom geom)
Returns the coordinate index in a DataSpec at which
a given one of the extra coordinates represented
by this coord group will appear.
|
abstract Coord[] |
getExtraCoords() |
abstract int |
getExtraPositionCount()
Returns a count of the extra coordinates that can
be considered to represent data positions.
|
abstract int |
getPosCoordIndex(int ipos,
DataGeom geom)
Returns the starting coordinate index in a DataSpec at which
a given one of the basic positional coordinates represented
by this coord group will appear.
|
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 getBasicPositionCount()
public abstract Coord[] getExtraCoords()
public abstract int getExtraPositionCount()
These positional coordinates are assumed to come at the start of the list of extra coordinates.
public abstract int getPosCoordIndex(int ipos, DataGeom geom)
ipos
- index of basic 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 extra 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 nBasicPos, Coord[] extras)
nBasicPos
- number of basic positional coordinatesextras
- non-positional coordinatespublic static CoordGroup createCoordGroup(int nBasicPos, Coord[] extras, int nExtraPos)
nBasicPos
- number of basic positional coordinatesextras
- additional coordinatesnExtraPos
- number of extra coordinates which are positionalpublic static CoordGroup createNoBasicCoordGroup(Coord[] coords, int nExtraPos, boolean[] rangeCoordFlags)
coords
- all coordinatesnExtraPos
- number of the extra coordinates which can be
considered to represent data positionsrangeCoordFlags
- array of flags corresponding to the
coords
array, true for any coord whose change
should cause a re-rangepublic 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 © 2025 Central Laboratory of the Research Councils. All Rights Reserved.