prefuse
Enum PredefinedShape

java.lang.Object
  extended by java.lang.Enum<PredefinedShape>
      extended by prefuse.PredefinedShape
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PredefinedShape>, ShapeBuilder

public enum PredefinedShape
extends java.lang.Enum<PredefinedShape>
implements ShapeBuilder

Predefined ShapeBuilders

Author:
Anton Marsden

Enum Constant Summary
CROSS
          Cross shape
DIAMOND
          Diamond shape
ELLIPSE
          Ellipse/Circle shape
HEXAGON
          Hexagon shape
NONE
          No shape.
RECTANGLE
          Rectangle/Square shape
STAR
          Star shape
TRIANGLE_DOWN
          Down-pointing triangle shape
TRIANGLE_LEFT
          Left-pointing triangle shape
TRIANGLE_RIGHT
          Right-pointing triangle shape
TRIANGLE_UP
          Up-pointing triangle shape
 
Method Summary
 java.awt.Shape createEmptyShape()
           
 java.awt.Shape createShape(double x, double y, double width, double height)
           
static PredefinedShape valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PredefinedShape[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface prefuse.ShapeBuilder
updateShape
 

Enum Constant Detail

NONE

public static final PredefinedShape NONE
No shape. Draw nothing.


RECTANGLE

public static final PredefinedShape RECTANGLE
Rectangle/Square shape


ELLIPSE

public static final PredefinedShape ELLIPSE
Ellipse/Circle shape


DIAMOND

public static final PredefinedShape DIAMOND
Diamond shape


CROSS

public static final PredefinedShape CROSS
Cross shape


STAR

public static final PredefinedShape STAR
Star shape


TRIANGLE_UP

public static final PredefinedShape TRIANGLE_UP
Up-pointing triangle shape


TRIANGLE_DOWN

public static final PredefinedShape TRIANGLE_DOWN
Down-pointing triangle shape


TRIANGLE_LEFT

public static final PredefinedShape TRIANGLE_LEFT
Left-pointing triangle shape


TRIANGLE_RIGHT

public static final PredefinedShape TRIANGLE_RIGHT
Right-pointing triangle shape


HEXAGON

public static final PredefinedShape HEXAGON
Hexagon shape

Method Detail

values

public static PredefinedShape[] 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 (PredefinedShape c : PredefinedShape.values())
    System.out.println(c);

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

valueOf

public static PredefinedShape 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

createEmptyShape

public java.awt.Shape createEmptyShape()
Specified by:
createEmptyShape in interface ShapeBuilder

createShape

public java.awt.Shape createShape(double x,
                                  double y,
                                  double width,
                                  double height)
Specified by:
createShape in interface ShapeBuilder


Copyright © 2008 Regents of the University of California