com.brunchboy.util.swing.relativelayout
Class AttributeAxis

java.lang.Object
  |
  +--com.brunchboy.util.swing.relativelayout.AttributeAxis

public class AttributeAxis
extends Object

A typesafe enumeration of the axes on which attributes exist within a RelativeLayout. This class is immutable, and thus may be safely shared without concern for threading behavior.

Version:
$Id: AttributeAxis.java,v 1.2 2002/08/16 05:13:04 jim Exp $
Author:
James Elliott, jim@brunchboy.com

Field Summary
static AttributeAxis HORIZONTAL
          Axis on which the attributes left, right, width and horizontalCenter apply.
static String VERSION
          Provides access to the CVS version of this class.
static AttributeAxis VERTICAL
          Axis on which the attributes top, bottom,height and verticalCenter apply.
 
Method Summary
static AttributeAxis getInstance(String name)
          Static factory method to look up an axis by name.
 String toString()
          Provide a textual representation of the axis for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Provides access to the CVS version of this class.

See Also:
Constant Field Values

HORIZONTAL

public static final AttributeAxis HORIZONTAL
Axis on which the attributes left, right, width and horizontalCenter apply.


VERTICAL

public static final AttributeAxis VERTICAL
Axis on which the attributes top, bottom,height and verticalCenter apply.

Method Detail

getInstance

public static AttributeAxis getInstance(String name)
Static factory method to look up an axis by name.

Parameters:
name - the name of the desired axis.
Returns:
the corresponding instance.
Throws:
NoSuchElementException - if the desired axis doesn't exist.

toString

public String toString()
Provide a textual representation of the axis for debugging purposes.

Overrides:
toString in class Object
Returns:
the description of this axis.