Documentation of 'org.opengis.go.display.primitive.GraphicIcon' Java class
GraphicIcon
org.opengis.go.display.primitive

Interface GraphicIcon

  • All Superinterfaces:
    Graphic


    public interface GraphicIcon
    extends Graphic
    The GraphicIcon defines a common abstraction for implementations that render icons on a drawing surface.

    The rotation of the icon with respect to an external Coordinate Reference System is measured positively as a clockwise angle, starting from a reference line within the Coordinate Reference System and ending at the x-axis of the local Cartesian plane.

    • Method Detail

      • setIcon

        void setIcon(javax.swing.Icon icon)
        Sets the icon represented by this GraphicIcon.
        Parameters:
        icon - the icon to be rendered.
      • getIcon

        javax.swing.Icon getIcon()
        Returns the icon represented by this GraphicIcon.
        Returns:
        the icon to be rendered.
      • setPosition

        void setPosition(DirectPosition coord)
        Sets the DirectPosition corresponding to the position of the icon.
        Parameters:
        coord - the wrapper for the positon.
      • getPosition

        DirectPosition getPosition()
        Returns the DirectPosition corresponding to the position of the icon.
        Returns:
        the wrapper for the position of the center point.
      • setRotation

        void setRotation(double angle,
                         Unit unit)
        Sets the angle by which to rotate the icon. Use rotation to rotate rotatable icons. For example, use the entity's course to rotate an icon whose shape indicates the direction of the entity (e.g., top-down view of a aircraft) Note: the actual drawing angle may differ from the rotation angle once the GraphicIcon has been projected onto the drawing surface.
        Parameters:
        angle - the new rotation.
        unit - the Unit for the angle value.
      • getRotation

        double getRotation(Unit unit)
        Gets the angle by which to rotate the icon.
        Parameters:
        unit - the Unit for the angle value.
        Returns:
        the rotation angle measured clockwise from the horizontal.
      • setOffset

        void setOffset(java.awt.geom.Point2D offset)
        Sets the location in the icon (as an offset from the upper left) that will be drawn over the icon's position. This will also be the point about which rotation will occur. If the offset coordinate is null, then the icon will be centered over its position.
      • getOffset

        java.awt.geom.Point2D getOffset()
        Returns the location in the icon (as an offset from the upper left) that will be drawn over the icon's position. This is the center of rotation as well. If the offset coordinate is null, then the icon will be centered over its position.
      • getPointSymbolizer

        PointSymbolizer getPointSymbolizer()
        Returns the GraphicStyle for this GraphicIcon, which is required to be a PointSymbolizer.
        Returns:
        the GraphicIcon's GraphicStyle.
      • isAllowingRotation

        boolean isAllowingRotation()
        Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of this icon.
      • setAllowingRotation

        void setAllowingRotation(boolean newValue)
        Sets the boolean that indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of this icon.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.