edu.mit.csail.sdg.alloy4graph
Enum DotColor

java.lang.Object
  extended by java.lang.Enum<DotColor>
      extended by edu.mit.csail.sdg.alloy4graph.DotColor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DotColor>

public enum DotColor
extends java.lang.Enum<DotColor>

Immutable; this defines the set of possible colors.

Thread Safety: Can be called only by the AWT event thread.


Enum Constant Summary
BLACK
           
BLUE
           
GRAY
           
GREEN
           
MAGIC
           
RED
           
WHITE
           
YELLOW
           
 
Method Summary
 java.awt.Color getColor(DotPalette pal)
          Convert this color into its corresponding Java Color object.
 java.lang.String getDisplayedText()
          Returns the String that will be displayed in the GUI to represent this value.
 java.lang.String getDotText(DotPalette pal)
          Returns the String that should be written into the dot file for this value, when used with the given palette.
 javax.swing.Icon getIcon(DotPalette pal)
          Returns the Icon that will be displayed in the GUI to represent this value, when used with the given palette.
static DotColor parse(java.lang.String x)
          This method is used in parsing the XML value into a valid color; returns null if there is no match.
 java.lang.String toString()
          This value is used in writing XML.
static DotColor valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DotColor[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static java.lang.Object[] valuesWithout(DotColor exclude)
          Returns the list of values that the user is allowed to select from.
 
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

MAGIC

public static final DotColor MAGIC

YELLOW

public static final DotColor YELLOW

GREEN

public static final DotColor GREEN

BLUE

public static final DotColor BLUE

RED

public static final DotColor RED

GRAY

public static final DotColor GRAY

WHITE

public static final DotColor WHITE

BLACK

public static final DotColor BLACK
Method Detail

values

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

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

valueOf

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

valuesWithout

public static java.lang.Object[] valuesWithout(DotColor exclude)
Returns the list of values that the user is allowed to select from.


getIcon

public javax.swing.Icon getIcon(DotPalette pal)
Returns the Icon that will be displayed in the GUI to represent this value, when used with the given palette.


getColor

public java.awt.Color getColor(DotPalette pal)
Convert this color into its corresponding Java Color object.


getDotText

public java.lang.String getDotText(DotPalette pal)
Returns the String that should be written into the dot file for this value, when used with the given palette.


getDisplayedText

public java.lang.String getDisplayedText()
Returns the String that will be displayed in the GUI to represent this value.


parse

public static DotColor parse(java.lang.String x)
This method is used in parsing the XML value into a valid color; returns null if there is no match.


toString

public java.lang.String toString()
This value is used in writing XML.

Overrides:
toString in class java.lang.Enum<DotColor>