org.oddjob.designer.model
Class SimpleAttribute

java.lang.Object
  extended byjava.util.Observable
      extended byorg.oddjob.designer.model.SimpleAttribute
All Implemented Interfaces:
DesignAttribute, DesignElement
Direct Known Subclasses:
BooleanAttribute, DateAttribute, DateTimeAttribute, DayAttribute, DayOfYearAttribute, FileAttribute, MonthAttribute, NumberAttribute, ReferenceAttribute, SimpleDE, SimpleTextAttribute, TimeAttribute, TimeZoneAttribute

public abstract class SimpleAttribute
extends java.util.Observable
implements DesignAttribute

An DesignElement that is only an attribute in an objects configuration.

Author:
Rob Gordon.

Constructor Summary
SimpleAttribute()
           
 
Method Summary
 java.lang.String attribute()
          Get the attribute text.
 void attribute(java.lang.String value)
          Set the attribute text.
 void clear()
          Clear the DesignElement of Data.
 DesignDefinition detail()
          The method is overridden by sub classes which have a detailed definition for their configuration.
 boolean hasDetail()
          Has the the element got detail, i.e more than just an attribute.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAttribute

public SimpleAttribute()
Method Detail

attribute

public java.lang.String attribute()
Description copied from interface: DesignAttribute
Get the attribute text.

Specified by:
attribute in interface DesignAttribute
Returns:
The attribute text. Can be null.

attribute

public void attribute(java.lang.String value)
Description copied from interface: DesignAttribute
Set the attribute text.

Specified by:
attribute in interface DesignAttribute
Parameters:
value - The attribute. May be null.

hasDetail

public boolean hasDetail()
Description copied from interface: DesignElement
Has the the element got detail, i.e more than just an attribute.

Specified by:
hasDetail in interface DesignElement
Returns:
true if it has, false otherwise.

detail

public DesignDefinition detail()
Description copied from interface: DesignElement
The method is overridden by sub classes which have a detailed definition for their configuration. For DesignElement which hasn't got detail this method should never be called, and as such it should throw a RuntimeException if it is.

Specified by:
detail in interface DesignElement
Returns:
The DesignDefinition for their configuration. Never null.

clear

public void clear()
Description copied from interface: DesignElement
Clear the DesignElement of Data. This method will be called when a selection changes.

Specified by:
clear in interface DesignElement