net.sf.jcgm.core
Enum ElementClass

java.lang.Object
  extended by java.lang.Enum<ElementClass>
      extended by net.sf.jcgm.core.ElementClass
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ElementClass>

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

Element classes of CGM commands.

Since:
Dec 15, 2009
Version:
$Id: ElementClass.java 46 2011-12-14 08:26:44Z phica $
Author:
Philippe Cadé

Enum Constant Summary
APPLICATION_STRUCTURE_ELEMENTS
           
ATTRIBUTE_ELEMENTS
           
CONTROL_ELEMENTS
           
DELIMITER_ELEMENTS
           
ESCAPE_ELEMENTS
           
EXTERNAL_ELEMENTS
           
GRAPHICAL_PRIMITIVE_ELEMENTS
           
METAFILE_DESCRIPTOR_ELEMENTS
           
PICTURE_DESCRIPTOR_ELEMENTS
           
SEGMENT_ELEMENTS
           
 
Method Summary
static java.lang.Object getElement(int elementClass, int elementCode)
          Returns the element for the given element class and element code
static ElementClass getElementClass(int ec)
          Returns the element class for the given class number
 java.lang.String toString()
           
static ElementClass valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ElementClass[] 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

DELIMITER_ELEMENTS

public static final ElementClass DELIMITER_ELEMENTS

METAFILE_DESCRIPTOR_ELEMENTS

public static final ElementClass METAFILE_DESCRIPTOR_ELEMENTS

PICTURE_DESCRIPTOR_ELEMENTS

public static final ElementClass PICTURE_DESCRIPTOR_ELEMENTS

CONTROL_ELEMENTS

public static final ElementClass CONTROL_ELEMENTS

GRAPHICAL_PRIMITIVE_ELEMENTS

public static final ElementClass GRAPHICAL_PRIMITIVE_ELEMENTS

ATTRIBUTE_ELEMENTS

public static final ElementClass ATTRIBUTE_ELEMENTS

ESCAPE_ELEMENTS

public static final ElementClass ESCAPE_ELEMENTS

EXTERNAL_ELEMENTS

public static final ElementClass EXTERNAL_ELEMENTS

SEGMENT_ELEMENTS

public static final ElementClass SEGMENT_ELEMENTS

APPLICATION_STRUCTURE_ELEMENTS

public static final ElementClass APPLICATION_STRUCTURE_ELEMENTS
Method Detail

values

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

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

valueOf

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

getElementClass

public static ElementClass getElementClass(int ec)
Returns the element class for the given class number

Parameters:
ec - The class number to get
Returns:
The corresponding element class

getElement

public static java.lang.Object getElement(int elementClass,
                                          int elementCode)
Returns the element for the given element class and element code

Parameters:
elementClass - The class number to get
elementCode - The class code to get (depends on the class number)
Returns:
The element as an object, will be one of the element code enumerations.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ElementClass>


Part of the jcgm library http://jcgm.sourceforge.net/