net.sourceforge.swtlayeredgraph
Enum LineStyle

java.lang.Object
  extended by java.lang.Enum<LineStyle>
      extended by net.sourceforge.swtlayeredgraph.LineStyle
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LineStyle>

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

Defines the available/known line types and how they are mapped to SWT line types.

Author:
davija

Enum Constant Summary
DASH
           
DASH_DOT
           
DASH_DOT_DOT
           
DOT
           
POINTS
           
SOLID
           
 
Method Summary
static LineStyle fromString(java.lang.String value)
          Parses the incoming string into the correct LineStyle type.
 java.lang.Integer getInt()
          Gets the integer value that defines what SWT line type this corresponds to.
 java.lang.String getText()
          Gets the name/text description for this item.
static LineStyle valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LineStyle[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SOLID

public static final LineStyle SOLID

POINTS

public static final LineStyle POINTS

DOT

public static final LineStyle DOT

DASH

public static final LineStyle DASH

DASH_DOT

public static final LineStyle DASH_DOT

DASH_DOT_DOT

public static final LineStyle DASH_DOT_DOT
Method Detail

values

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

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

valueOf

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

getText

public java.lang.String getText()
Gets the name/text description for this item.

Returns:
Returns the name/text description for this item.

getInt

public java.lang.Integer getInt()
Gets the integer value that defines what SWT line type this corresponds to.

Returns:
Returns the integer value that defines what SWT line type this corresponds to.

fromString

public static LineStyle fromString(java.lang.String value)
Parses the incoming string into the correct LineStyle type. Comparisons are case insensitive.

Parameters:
value - Type to look for.
Returns:
Returns the corresponding LineStyle type.
Throws:
java.lang.IllegalArgumentException - If value is null, empty or is not a known type.


Copyright © 2009. All Rights Reserved.