com.sun.electric.database.geometry
Enum Poly.Type

java.lang.Object
  extended by java.lang.Enum<Poly.Type>
      extended by com.sun.electric.database.geometry.Poly.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Poly.Type>
Enclosing class:
Poly

public static enum Poly.Type
extends java.lang.Enum<Poly.Type>

Type is a typesafe enum class that describes the nature of a Poly.


Enum Constant Summary
BIGCROSS
          Describes a big cross, drawn at the specified location.
CIRCLE
          Describes a circle (only the outline is drawn).
CIRCLEARC
          Describes an arc of a circle.
CLOSED
          Describes a closed polygon with only the outline drawn.
CROSS
          Describes a small cross, drawn at the specified location.
CROSSED
          Describes a closed rectangle with the outline drawn and an "X" drawn through it.
DISC
          Describes a filled circle.
FILLED
          Describes a closed polygon which is filled in.
OPENED
          Describes an open outline.
OPENEDT1
          Describes an open outline, drawn with a dotted texture.
OPENEDT2
          Describes an open outline, drawn with a dashed texture.
OPENEDT3
          Describes an open outline, drawn with thicker lines.
TEXTBOT
          Describes text that should be placed so that the Poly point is at the bottom-center.
TEXTBOTLEFT
          Describes text that should be placed so that the Poly point is at the lower-left.
TEXTBOTRIGHT
          Describes text that should be placed so that the Poly point is at the lower-right.
TEXTBOX
          Describes text that is centered in the Poly and must remain inside.
TEXTCENT
          Describes text that should be centered about the Poly point.
TEXTLEFT
          Describes text that should be placed so that the Poly point is at the left-center.
TEXTRIGHT
          Describes text that should be placed so that the Poly point is at the right-center.
TEXTTOP
          Describes text that should be placed so that the Poly point is at the top-center.
TEXTTOPLEFT
          Describes text that should be placed so that the Poly point is at the upper-left.
TEXTTOPRIGHT
          Describes text that should be placed so that the Poly point is at the upper-right.
THICKCIRCLE
          Describes a circle, drawn with thick lines (only the outline is drawn).
THICKCIRCLEARC
          Describes an arc of a circle, drawn with thick lines.
VECTORS
          Describes a vector endpoint pairs, solid.
 
Method Summary
 int getTextAngle()
          Method to get the "angle" of a style of text.
static Poly.Type getTextTypeFromAngle(int angle)
          Method to get a text Type from an angle.
 boolean isOpened()
          Method to tell whether this is a style that can draw an opened polygon.
 boolean isText()
          Method to tell whether this Poly Style is text.
 java.lang.String toString()
          Returns a printable version of this Type.
static Poly.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Poly.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FILLED

public static final Poly.Type FILLED
Describes a closed polygon which is filled in.


CLOSED

public static final Poly.Type CLOSED
Describes a closed polygon with only the outline drawn.


CROSSED

public static final Poly.Type CROSSED
Describes a closed rectangle with the outline drawn and an "X" drawn through it.


OPENED

public static final Poly.Type OPENED
Describes an open outline. The last point is not implicitly connected to the first point.


OPENEDT1

public static final Poly.Type OPENEDT1
Describes an open outline, drawn with a dotted texture. The last point is not implicitly connected to the first point.


OPENEDT2

public static final Poly.Type OPENEDT2
Describes an open outline, drawn with a dashed texture. The last point is not implicitly connected to the first point.


OPENEDT3

public static final Poly.Type OPENEDT3
Describes an open outline, drawn with thicker lines. The last point is not implicitly connected to the first point.


VECTORS

public static final Poly.Type VECTORS
Describes a vector endpoint pairs, solid. There must be an even number of points in the Poly so that vectors can be drawn from point 0 to 1, then from point 2 to 3, etc.


CIRCLE

public static final Poly.Type CIRCLE
Describes a circle (only the outline is drawn). The first point is the center of the circle and the second point is on the edge, thus defining the radius. This second point should be on the same horizontal level as the radius point to make radius computation easier.


THICKCIRCLE

public static final Poly.Type THICKCIRCLE
Describes a circle, drawn with thick lines (only the outline is drawn). The first point is the center of the circle and the second point is on the edge, thus defining the radius. This second point should be on the same horizontal level as the radius point to make radius computation easier.


DISC

public static final Poly.Type DISC
Describes a filled circle. The first point is the center of the circle and the second point is on the edge, thus defining the radius. This second point should be on the same horizontal level as the radius point to make radius computation easier.


CIRCLEARC

public static final Poly.Type CIRCLEARC
Describes an arc of a circle. The first point is the center of the circle, the second point is the start of the arc, and the third point is the end of the arc. The arc will be drawn counter-clockwise from the start point to the end point.


THICKCIRCLEARC

public static final Poly.Type THICKCIRCLEARC
Describes an arc of a circle, drawn with thick lines. The first point is the center of the circle, the second point is the start of the arc, and the third point is the end of the arc. The arc will be drawn counter-clockwise from the start point to the end point.


TEXTCENT

public static final Poly.Type TEXTCENT
Describes text that should be centered about the Poly point. Only one point need be specified.


TEXTTOP

public static final Poly.Type TEXTTOP
Describes text that should be placed so that the Poly point is at the top-center. Only one point need be specified, and the text will be below that point.


TEXTBOT

public static final Poly.Type TEXTBOT
Describes text that should be placed so that the Poly point is at the bottom-center. Only one point need be specified, and the text will be above that point.


TEXTLEFT

public static final Poly.Type TEXTLEFT
Describes text that should be placed so that the Poly point is at the left-center. Only one point need be specified, and the text will be to the right of that point.


TEXTRIGHT

public static final Poly.Type TEXTRIGHT
Describes text that should be placed so that the Poly point is at the right-center. Only one point need be specified, and the text will be to the left of that point.


TEXTTOPLEFT

public static final Poly.Type TEXTTOPLEFT
Describes text that should be placed so that the Poly point is at the upper-left. Only one point need be specified, and the text will be to the lower-right of that point.


TEXTBOTLEFT

public static final Poly.Type TEXTBOTLEFT
Describes text that should be placed so that the Poly point is at the lower-left. Only one point need be specified, and the text will be to the upper-right of that point. This is the normal starting point for most text.


TEXTTOPRIGHT

public static final Poly.Type TEXTTOPRIGHT
Describes text that should be placed so that the Poly point is at the upper-right. Only one point need be specified, and the text will be to the lower-left of that point.


TEXTBOTRIGHT

public static final Poly.Type TEXTBOTRIGHT
Describes text that should be placed so that the Poly point is at the lower-right. Only one point need be specified, and the text will be to the upper-left of that point.


TEXTBOX

public static final Poly.Type TEXTBOX
Describes text that is centered in the Poly and must remain inside. If the letters do not fit, a smaller font will be used, and if that still does not work, any letters that cannot fit are not written. The Poly coordinates must define an area for the text to live in.


CROSS

public static final Poly.Type CROSS
Describes a small cross, drawn at the specified location. Typically there will be only one point in this polygon but if there are more they are averaged and the cross is drawn in the center.


BIGCROSS

public static final Poly.Type BIGCROSS
Describes a big cross, drawn at the specified location. Typically there will be only one point in this polygon but if there are more they are averaged and the cross is drawn in the center.

Method Detail

values

public static Poly.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Poly.Type c : Poly.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Poly.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isText

public boolean isText()
Method to tell whether this Poly Style is text.

Returns:
true if this Poly Style is text.

toString

public java.lang.String toString()
Returns a printable version of this Type.

Overrides:
toString in class java.lang.Enum<Poly.Type>
Returns:
a printable version of this Type.

isOpened

public boolean isOpened()
Method to tell whether this is a style that can draw an opened polygon.

Returns:
true if this is a style that can draw an opened polygon.

getTextAngle

public int getTextAngle()
Method to get the "angle" of a style of text. When rotating a node, the anchor point also rotates. To to this elegantly, the Type is converted to an angle, rotated, and then converted back to a Type.

Returns:
the angle of this text Type.

getTextTypeFromAngle

public static Poly.Type getTextTypeFromAngle(int angle)
Method to get a text Type from an angle. When rotating a node, the anchor point also rotates. To to this elegantly, the Type is converted to an angle, rotated, and then converted back to a Type.

Parameters:
angle - of the text anchor.
Returns:
a text Type that corresponds to the angle.