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.
-
-
Field Summary
-
Fields inherited from interface org.opengis.go.display.primitive.Graphic
DEFAULT_AUTO_EDIT, DEFAULT_BLINK_PATTERN, DEFAULT_BLINKING, DEFAULT_DRAG_SELECTABLE, DEFAULT_MAX_SCALE, DEFAULT_MIN_SCALE, DEFAULT_PICKABLE, DEFAULT_SELECTED, DEFAULT_VISIBLE, DEFAULT_Z_ORDER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description javax.swing.IcongetIcon()Returns the icon represented by this GraphicIcon.java.awt.geom.Point2DgetOffset()Returns the location in the icon (as an offset from the upper left) that will be drawn over the icon's position.PointSymbolizergetPointSymbolizer()Returns theGraphicStylefor thisGraphicIcon, which is required to be aPointSymbolizer.DirectPositiongetPosition()Returns the DirectPosition corresponding to the position of the icon.doublegetRotation(Unit unit)Gets the angle by which to rotate the icon.booleanisAllowingRotation()Indicates whether this primitive is displaying anchor handles that allow the user to change the rotation of this icon.voidsetAllowingRotation(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.voidsetIcon(javax.swing.Icon icon)Sets the icon represented by this GraphicIcon.voidsetOffset(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.voidsetPosition(DirectPosition coord)Sets the DirectPosition corresponding to the position of the icon.voidsetRotation(double angle, Unit unit)Sets the angle by which to rotate the icon.-
Methods inherited from interface org.opengis.go.display.primitive.Graphic
addGraphicListener, cloneGraphic, dispose, fireGraphicEvent, getAutoEdit, getBlinking, getBlinkPattern, getClientProperty, getDragSelectable, getGraphicStyle, getMaxScale, getMinScale, getName, getParent, getPickable, getSelected, getSymbology, getVisible, getZOrderHint, isPassingEventsToParent, isShowingAnchorHandles, isShowingEditHandles, putClientProperty, refresh, removeGraphicListener, setAutoEdit, setBlinking, setBlinkPattern, setDragSelectable, setGraphicStyle, setMaxScale, setMinScale, setName, setParent, setPassingEventsToParent, setPickable, setSelected, setShowingAnchorHandles, setShowingEditHandles, setSymbology, setVisible, setZOrderHint
-
-
-
-
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 theGraphicStylefor thisGraphicIcon, which is required to be aPointSymbolizer.- 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