Class KMLSurfacePolygonImpl

    • Field Detail

      • highlightAttributesResolved

        protected boolean highlightAttributesResolved
      • normalAttributesResolved

        protected boolean normalAttributesResolved
      • mustApplyRotation

        protected boolean mustApplyRotation
        Flag to indicate the rotation must be applied to the SurfaceImage. Rotation is applied the first time that the image is rendered.
    • Constructor Detail

      • KMLSurfacePolygonImpl

        public KMLSurfacePolygonImpl​(KMLTraversalContext tc,
                                     KMLPlacemark placemark,
                                     KMLAbstractGeometry geom)
        Create an instance.
        Parameters:
        tc - the current KMLTraversalContext.
        placemark - the Placemark element containing the LineString.
        geom - the KMLPolygon geometry.
        Throws:
        java.lang.NullPointerException - if the geometry is null.
        java.lang.IllegalArgumentException - if the parent placemark or the traversal context is null.
      • KMLSurfacePolygonImpl

        public KMLSurfacePolygonImpl​(KMLTraversalContext tc,
                                     KMLGroundOverlay overlay)
        Create a surface polygon from a KML GroundOverlay.
        Parameters:
        tc - the current KMLTraversalContext.
        overlay - the KMLGroundOverlay to render as a polygon.
        Throws:
        java.lang.NullPointerException - if the geometry is null.
        java.lang.IllegalArgumentException - if the parent placemark or the traversal context is null.
    • Method Detail

      • createPickedObject

        protected PickedObject createPickedObject​(DrawContext dc,
                                                  java.awt.Color pickColor)
        Create a PickedObject for this surface object. The PickedObject created by this method will be added to the pick list to represent the current surface object.
        Overrides:
        createPickedObject in class AbstractSurfaceObject
        Parameters:
        dc - Active draw context.
        pickColor - Unique color for this PickedObject.
        Returns:
        A new picked object.
      • makeAttributesCurrent

        protected ShapeAttributes makeAttributesCurrent​(java.lang.String attrType)
        Determine and set the Path highlight attributes from the KML Feature fields.
        Parameters:
        attrType - the type of attributes, either KMLConstants.NORMAL or KMLConstants.HIGHLIGHT.
        Returns:
        the new attributes.
      • getInitialAttributes

        protected ShapeAttributes getInitialAttributes​(java.lang.String attrType)
      • applyRotation

        protected void applyRotation​(DrawContext dc)
        Apply a rotation to the corner points of the overlay. This method is called the first time the polygon is rendered, if the position is specified using a rotated LatLon box.
        Parameters:
        dc - Current draw context.