|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.wotonomy.control.EODelayedObserver
net.wotonomy.ui.EOAssociation
net.wotonomy.ui.swing.TreeModelAssociation
net.wotonomy.ui.swing.TreeAssociation
public class TreeAssociation
TreeAssociation is a TreeModelAssociation further customized for JTrees. It binds a JTree to a display group's list of displayable objects, each of which may have a list of child objects managed by another display group, and so on. TreeAssociation works exactly like a ListAssociation, with the additional capability to specify a "Children" aspect, that will allow child objects to be retrieved from a parent display group. Note that the children aspect requires the bound display group to have a DataSource that can vend a DataSource appropriate for the bound key That data source is then used to create data sources for child nodes, and so on.
Field Summary |
---|
Fields inherited from class net.wotonomy.ui.swing.TreeModelAssociation |
---|
childrenGroupChanged, isListening, titlesGroupChanged |
Fields inherited from class net.wotonomy.ui.EOAssociation |
---|
ActionAspect, ArgumentAspect, aspectToGroup, aspectToKey, AttributeAspectSignature, AttributeToManyAspectSignature, AttributeToOneAspectSignature, AttributeToOneToManyAspectSignature, BoldAspect, ChildrenAspect, control, DestinationAspect, EditableAspect, EnabledAspect, IconAspect, IsLeafAspect, ItalicAspect, LabelAspect, NullAspectSignature, ObjectsAspect, ParentAspect, SelectedObjectAspect, SelectedTitleAspect, SourceAspect, TitlesAspect, ToManyAspectSignature, ToOneAspectSignature, ToOneToManyAspectSignature, URLAspect, ValueAspect, VisibleAspect |
Fields inherited from class net.wotonomy.control.EODelayedObserver |
---|
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird |
Constructor Summary | |
---|---|
TreeAssociation(java.lang.Object anObject)
Constructor expecting a JTree. |
|
TreeAssociation(java.lang.Object anObject,
java.lang.Object aRootLabel)
Constructor expecting a JTree or similar component and specifying a label for the root node. |
Method Summary | |
---|---|
void |
establishConnection()
Overridden to not fire events during initial population. |
void |
fireTreeNodesChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Fires a tree nodes changed event to all listeners. |
void |
fireTreeNodesInserted(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Fires a tree nodes inserted event to all listeners. |
void |
fireTreeNodesRemoved(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Fires a tree nodes removed event to all listeners. |
void |
fireTreeStructureChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Fires a tree structure changed event to all listeners. |
void |
focusGained(java.awt.event.FocusEvent evt)
Notifies of beginning of edit. |
void |
focusLost(java.awt.event.FocusEvent evt)
Updates object on focus lost and notifies of end of edit. |
protected void |
init()
Called by both constructors. |
static boolean |
isUsableWithObject(java.lang.Object anObject)
Returns whether this class can control the specified object. |
boolean |
isVisible(java.lang.Object node)
Overridden to check whether the node is visible in the tree on screen. |
net.wotonomy.foundation.NSArray |
objectsFetchedIntoChildrenGroup()
Overridden to return all visible rows in the tree. |
void |
run()
Fires any queued node changed and structure changed events. |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent event)
Updates the children display group, if any. |
void |
treeExpanded(javax.swing.event.TreeExpansionEvent event)
Updates the children display group, if any. |
void |
treeWillCollapse(javax.swing.event.TreeExpansionEvent event)
|
void |
treeWillExpand(javax.swing.event.TreeExpansionEvent event)
|
void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
|
Methods inherited from class net.wotonomy.ui.EOAssociation |
---|
associationClassesForObject, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, displayName, endEditing, object, setValueForAspect, setValueForAspectAtIndex, shouldEndEditing, shouldEndEditingAtIndex, valueForAspect, valueForAspectAtIndex |
Methods inherited from class net.wotonomy.control.EODelayedObserver |
---|
discardPendingNotification, observerQueue, priority, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeAssociation(java.lang.Object anObject)
public TreeAssociation(java.lang.Object anObject, java.lang.Object aRootLabel)
Method Detail |
---|
protected void init()
public static boolean isUsableWithObject(java.lang.Object anObject)
public void establishConnection()
establishConnection
in class TreeModelAssociation
public void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
in interface javax.swing.event.TreeSelectionListener
valueChanged
in class TreeModelAssociation
public boolean isVisible(java.lang.Object node)
isVisible
in class TreeModelAssociation
public void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
fireTreeNodesChanged
in class TreeModelAssociation
public void fireTreeNodesInserted(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
fireTreeNodesInserted
in class TreeModelAssociation
public void fireTreeNodesRemoved(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
fireTreeNodesRemoved
in class TreeModelAssociation
public void fireTreeStructureChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
fireTreeStructureChanged
in class TreeModelAssociation
public net.wotonomy.foundation.NSArray objectsFetchedIntoChildrenGroup()
objectsFetchedIntoChildrenGroup
in class TreeModelAssociation
public void focusGained(java.awt.event.FocusEvent evt)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent evt)
focusLost
in interface java.awt.event.FocusListener
public void treeWillExpand(javax.swing.event.TreeExpansionEvent event) throws javax.swing.tree.ExpandVetoException
treeWillExpand
in interface javax.swing.event.TreeWillExpandListener
javax.swing.tree.ExpandVetoException
public void treeWillCollapse(javax.swing.event.TreeExpansionEvent event) throws javax.swing.tree.ExpandVetoException
treeWillCollapse
in interface javax.swing.event.TreeWillExpandListener
javax.swing.tree.ExpandVetoException
public void treeExpanded(javax.swing.event.TreeExpansionEvent event)
treeExpanded
in interface javax.swing.event.TreeExpansionListener
public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)
treeCollapsed
in interface javax.swing.event.TreeExpansionListener
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |