|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The TreeExplorer
interface defines the API for managing
the nodes in the navigator and explorer trees.
Field Summary | |
static java.lang.String |
DELETE_TNODE_CMD
|
Fields inherited from interface oracle.ide.addin.View |
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP |
Method Summary | |
TNode |
addChild(Element element,
TNode parent,
javax.swing.tree.DefaultTreeModel model)
Add the specified element to the model as
a child of parent . |
void |
addChildren(TNode root)
Add the children to the specified root TNode . |
void |
cacheFilter(TNode node,
ChildFilter filter)
Associate the specified node and filter . |
boolean |
canRefresh(TNode tnode,
java.lang.Class cls)
Check if the ancestor of the specified tnode whose data
object class is an instance of the specified cls can
be refreshed. |
TNode |
childrenAdded(java.util.List children,
TNode parent,
javax.swing.tree.DefaultTreeModel model,
ChildFilter filter,
boolean select)
Add the nodes in the children list to the parent
node . |
TNode |
childrenRemoved(java.util.List removed,
TNode node,
javax.swing.tree.DefaultTreeModel model,
ChildFilter filter)
Remove the nodes in the removed list from the parent
node . |
void |
collapse(TNode tnode,
boolean drop)
Collapse the specified tnode . |
void |
expand(TNode tnode,
boolean all)
Expand the specified tnode . |
ChildFilter |
findCacheFilter(TNode node)
Find the ChildFilter associated with the specified
node . |
TNode |
findTNode(Element element,
TNode root)
Find the TNode encapsulating the specified element . |
TNode |
findTNodeBreadthFirst(Element element,
TNode root)
Find the TNode encapsulating the specified element . |
Attributes |
getCellRendererAttributes()
Renderer attribute control how nodes should be rendered. |
java.util.Comparator |
getComparator()
Get the Comparator that is used to sort the children of this
node. |
Context |
getContext(java.util.EventObject event)
Get the current tree context. |
java.awt.Component |
getGUI()
Returns the component managing the tree. |
javax.swing.JTree |
getJTree()
Returns the JTree . |
TNode |
getRoot()
Returns the root TNode in the tree. |
Element |
getRootElement()
Returns the root Element . |
javax.swing.tree.DefaultTreeModel |
getTreeModel()
Returns the tree model associated with this TreeExplorer . |
void |
nodeChanged(TNode tnode)
Call this method when you want to repaint the cell associated with the specified tnode. |
void |
nodeCollapsed(TNode node,
boolean closing)
Method called when the specified node is collapsed. |
void |
nodeExpanded(TNode node,
boolean opening)
Method called when the specified node is expanded. |
boolean |
open(TNode node)
Add the children of the specified node . |
void |
openFilters(PropertyAccess layout)
Lod the filters for the view identified by the viewId
from the specified layout . |
void |
refresh(TNode tnode)
Drops all children of the specified tnode and immediately
collects them again. |
void |
refresh(TNode tnode,
java.lang.Class cls)
Refresh the ancestor of the specified tnode whose data
object class is an instance of the specified cls . |
TNode |
removeChild(TNode child,
javax.swing.tree.DefaultTreeModel model)
Remove the specified child from the model . |
void |
saveFilters(PropertyAccess layout)
Save the filters for the view identified by the viewId
in the specified layout . |
TNode |
searchTNode(Element element,
TNode root)
Search for the TNode encapsulating the specified
element . |
TNode |
searchTNodeBreadthFirst(Element element,
TNode root)
Search for the TNode encapsulating the specified
element . |
void |
setComparator(java.util.Comparator comparator)
Set the Comparator that is used to sort the children of this
node. |
void |
setRootElement(Element element)
Sets the root Element . |
void |
setSelected(TNode tnode)
Select the given tnode in the tree. |
void |
setSelected(TNode[] tnodes)
Select the given tnodes in the tree. |
boolean |
updateActiveNode(TNode newActiveNode)
Activates the specified TNode . |
void |
updateCachedFilter(ChildFilter filter)
Update the filter cache with the specified filter. |
Methods inherited from interface oracle.ide.addin.View |
activate, addViewListener, addViewSelectionListener, close, deactivate, getContext, getContextMenu, getId, getSelection, getToolbar, isVisible, owner, removeViewListener, removeViewSelectionListener, setToolbarVisible, show, updateTitle, updateVisibleActions |
Methods inherited from interface oracle.ide.addin.ControllerProvider |
getController |
Methods inherited from interface oracle.ide.help.Helpable |
getHelpInfo |
Methods inherited from interface oracle.ide.explorer.IconOverlayConsumer |
getElement, getOverlayCache, setOverlayCache |
Field Detail |
public static final java.lang.String DELETE_TNODE_CMD
Method Detail |
public TNode findTNode(Element element, TNode root)
TNode
encapsulating the specified element
.
Start looking recursively depth first from the given root
node.
Unlike searchTNode(Element, TNode)
, this routine will open
unopened child container nodes during the search in order to find the
specified element. Since this type of search is potentially costly,
searchTNode(Element, TNode)
is preferred in most cases.
public TNode findTNodeBreadthFirst(Element element, TNode root)
TNode
encapsulating the specified element
.
Start looking recursively breadth first from the given root
node. The search does not descend into unopened child container nodes.
Unlike searchTNode(Element, TNode)
, this routine will open
unopened child container nodes during the search in order to find the
specified element. Since this type of search is potentially costly,
searchTNode(Element, TNode)
is preferred in most cases.
public TNode searchTNode(Element element, TNode root)
TNode
encapsulating the specified
element
. Start looking recursively depth first from the given
root
node.The search does not descend into unopened child container nodes.
public TNode searchTNodeBreadthFirst(Element element, TNode root)
TNode
encapsulating the specified
element
. Start looking recursively breadth first from the
given root
node.The search does not descend into unopened child container nodes.
public ChildFilter findCacheFilter(TNode node)
ChildFilter
associated with the specified
node
.
Returns null
if no filter is found.
public void cacheFilter(TNode node, ChildFilter filter)
node
and filter
.
public void updateCachedFilter(ChildFilter filter)
public void saveFilters(PropertyAccess layout)
viewId
in the specified layout
.
public void openFilters(PropertyAccess layout)
viewId
from the specified layout
.
public void addChildren(TNode root)
root
TNode
.
If a ChildFilter
is found for root
, this method
gets the children from the filter.
public TNode addChild(Element element, TNode parent, javax.swing.tree.DefaultTreeModel model)
element
to the model
as
a child of parent
.
Returns the TNode
encapsulating the Element
.
public TNode removeChild(TNode child, javax.swing.tree.DefaultTreeModel model)
child
from the model
.
Returns the TNode
closest to the removed child
.
public TNode childrenRemoved(java.util.List removed, TNode node, javax.swing.tree.DefaultTreeModel model, ChildFilter filter)
removed
list from the parent
node
. If a filter
is specified the method
delegates the children removal to the ChildFilter
. The
model
parameter is passed to the filter
so that it can remove the children from the tree model.
public TNode childrenAdded(java.util.List children, TNode parent, javax.swing.tree.DefaultTreeModel model, ChildFilter filter, boolean select)
children
list to the parent
node
. If a filter
is specified the method
delegates the children addition to the ChildFilter
. The
model
parameter is passed to the filter
so that it can add the children to the tree model. When the
select
parameter is true
, the last
child added is selected in the tree.
public boolean open(TNode node)
node
. If the node is
already opened this method returns immediately. Reloads the tree model
once the children are added to the node
.
public void nodeChanged(TNode tnode)
TNode
should not be null
.
public void refresh(TNode tnode)
tnode
and immediately
collects them again.
public void refresh(TNode tnode, java.lang.Class cls)
tnode
whose data
object class is an instance of the specified cls
.
cls
- The class of the data object contained by the ancestor
of tnode that should be refreshed.public boolean canRefresh(TNode tnode, java.lang.Class cls)
tnode
whose data
object class is an instance of the specified cls
can
be refreshed.
cls
- The class of the data object contained by the ancestor
of tnode that should be refreshed.public void expand(TNode tnode, boolean all)
tnode
. If all
is set
to true
, it recursively expands container children.
public void collapse(TNode tnode, boolean drop)
tnode
. If drop
is set
to true
, it drops all children.
public void setSelected(TNode tnode)
tnode
in the tree.
public void setSelected(TNode[] tnodes)
tnodes
in the tree.
public javax.swing.tree.DefaultTreeModel getTreeModel()
TreeExplorer
.
public java.util.Comparator getComparator()
Comparator
that is used to sort the children of this
node.
public void setComparator(java.util.Comparator comparator)
Comparator
that is used to sort the children of this
node. Calling this method has no effect if the node is not a
container node. If the comparator has changed, then the child nodes
are re-ordered.
comparator
- The Comparator
used for sorting the children
of this node; if null
, the children are not sorted.public boolean updateActiveNode(TNode newActiveNode)
TNode
. It makes sure that the affected
nodes are repainted.
public void nodeExpanded(TNode node, boolean opening)
node
is expanded. When
opening
is true
, the node
is
being opened for the first time.
public void nodeCollapsed(TNode node, boolean closing)
node
is collapsed. When
closing
is true
, node
is about
to drop all of its children and will be set to an un-opened state.
public TNode getRoot()
TNode
in the tree.
public Element getRootElement()
Element
.
public void setRootElement(Element element)
Element
.
public javax.swing.JTree getJTree()
JTree
.
getJTree
in interface IconOverlayConsumer
public java.awt.Component getGUI()
getGUI
in interface View
public Context getContext(java.util.EventObject event)
getContext
in interface View
event
- event associated with the context;public Attributes getCellRendererAttributes()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.