public class TLcdMultilevelGridCoordinate extends Object implements ILcdEditableMultilevelGridCoordinate
ILcdEditableMultilevelGridCoordinate
that
dynamically adapts the number of levels.Constructor and Description |
---|
TLcdMultilevelGridCoordinate()
Constructs an editable multilevel grid coordinate with 5 levels and 2 axes.
|
TLcdMultilevelGridCoordinate(int aInitialLevelCount)
Constructs an editable multilevel grid coordinate with the given number of levels and 2 axes.
|
Modifier and Type | Method and Description |
---|---|
ILcdEditableMultilevelGridCoordinate |
cloneAsEditableMultilevelCoordinate()
Returns a copy of this object that can be edited.
|
int |
getCoordinate(int aLevel,
int aAxis)
Returns the value of the coordinate at the given level and axis.
|
int |
getCoordinateLevelCount()
Returns how many levels of this coordinate are taken into account.
|
void |
setCoordinate(int aLevel,
int aAxis,
int aCoordinate)
Sets the value of the coordinate at the given level for the given axis.
|
void |
setCoordinateLevelCount(int aLevelCount)
Sets how many levels of this coordinates are taken into account.
|
String |
toString()
Returns a string containing the number of levels up to which the multilevel grid coordinate
is specified and the coordinates grouped per level.
|
public TLcdMultilevelGridCoordinate()
public TLcdMultilevelGridCoordinate(int aInitialLevelCount)
aInitialLevelCount
- the number of levels the multilevel grid coordinate should contain on initialization.public void setCoordinate(int aLevel, int aAxis, int aCoordinate)
setCoordinateLevelCount(int)
.setCoordinate
in interface ILcdEditableMultilevelGridCoordinate
aLevel
- the level for which to set the valueaAxis
- the axis for which to set the valueaCoordinate
- the new value of the coordinategetCoordinate(int, int)
public void setCoordinateLevelCount(int aLevelCount)
setCoordinateLevelCount
in interface ILcdEditableMultilevelGridCoordinate
aLevelCount
- the number of levels which should be taken into account for this multilevel grid coordinate.getCoordinateLevelCount()
public int getCoordinate(int aLevel, int aAxis)
getCoordinate
in interface ILcdMultilevelGridCoordinate
aLevel
- the level for which to retrieve the coordinate value for.aAxis
- the axis for which to retrieve the coordinate value for.setCoordinate(int, int, int)
public int getCoordinateLevelCount()
ILcdMultilevelGridCoordinate
ILcdMultilevelGridCoordinate.getCoordinate(int, int)
should only be called for levels strictly smaller than the count returned by this
method.getCoordinateLevelCount
in interface ILcdMultilevelGridCoordinate
public ILcdEditableMultilevelGridCoordinate cloneAsEditableMultilevelCoordinate()
ILcdMultilevelGridCoordinate
cloneAsEditableMultilevelCoordinate
in interface ILcdMultilevelGridCoordinate
public String toString()