Class AbstractSurfaceShape.SurfaceShapeStateKey

  • All Implemented Interfaces:
    Cacheable
    Enclosing class:
    AbstractSurfaceShape

    protected static class AbstractSurfaceShape.SurfaceShapeStateKey
    extends AbstractSurfaceObject.SurfaceObjectStateKey
    Represents a surface shapes's current state. SurfaceShapeStateKey extends AbstractSurfaceObject.SurfaceObjectStateKey by adding the shape's current ShapeAttributes and the globe's state key.

    SurfaceShapeStateKey uniquely identifies a surface shapes's current state exactly as SurfaceObjectStateKey does, but also distinguishes the shape's active ShapeAttributes from any previous attributes, and distinguishes between different globes via the globe state key.

    • Field Detail

      • attributes

        protected final ShapeAttributes attributes
        The SurfaceShape's attributes. May be null if the shape has no attributes.
      • globeStateKey

        protected final java.lang.Object globeStateKey
        The Globe's state key. May be null if the shape's state does not depend on the globe.
    • Constructor Detail

      • SurfaceShapeStateKey

        public SurfaceShapeStateKey​(long uniqueID,
                                    long modifiedTime,
                                    ShapeAttributes attributes,
                                    java.lang.Object globeStateKey)
        Constructs a new SurfaceShapeStateKey with the specified unique ID, modified time, attributes, and globe state key. The globe state key should be null if the surface shape does not depend on the globe.
        Parameters:
        uniqueID - the SurfaceShape's unique ID.
        modifiedTime - the SurfaceShape's modified time.
        attributes - the SurfaceShape's attributes, or null if the shape has no attributes.
        globeStateKey - the globe's state key, or null if the shape does not depend on the globe.
        See Also:
        Globe.getStateKey(DrawContext)