org.oddjob.designer.model
Class MultiTypeTable

java.lang.Object
  extended byjava.util.Observable
      extended byorg.oddjob.designer.model.MultiTypeTable
All Implemented Interfaces:
DesignDefinition

public class MultiTypeTable
extends java.util.Observable
implements DesignDefinition

A model for a DesignElement which can contain multiple child DesignElements of various types. This model supports both name types, as used in a Map or unnamed types as used in a List.

This model is Observable and will update observers when a child DesignElement changes.


Constructor Summary
MultiTypeTable(java.lang.String heading, DesignElementType de)
           
 
Method Summary
 void accept(DesignProcessor processor)
          Visitor pattern.
 int childCount()
           
 java.lang.String getChildName(int index)
           
 java.lang.String getChildType(int index)
           
 DesignElement getChildValue(int index)
           
 DesignElementType getDesignElement()
           
 java.lang.String[] getSupportedTypes()
           
 java.lang.String getTitle()
          The title will either be the title for a field or the title round a group or the title on a dialog depending on how the visual component is presented.
 int getVisibleRows()
           
 void insertChild(int index, java.lang.String type)
           
 boolean isNamed()
           
 boolean isPopulated()
          Used by certain summary views to indicate that there is more detail.
 void removeChild(int index)
           
 void setChildName(int index, java.lang.String name)
           
 MultiTypeTable setNamed(boolean named)
           
 MultiTypeTable setVisibleRows(int visibleRows)
           
 
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

MultiTypeTable

public MultiTypeTable(java.lang.String heading,
                      DesignElementType de)
Method Detail

getTitle

public java.lang.String getTitle()
Description copied from interface: DesignDefinition
The title will either be the title for a field or the title round a group or the title on a dialog depending on how the visual component is presented.

Specified by:
getTitle in interface DesignDefinition
Returns:
The title.

getDesignElement

public DesignElementType getDesignElement()

accept

public void accept(DesignProcessor processor)
Description copied from interface: DesignDefinition
Visitor pattern. Implementations will call the appropriate method on the processor passing themselves as the argument.

Specified by:
accept in interface DesignDefinition
Parameters:
processor - A design processor which will typically produce visual components for the model.

isNamed

public boolean isNamed()
Returns:
Returns the named.

setNamed

public MultiTypeTable setNamed(boolean named)
Parameters:
named - The named to set.

isPopulated

public boolean isPopulated()
Description copied from interface: DesignDefinition
Used by certain summary views to indicate that there is more detail.

Specified by:
isPopulated in interface DesignDefinition
Returns:
true if the model has some data, false if it doesn't.

childCount

public int childCount()

getChildType

public java.lang.String getChildType(int index)

removeChild

public void removeChild(int index)

insertChild

public void insertChild(int index,
                        java.lang.String type)

getChildName

public java.lang.String getChildName(int index)

setChildName

public void setChildName(int index,
                         java.lang.String name)

getChildValue

public DesignElement getChildValue(int index)

getSupportedTypes

public java.lang.String[] getSupportedTypes()

getVisibleRows

public int getVisibleRows()
Returns:
Returns the visibleRows.

setVisibleRows

public MultiTypeTable setVisibleRows(int visibleRows)
Parameters:
visibleRows - The visibleRows to set.