Class TLcdMultilevelGridCoordinate

java.lang.Object
com.luciad.view.map.multilevelgrid.TLcdMultilevelGridCoordinate
All Implemented Interfaces:
ILcdEditableMultilevelGridCoordinate, ILcdMultilevelGridCoordinate

public class TLcdMultilevelGridCoordinate extends Object implements ILcdEditableMultilevelGridCoordinate
An implementation of an ILcdEditableMultilevelGridCoordinate that dynamically adapts the number of levels.
Since:
7.0
  • Constructor Details

    • TLcdMultilevelGridCoordinate

      public TLcdMultilevelGridCoordinate()
      Constructs an editable multilevel grid coordinate with 5 levels and 2 axes.
    • TLcdMultilevelGridCoordinate

      public TLcdMultilevelGridCoordinate(int aInitialLevelCount)
      Constructs an editable multilevel grid coordinate with the given number of levels and 2 axes.
      Parameters:
      aInitialLevelCount - the number of levels the multilevel grid coordinate should contain on initialization.
  • Method Details

    • setCoordinate

      public void setCoordinate(int aLevel, int aAxis, int aCoordinate)
      Sets the value of the coordinate at the given level for the given axis. When the level passed is higher than the number of levels the number of available levels is adapted. Note that this does not change the number of levels of this coordinate which are taken into account by other methods. For this you have to call setCoordinateLevelCount(int).
      Specified by:
      setCoordinate in interface ILcdEditableMultilevelGridCoordinate
      Parameters:
      aLevel - the level for which to set the value
      aAxis - the axis for which to set the value
      aCoordinate - the new value of the coordinate
      See Also:
    • setCoordinateLevelCount

      public void setCoordinateLevelCount(int aLevelCount)
      Sets how many levels of this coordinates are taken into account. This means that all levels of this coordinate are taken into account up to, but not including, the specified value. If the number of levels is higher than the number of levels available, the coordinate will adapt internally.
      Specified by:
      setCoordinateLevelCount in interface ILcdEditableMultilevelGridCoordinate
      Parameters:
      aLevelCount - the number of levels which should be taken into account for this multilevel grid coordinate.
      See Also:
    • getCoordinate

      public int getCoordinate(int aLevel, int aAxis)
      Returns the value of the coordinate at the given level and axis. Note that this method does not adapt the number of levels available for the coordinate.
      Specified by:
      getCoordinate in interface ILcdMultilevelGridCoordinate
      Parameters:
      aLevel - the level for which to retrieve the coordinate value for.
      aAxis - the axis for which to retrieve the coordinate value for.
      Returns:
      the value of the coordinate at the given level and axis.
      See Also:
    • getCoordinateLevelCount

      public int getCoordinateLevelCount()
      Description copied from interface: ILcdMultilevelGridCoordinate
      Returns how many levels of this coordinate are taken into account. This means that all levels of this coordinate are taken into account up to, but not including, the returned value. Note that this is not necessarily the total number of levels which could be specified for this coordinate. The method ILcdMultilevelGridCoordinate.getCoordinate(int, int) should only be called for levels strictly smaller than the count returned by this method.
      Specified by:
      getCoordinateLevelCount in interface ILcdMultilevelGridCoordinate
      Returns:
      the number of levels taken into account for this multilevel grid coordinate.
    • cloneAsEditableMultilevelCoordinate

      public ILcdEditableMultilevelGridCoordinate cloneAsEditableMultilevelCoordinate()
      Description copied from interface: ILcdMultilevelGridCoordinate
      Returns a copy of this object that can be edited. Changing the coordinates or number of specified levels of the copy should not change the coordinates of the original.
      Specified by:
      cloneAsEditableMultilevelCoordinate in interface ILcdMultilevelGridCoordinate
      Returns:
      a copy of this object that can be edited.
    • toString

      public 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.
      Overrides:
      toString in class Object
      Returns:
      a string containing the number of levels up to which the multilevel grid coordinate is specified and the coordinates grouped per level.