Class TLspLabelPlacement

java.lang.Object
com.luciad.view.lightspeed.label.TLspLabelPlacement

public class TLspLabelPlacement extends Object

A label placement defines a location of a label. This location is specified by an ALspLabelLocation and label bounds.

The label bounds is a rotated rectangle expressed in view coordinates (pixels), see illustration.

obstacle

A TLspLabelPlacement is always created for a specific TLspLabelID, which is also stored inside this class.

Since:
2012.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    TLspLabelPlacement(TLspLabelID aId, ALspLabelLocation aLocation, boolean aVisible, double aX, double aY, double aWidth, double aHeight, double aRotation)
    Creates a new label placement for the given label, with the given location, visibility and rotated bounds (in view coordinates).
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the cached cosine value of the rotation in this label placement.
    double
    Returns the height of the bounds, in view coordinates.
    Returns the placements label.
    Returns the label location.
    double
    Returns the rotation of the label bounds around its anchor point.
    double
    Returns the cached sine value of the rotation in this label placement.
    double
    Returns the width of the bounds, in view coordinates.
    double
    Returns the x coordinate of the upper left corner of the bounds, in view coordinates.
    double
    Returns the y coordinate of the upper left corner of the bounds, in view coordinates.
    boolean
    Returns the label visibility.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLspLabelPlacement

      public TLspLabelPlacement(TLspLabelID aId, ALspLabelLocation aLocation, boolean aVisible, double aX, double aY, double aWidth, double aHeight, double aRotation)
      Creates a new label placement for the given label, with the given location, visibility and rotated bounds (in view coordinates).
      Parameters:
      aId - the label.
      aLocation - the location.
      aVisible - the visibility.
      aX - the x coordinate of the upper left corner of the bounds, in view coordinates.
      aY - the y coordinate of the upper left corner of the bounds, in view coordinates.
      aWidth - the width of the bounds, in view coordinates.
      aHeight - the height of the bounds, in view coordinates.
      aRotation - the rotation of the bounds, given in radians, clockwise and with 0 radians at 3 o'clock.
  • Method Details

    • getLabelID

      public TLspLabelID getLabelID()
      Returns the placements label.
      Returns:
      the placements label.
    • getLocation

      public ALspLabelLocation getLocation()
      Returns the label location.
      Returns:
      the label location.
    • isVisible

      public boolean isVisible()
      Returns the label visibility.
      Returns:
      the label visibility.
    • getX

      public double getX()
      Returns the x coordinate of the upper left corner of the bounds, in view coordinates.
      Returns:
      the x coordinate of the upper left corner of the bounds, in view coordinates.
    • getY

      public double getY()
      Returns the y coordinate of the upper left corner of the bounds, in view coordinates.
      Returns:
      the y coordinate of the upper left corner of the bounds, in view coordinates.
    • getWidth

      public double getWidth()
      Returns the width of the bounds, in view coordinates.
      Returns:
      the width of the bounds, in view coordinates.
    • getHeight

      public double getHeight()
      Returns the height of the bounds, in view coordinates.
      Returns:
      the height of the bounds, in view coordinates.
    • getRotation

      public double getRotation()
      Returns the rotation of the label bounds around its anchor point. This rotation is given in radians, clockwise and with 0 radians at 3 o'clock.
      Returns:
      the rotation of the bounds.
    • getSinRotation

      public double getSinRotation()
      Returns the cached sine value of the rotation in this label placement.
      Returns:
      the cached sine value of the rotation in this label placement.
      See Also:
    • getCosRotation

      public double getCosRotation()
      Returns the cached cosine value of the rotation in this label placement.
      Returns:
      the cached cosine value of the rotation in this label placement.
      See Also: