📄 graphicarc.java
字号:
*/ public double getStart(Unit unit); /** * Sets this <code>GraphicArc</code>'s end bearing. The arc is stroked * counter-clockwise from start to end. * @param end the end orientation. * @param unit the <code>Unit</code> for the angle value. */ public void setEnd(double end, Unit unit); /** * Returns this <code>GraphicArc</code>'s ending bearing. The arc is stroked * counter-clockwise from start to end. * @param unit the <code>Unit</code> for the angle value. * @return the arc end orientation. */ public double getEnd(Unit unit); /** * Sets the closureType, which determines how the endpoints of this * <code>GraphicArc</code> are connected. This is one of the constants defined in the * <code>ArcClosure</code> class. The integer values corresponding to * these constants are the same as the closure type values in * <code>java.awt.geom.Arc2D</code>. * @param closureType Closure type of the arc (one of the ArcClosure * constants: OPEN, CHORD, or PIE) */ public void setClosureType(ArcClosure closureType); /** * Returns the closureType. * @return Closure type of the arc (one of <code>ArcClosure</code> constants * OPEN, CHORD, or PIE). The integer values corresponding to these * constants are the same as the constants OPEN, CHORD, and PIE from * <code>java.awt.geom.Arc2d</code>. */ public ArcClosure getClosureType(); /** * Indicates whether this <code>GraphicArc</code> is displaying an anchor handle for changing * the rotation of the defining ellipse. */ public boolean isAllowingRotation(); /** * Sets the boolean that indicates whether this <code>GraphicArc</code> displays * an anchor handle for changing the rotation of the defining ellipse. */ public void setAllowingRotation(boolean newValue); /** * Indicates whether this <code>GraphicArc</code> is a circle. The implementation should * test for this based on the geometry settings. */ public boolean isCircle(); /** * Indicates whether this <code>GraphicArc</code> is a closed ellipse. The implementation should * test for this based on the geometry settings. */ public boolean isClosedEllipse(); //** EDITABLE/ANIMATION ** /** * Indicates whether this <code>GraphicArc</code> is displaying edit handles for changing * the angular extents of the defining ellipse. */ public boolean isAllowingExtentsChange(); /** * Sets the boolean that indicates whether this <code>GraphicArc</code> is displaying * edit handles for changing the angular extents of the defining ellipse. */ public void setAllowingExtentsChange(boolean newValue); //** PROJECTED ** /** * Sets the algorithm that is used in computing the "in-between" pixels * of the <code>ArcClosure</code> verteces when the arc is rendered. This does not * when there is no closure, i.e. when isClosedEllipse() is false, or * for <code>ArcClosure.OPEN</code>. * * @param pathType This must be one of the static constants in * the PathType class or one of its subclasses. */ public void setClosurePathType(PathType pathType); /** * Retrieves the algorithm that is used in computing the "in-between" pixels * of the <code>ArcClosure</code> verteces when the arc is rendered. This does not * when there is no closure, i.e. when isClosedEllipse() is false, or * for <code>ArcClosure.OPEN</code>. */ public PathType getClosurePathType(); /** * Instances of the <code>ArcClosure</code> class represent the various * methods of connecting the endpoints of an arc. There are three static * constants defined in this class that can be used as parameters to * the <code>setClosureType</code> method. * * @author Open GIS Consortium, Inc. */ public static class ArcClosure extends SimpleEnumerationType { /** * The list of enumeration available in this virtual machine. * <strong>Must be declared first!</strong>. */ private static final List VALUES = new ArrayList(3); /** * Closure type that indicates that the endpoints of the arc * should not be connected. */ public static final ArcClosure OPEN = new ArcClosure("Open", ""); /** * Closure type that indicates that one line should be drawn between * the endpoints of the arc. */ public static final ArcClosure CHORD = new ArcClosure("Chord", ""); /** * Closure type that indicates that two lines, one from each * endpoint of the arc, should be drawn to the center of the ellipse * defining the arc. */ public static final ArcClosure PIE = new ArcClosure("Pie", ""); /** Enumeration value of the <code>OPEN</code> constant. */ // public static final int OPEN_VALUE = OPEN.getValue(); /** Enumeration value of the <code>CHORD</code> constant. */ // public static final int CHORD_VALUE = CHORD.getValue(); /** Enumeration value of the <code>PIE</code> constant. */ // public static final int PIE_VALUE = PIE.getValue(); /** * A list containing all the enumerators so that the list can be * "walked" and also to do reverse lookups (id to object). */ // private static final ArcClosure[] enumList = { OPEN, CHORD, PIE }; /** * Constructor that should only be called to create the static * constants in this class. */ private ArcClosure(String name, String description) { super(VALUES, name, description); } /** * Method to lookup an <code>ArcClosure</code> object from its * integer value. * @param value The value to match the object with. * @throws NoSuchEnumerationException If there is no object for the * given value. public static ArcClosure getByValue(int value) throws NoSuchEnumerationException { for (int i = 0; i < enumList.length; i++) { if (enumList[i].getValue() == value) { return enumList[i]; } } throw new NoSuchEnumerationException(value); } */ /** * Utility method that retrieves the list of all * <code>ArcClosure</code>s. This is useful when making combo-boxes * with code like: * <code><pre> * JComboBox comboBox = new JComboBox(ArcClosure.getArray()); * </pre></code><p> * <b>IMPORTANT SAFETY TIP:</b><br> * Modifying the array returned is a Bad Thing. Don't do it. */ public static ArcClosure[] getArray() { return values(); } /** * Returns the list of <code>ArcClosure</code>s. */ public static ArcClosure[] values() { synchronized (VALUES) { return (ArcClosure[]) VALUES.toArray(new ArcClosure[VALUES.size()]); }} /** * Returns the list of enumerations of the same kind than this enum. */ public CodeList[] family() { return values(); } } // end class ArcClosure}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -