org.formaria.editor.generation.attributes
Class GenerationAttributes

java.lang.Object
  extended by org.formaria.editor.generation.attributes.GenerationAttributes
All Implemented Interfaces:
java.lang.Cloneable

public class GenerationAttributes
extends java.lang.Object
implements java.lang.Cloneable

A class for storing the attributes needed to automatically generate user interfaces for structures such as forms and data files of various formats.

Copyright (c) Formaria Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.2 $


Field Summary
static java.lang.String ACTION_ATTR
           
static java.lang.String ALIGNMENT_ATTR
           
protected  java.util.Hashtable attributes
           
static java.lang.String CAPTION_KEY_ATTR
           
static java.lang.String CAPTION_STYLE_ATTR
           
static java.lang.String FORMAT_ATTR
           
protected  int id
           
static java.lang.String IMPLEMENTATION_CLASS_ATTR
           
static java.lang.String INIT_ATTR
           
static java.lang.String INPUT_PATH_ATTR
           
static java.lang.String LAYOUT_ATTR
           
static java.lang.String MASK_ATTR
           
static java.lang.String NAME_ATTR
           
static java.lang.String OUTPUT_PATH_ATTR
           
static java.lang.String PARENT_REF_ATTR
           
static java.lang.String STYLE_ATTR
           
static java.lang.String VALIDATION_ATTR
           
 
Constructor Summary
GenerationAttributes()
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String key)
          Get an attribute value
 java.lang.Object getAttribute(java.lang.String key, java.lang.String defaultValue)
          Get an attribute value
 int getId()
          Get the id of this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_ATTR

public static final java.lang.String NAME_ATTR
See Also:
Constant Field Values

IMPLEMENTATION_CLASS_ATTR

public static final java.lang.String IMPLEMENTATION_CLASS_ATTR
See Also:
Constant Field Values

CAPTION_KEY_ATTR

public static final java.lang.String CAPTION_KEY_ATTR
See Also:
Constant Field Values

CAPTION_STYLE_ATTR

public static final java.lang.String CAPTION_STYLE_ATTR
See Also:
Constant Field Values

PARENT_REF_ATTR

public static final java.lang.String PARENT_REF_ATTR
See Also:
Constant Field Values

VALIDATION_ATTR

public static final java.lang.String VALIDATION_ATTR
See Also:
Constant Field Values

INPUT_PATH_ATTR

public static final java.lang.String INPUT_PATH_ATTR
See Also:
Constant Field Values

OUTPUT_PATH_ATTR

public static final java.lang.String OUTPUT_PATH_ATTR
See Also:
Constant Field Values

MASK_ATTR

public static final java.lang.String MASK_ATTR
See Also:
Constant Field Values

FORMAT_ATTR

public static final java.lang.String FORMAT_ATTR
See Also:
Constant Field Values

LAYOUT_ATTR

public static final java.lang.String LAYOUT_ATTR
See Also:
Constant Field Values

ALIGNMENT_ATTR

public static final java.lang.String ALIGNMENT_ATTR
See Also:
Constant Field Values

STYLE_ATTR

public static final java.lang.String STYLE_ATTR
See Also:
Constant Field Values

INIT_ATTR

public static final java.lang.String INIT_ATTR
See Also:
Constant Field Values

ACTION_ATTR

public static final java.lang.String ACTION_ATTR
See Also:
Constant Field Values

id

protected int id

attributes

protected java.util.Hashtable attributes
Constructor Detail

GenerationAttributes

public GenerationAttributes()
Method Detail

getId

public int getId()
Get the id of this attribute.

Returns:
the id

getAttribute

public java.lang.Object getAttribute(java.lang.String key,
                                     java.lang.String defaultValue)
Get an attribute value

Parameters:
key - teh value to lookup
defaultValue - the default value in case nothing is found
Returns:
the value or the default if nothing is found

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Get an attribute value

Parameters:
key - the value to lookup
Returns:
the value or null if nothing is found