org.argouml.swingext
Class Property

java.lang.Object
  extended byorg.argouml.swingext.Property
All Implemented Interfaces:
java.lang.Comparable

public class Property
extends java.lang.Object
implements java.lang.Comparable

A property that can be displayed and edited within a PropertyTable.


Constructor Summary
Property(java.lang.String name, java.lang.Class valueType, java.lang.Object initialValue)
          Constructs a new Property.
Property(java.lang.String name, java.lang.Class valueType, java.lang.Object initialValue, java.lang.Object[] values)
          Constructs a new Property.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares two Properties by comparing their names.
 java.lang.Object[] getAvailableValues()
          Returns the set of available property values, or null if no such finite set exists.
 java.lang.Object getCurrentValue()
          Returns the currently selected property value.
 java.lang.Object getInitialValue()
          Returns the initial property value.
 java.lang.String getName()
          Returns the property name.
 java.lang.Class getValueType()
          Property editors should be configured to edit objects of this type.
 void setCurrentValue(java.lang.Object value)
          Sets the currently selected property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property(java.lang.String name,
                java.lang.Class valueType,
                java.lang.Object initialValue)
Constructs a new Property. This version of the constructor does not specify a finite set of available values.

Parameters:
name - the property name
valueType - the value type class
initialValue - the initial value

Property

public Property(java.lang.String name,
                java.lang.Class valueType,
                java.lang.Object initialValue,
                java.lang.Object[] values)
Constructs a new Property. This version of the constructor does not specify a finite set of available values.

Parameters:
name - the property name
valueType - the value type class
initialValue - the initial value
values - the set of available values to choose from
Method Detail

getName

public java.lang.String getName()
Returns the property name.

Returns:
property name

getValueType

public java.lang.Class getValueType()
Property editors should be configured to edit objects of this type.

Returns:
the property value class

getInitialValue

public java.lang.Object getInitialValue()
Returns the initial property value.

Returns:
initial property value

getAvailableValues

public java.lang.Object[] getAvailableValues()
Returns the set of available property values, or null if no such finite set exists.

Returns:
set of available property values

getCurrentValue

public java.lang.Object getCurrentValue()
Returns the currently selected property value.

Returns:
current property value

setCurrentValue

public void setCurrentValue(java.lang.Object value)
Sets the currently selected property value.

Parameters:
value - new property value

compareTo

public int compareTo(java.lang.Object o)
Compares two Properties by comparing their names.

Specified by:
compareTo in interface java.lang.Comparable


ArgoUML © 1996-2003 (20040125)ArgoUML Project HomeArgoUML Cookbook