Interface GraphicArc
-
- All Superinterfaces:
- Graphic
public interface GraphicArc extends Graphic
AGraphicArcrepresents a portion of an ellipse.A
GraphicArcis constructed from either an elliptic instance ofConic, or the following graphical values:- Its
center, an instance ofDirectPosition, - Its
widthandheight, double precision values measured in length units from thecenter, - Its
rotationangle, a double precision value, - Its arc
startangle, a double precision value, - Its arc
endangle, a double precision value.
The geometric shape of
GraphicArccan be modified via these parameters (the parameters are converted and passed to the underlyingConicobject). Similarly, if the underlyingConicchanges shape but remains an ellipse, then theGraphicArcreflects that behavior (seeGraphic.refresh()). If theConicchanges to a form other than an ellipse, then the behavior ofGraphicArcis undefined.The ellipse is oriented by centering it at the origin of a local Cartesian plane, with the major axis of the ellipse is aligned with the x-axis (abcissa). Start and end points of the elliptic arc are measured positively as a counterclockwise angle from the positive x-axis.
The rotation of the ellipse 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.
The external Coordinate Reference System is the Coordinate Reference System of the DirectPosition correlating to the center of the ellipse.
If the width and height parameters are specified
in com.dautelle.units.Length.Pixels, then aGraphicArcshall retain shape and orientation regardless of where it appears on the screen canvas. If asetWidthorsetHeightmethod is called with a conflicting type ofUnit, then theGraphicArcshould convert its other parameter to the newUnits. Thus, if aGraphicArcis defined in pixels, and setWidth is called with a new value and thecom.dautelle.units.Length.MeterUnit, then theGraphicArcshould convert its height to meters as well.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static classGraphicArc.ArcClosureInstances of theArcClosureclass represent the various methods of connecting the endpoints of an arc.
-
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 DirectPositiongetCenter()Returns the center of the ellipse defining thisGraphicArc.PathTypegetClosurePathType()Retrieves the algorithm that is used in computing the "in-between" pixels of theArcClosureverteces when the arc is rendered.GraphicArc.ArcClosuregetClosureType()Returns the closureType.doublegetEnd(Unit unit)Returns thisGraphicArc's ending bearing.doublegetHeight(Unit unit)Returns the size of the height axis of the ellipse defining thisGraphicArc, in terms of the givenUnit.PolygonSymbolizergetPolygonSymbolizer()Returns theGraphicStylefor thisGraphicPolygon, which is required to be aPolygonSymbolizer.doublegetRotation(Unit unit)Returns thisGraphicArc's orientation source.doublegetStart(Unit unit)Returns thisGraphicArc's start bearing.doublegetWidth(Unit unit)Returns the size of the width axis of the ellipse defining thisGraphicArc, in terms of the givenUnit.booleanisAllowingExtentsChange()Indicates whether thisGraphicArcis displaying edit handles for changing the angular extents of the defining ellipse.booleanisAllowingRotation()Indicates whether thisGraphicArcis displaying an anchor handle for changing the rotation of the defining ellipse.booleanisCircle()Indicates whether thisGraphicArcis a circle.booleanisClosedEllipse()Indicates whether thisGraphicArcis a closed ellipse.voidsetAllowingExtentsChange(boolean newValue)Sets the boolean that indicates whether thisGraphicArcis displaying edit handles for changing the angular extents of the defining ellipse.voidsetAllowingRotation(boolean newValue)Sets the boolean that indicates whether thisGraphicArcdisplays an anchor handle for changing the rotation of the defining ellipse.voidsetArc(DirectPosition center, double width, double height, Unit lengthUnit, double rotation, double start, double end, Unit angleUnit)Sets the geometry for thisGraphicArc.voidsetCenter(DirectPosition center)Sets the center of the ellipse defining thisGraphicArc.voidsetClosurePathType(PathType pathType)Sets the algorithm that is used in computing the "in-between" pixels of theArcClosureverteces when the arc is rendered.voidsetClosureType(GraphicArc.ArcClosure closureType)Sets the closureType, which determines how the endpoints of thisGraphicArcare connected.voidsetEnd(double end, Unit unit)Sets thisGraphicArc's end bearing.voidsetHeight(double height, Unit unit)Sets the size of the height axis of the ellipse defining thisGraphicArc, in terms of the givenUnit.voidsetRotation(double rotation, Unit unit)Sets the orientation for the width axis.voidsetStart(double start, Unit unit)Sets thisGraphicArc's start bearing.voidsetWidth(double width, Unit unit)Sets the size of the width axis of the ellipse defining thisGraphicArc, in terms of the givenUnit.-
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
-
setArc
void setArc(DirectPosition center, double width, double height, Unit lengthUnit, double rotation, double start, double end, Unit angleUnit)
Sets the geometry for thisGraphicArc.The geometry is oriented by centering the ellipse at the origin of a local Cartesian plane, with the major axis of the ellipse is aligned with the x-axis (abcissa). Start and end points of the elliptic arc are measured positively as a counterclockwise angle from the positive x-axis.
The rotation of the ellipse 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.
The geometric values are set on the underlying
Conicgeometry for thisGraphic.- Parameters:
center- the location of the centerpoint of the ellipse defining thisGraphicArc.width- the length of the major axis of the ellipse defining thisGraphicArc.height- the length of the minor axis of the ellipse defining thisGraphicArc.lengthUnit- the unit of width and height.rotation- the rotation of the ellipse defining thisGraphicArcwith respect to the Coordinate Reference System of the centerpoint DirectPosition.start- the angle of starting point of the arc, drawn clockwise from the positive side of the major axis.end- the angle of the ending point of the arc, drawn clockwise from the positive side of the major axis.angleUnit- the unit of rotation.- Throws:
GeometryNotSupportedException- if the width value is smaller than the height value is not an ellipse.
-
setCenter
void setCenter(DirectPosition center)
Sets the center of the ellipse defining thisGraphicArc. Value is set on the underlyingConicgeometry for thisGraphic.
-
getCenter
DirectPosition getCenter()
Returns the center of the ellipse defining thisGraphicArc. Value is acquired from the underlyingConicgeometry for thisGraphic.
-
setWidth
void setWidth(double width, Unit unit)Sets the size of the width axis of the ellipse defining thisGraphicArc, in terms of the givenUnit. Value is set on the underlyingConicgeometry for thisGraphic.- Parameters:
width- Size of the width axis.unit- theUnitof the width value.
-
getWidth
double getWidth(Unit unit)
Returns the size of the width axis of the ellipse defining thisGraphicArc, in terms of the givenUnit. Value is acquired from the underlyingConicgeometry for thisGraphic.- Parameters:
unit- theUnitof the width value.- Returns:
- The size of the width axis of the arc.
-
setHeight
void setHeight(double height, Unit unit)Sets the size of the height axis of the ellipse defining thisGraphicArc, in terms of the givenUnit. Value is set on the underlyingConicgeometry for thisGraphic.- Parameters:
height- Size of the height axis.unit- theUnitof the height value.
-
getHeight
double getHeight(Unit unit)
Returns the size of the height axis of the ellipse defining thisGraphicArc, in terms of the givenUnit. Value is acquired from the underlyingConicgeometry for thisGraphic.- Parameters:
unit- theUnitof the height value.- Returns:
- The size of the height axis of the arc.
-
setRotation
void setRotation(double rotation, Unit unit)Sets the orientation for the width axis. On aCanvas, this might be the angle between the positive X axis and the width axis of the arc. For a projected arc, this might be the angle between due north and the width axis.- Parameters:
rotation- orientation of the arc.unit- theUnitfor the angle value.
-
getRotation
double getRotation(Unit unit)
Returns thisGraphicArc's orientation source.- Parameters:
unit- theUnitfor the angle value.- Returns:
- orientation of the arc.
-
setStart
void setStart(double start, Unit unit)Sets thisGraphicArc's start bearing. The arc is stroked counter-clockwise from start to end.- Parameters:
start- the start Orientation.unit- theUnitfor the angle value.
-
getStart
double getStart(Unit unit)
Returns thisGraphicArc's start bearing. The arc is stroked counter-clockwise from start to end.- Parameters:
unit- theUnitfor the angle value.- Returns:
- the arc start Orientation.
-
setEnd
void setEnd(double end, Unit unit)Sets thisGraphicArc's end bearing. The arc is stroked counter-clockwise from start to end.- Parameters:
end- the end orientation.unit- theUnitfor the angle value.
-
getEnd
double getEnd(Unit unit)
Returns thisGraphicArc's ending bearing. The arc is stroked counter-clockwise from start to end.- Parameters:
unit- theUnitfor the angle value.- Returns:
- the arc end orientation.
-
setClosureType
void setClosureType(GraphicArc.ArcClosure closureType)
Sets the closureType, which determines how the endpoints of thisGraphicArcare connected. This is one of the constants defined in theArcClosureclass. The integer values corresponding to these constants are the same as the closure type values injava.awt.geom.Arc2D.- Parameters:
closureType- Closure type of the arc (one of the ArcClosure constants: OPEN, CHORD, or PIE)
-
getClosureType
GraphicArc.ArcClosure getClosureType()
Returns the closureType.- Returns:
- Closure type of the arc (one of
ArcClosureconstants OPEN, CHORD, or PIE). The integer values corresponding to these constants are the same as the constants OPEN, CHORD, and PIE fromjava.awt.geom.Arc2d.
-
isAllowingRotation
boolean isAllowingRotation()
Indicates whether thisGraphicArcis displaying an anchor handle for changing the rotation of the defining ellipse.
-
setAllowingRotation
void setAllowingRotation(boolean newValue)
Sets the boolean that indicates whether thisGraphicArcdisplays an anchor handle for changing the rotation of the defining ellipse.
-
isCircle
boolean isCircle()
Indicates whether thisGraphicArcis a circle. The implementation should test for this based on the geometry settings.
-
isClosedEllipse
boolean isClosedEllipse()
Indicates whether thisGraphicArcis a closed ellipse. The implementation should test for this based on the geometry settings.
-
isAllowingExtentsChange
boolean isAllowingExtentsChange()
Indicates whether thisGraphicArcis displaying edit handles for changing the angular extents of the defining ellipse.
-
setAllowingExtentsChange
void setAllowingExtentsChange(boolean newValue)
Sets the boolean that indicates whether thisGraphicArcis displaying edit handles for changing the angular extents of the defining ellipse.
-
getPolygonSymbolizer
PolygonSymbolizer getPolygonSymbolizer()
Returns theGraphicStylefor thisGraphicPolygon, which is required to be aPolygonSymbolizer.- Returns:
- the GraphicPolygon's
GraphicStyle.
-
setClosurePathType
void setClosurePathType(PathType pathType)
Sets the algorithm that is used in computing the "in-between" pixels of theArcClosureverteces when the arc is rendered. This does not when there is no closure, i.e. when isClosedEllipse() is false, or forArcClosure.OPEN.- Parameters:
pathType- This must be one of the static constants in the PathType class or one of its subclasses.
-
getClosurePathType
PathType getClosurePathType()
Retrieves the algorithm that is used in computing the "in-between" pixels of theArcClosureverteces when the arc is rendered. This does not when there is no closure, i.e. when isClosedEllipse() is false, or forArcClosure.OPEN.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG