|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.taverna.t2.partition.Partition<ItemType,java.lang.Object,java.lang.Object>
net.sf.taverna.t2.partition.RootPartition<ItemType>
ItemType - all items added to this partition must cast to this typepublic class RootPartition<ItemType extends java.lang.Comparable>
Subclass of Partition acting as the public access point for the partition structure. Exposes a TreeModel for use with a UI.
| Constructor Summary | |
|---|---|
RootPartition(java.util.List<PartitionAlgorithm<?>> pa,
PropertyExtractorRegistry per)
Build a new empty root partition with the specified list of partition algorithm implementations used to recursively allocate new data items to the sub-partitions below this one on addition |
|
| Method Summary | |
|---|---|
void |
addOrUpdateItem(ItemType item)
Add a new item to the partition structure. |
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
|
int |
getChildCount(java.lang.Object parent)
|
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
|
PropertyExtractorRegistry |
getPropertyExtractorRegistry()
|
java.lang.Object |
getRoot()
|
SetModelChangeListener<ItemType> |
getSetModelChangeListener()
The root partition comes with a convenience implementation of SetModelChangeListener which can be used to attach it to a compliant instance of SetModel (assuming the item types match). |
boolean |
isLeaf(java.lang.Object node)
|
void |
removeItem(ItemType item)
Remove an item from the partition structure, if this leaves any partitions with zero item count they are removed as well to keep things tidy. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
setPartitionAlgorithmList(java.util.List<PartitionAlgorithm<?>> pa)
Alter the list of partition algorithms which drive the construction of the partitions. |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
|
| Methods inherited from class net.sf.taverna.t2.partition.Partition |
|---|
getChildPartitionOrder, getChildren, getItemCount, getMembers, getParent, getPartitionAlgorithms, getPartitionPath, getPartitionValue, setChildPartitionOrder, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RootPartition(java.util.List<PartitionAlgorithm<?>> pa,
PropertyExtractorRegistry per)
pa - | Method Detail |
|---|
public SetModelChangeListener<ItemType> getSetModelChangeListener()
public void setPartitionAlgorithmList(java.util.List<PartitionAlgorithm<?>> pa)
pa - a new list of PartitionAlgorithmSPI instances to use as the
basis for the partition structure.public void addOrUpdateItem(ItemType item)
public void removeItem(ItemType item)
item - the item to remove from the partition structure. If this isn't
present in the structure this method does nothing along the
lines of the collections API.
public java.lang.Object getChild(java.lang.Object parent,
int index)
getChild in interface javax.swing.tree.TreeModelpublic int getChildCount(java.lang.Object parent)
getChildCount in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
getIndexOfChild in interface javax.swing.tree.TreeModelpublic java.lang.Object getRoot()
getRoot in interface javax.swing.tree.TreeModelpublic boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelpublic void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener in interface javax.swing.tree.TreeModelpublic void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
valueForPathChanged in interface javax.swing.tree.TreeModelpublic PropertyExtractorRegistry getPropertyExtractorRegistry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||