public class TreeWrapper extends ControlWrapper implements ITree
Constructor and Description |
---|
TreeWrapper(ITree widget) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(ITreeNodeVisitor visitor)
Visits the nodes of the container by a visitor
|
ITreeNode |
addNode() |
ITreeNode |
addNode(int index) |
ITreeNode |
addNode(int index,
ITreeNodeDescriptor descriptor) |
ITreeNode |
addNode(ITreeNodeDescriptor descriptor) |
void |
addTreeListener(ITreeListener listener) |
void |
addTreePopupDetectionListener(ITreePopupDetectionListener listener) |
void |
addTreeSelectionListener(ITreeSelectionListener listener) |
void |
clearSelection() |
java.util.List<ITreeNode> |
getChildren() |
int |
getLevel()
Gets the level of the node, where 0 is the root level
|
ITreeNode |
getNodeAt(Position position) |
ITreeContainer |
getParentContainer() |
java.util.Collection<ITreeNode> |
getSelection() |
protected ITree |
getWidget() |
void |
removeAllNodes() |
void |
removeNode(int index) |
void |
removeNode(ITreeNode node) |
void |
removeTreeListener(ITreeListener listener) |
void |
removeTreePopupDetectionListener(ITreePopupDetectionListener listener) |
void |
removeTreeSelectionListener(ITreeSelectionListener listener) |
void |
setAllChildrenBelowExpandedAboveCollapsed(int pivotLevel)
Expands all nodes of the given level and below and collapses all nodes above
|
void |
setAllChildrenChecked(boolean checked) |
void |
setAllChildrenExpanded(boolean expanded) |
void |
setAllChildrenExpanded(java.lang.Integer pivotLevel,
boolean expanded)
Sets all children expanded or collapsed until a pivot level is reached
|
void |
setSelection(java.util.Collection<? extends ITreeNode> selection) |
void |
setSelection(ITreeNode... selection) |
addParentListener, getDragSource, getDropTarget, getLayoutConstraints, getMaxSize, getMinSize, getParent, getPreferredSize, getRoot, removeParentListener, setLayoutConstraints, setMaxSize, setMinSize, setParent, setPreferredSize, setToolTipText
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addPopupDetectionListener, addShowingStateListener, createPopupMenu, fromComponent, getBackgroundColor, getBounds, getForegroundColor, getPosition, getSize, hasFocus, isReparentable, isShowing, isVisible, redraw, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePopupDetectionListener, removeShowingStateListener, requestFocus, setBackgroundColor, setBounds, setCursor, setForegroundColor, setPopupMenu, setPosition, setPosition, setRedrawEnabled, setSize, setSize, setVisible, toComponent, toLocal, toScreen
addDisposeListener, dispose, getUiReference, isDisposed, isEnabled, removeDisposeListener, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDragSource, getDropTarget, getParent, getRoot, setMaxSize, setMinSize, setParent, setPreferredSize
createPopupMenu, fromComponent, getBounds, hasFocus, isReparentable, isShowing, setBounds, setPopupMenu, setPosition, setSize, toComponent, toLocal, toScreen
dispose, isDisposed
addDisposeListener, removeDisposeListener
addShowingStateListener, removeShowingStateListener
addParentListener, removeParentListener
getLayoutConstraints, getMaxSize, getMinSize, getPreferredSize, setLayoutConstraints, setToolTipText
getBackgroundColor, getForegroundColor, getPosition, getSize, isVisible, redraw, requestFocus, setBackgroundColor, setCursor, setForegroundColor, setPosition, setRedrawEnabled, setSize, setVisible
getUiReference, isEnabled, setEnabled
addComponentListener, removeComponentListener
addFocusListener, removeFocusListener
addKeyListener, removeKeyListener
addMouseListener, removeMouseListener
addMouseMotionListener, removeMouseMotionListener
addPopupDetectionListener, removePopupDetectionListener
public TreeWrapper(ITree widget)
protected ITree getWidget()
getWidget
in class ControlWrapper
public ITreeNode addNode()
addNode
in interface ITreeContainer
public ITreeNode addNode(int index)
addNode
in interface ITreeContainer
public ITreeNode addNode(ITreeNodeDescriptor descriptor)
addNode
in interface ITreeContainer
public ITreeNode addNode(int index, ITreeNodeDescriptor descriptor)
addNode
in interface ITreeContainer
public void removeNode(ITreeNode node)
removeNode
in interface ITreeContainer
public void removeNode(int index)
removeNode
in interface ITreeContainer
public void removeAllNodes()
removeAllNodes
in interface ITreeContainer
public java.util.List<ITreeNode> getChildren()
getChildren
in interface ITreeContainer
public ITreeContainer getParentContainer()
getParentContainer
in interface ITreeContainer
public void setAllChildrenExpanded(boolean expanded)
setAllChildrenExpanded
in interface ITreeContainer
public void setAllChildrenExpanded(java.lang.Integer pivotLevel, boolean expanded)
ITreeContainer
setAllChildrenExpanded
in interface ITreeContainer
pivotLevel
- The pivot level to use, assuming this node has level 0, the children level 1 and so on
If expanded is true, all nodes of this level and below will be expanded
If expanded is false, all node of this level and above will be collapsed
If expanded is null, the expansion is unboundexpanded
- If true, nodes will be expanded, I false nodes will be collapsedpublic void setAllChildrenBelowExpandedAboveCollapsed(int pivotLevel)
ITreeContainer
setAllChildrenBelowExpandedAboveCollapsed
in interface ITreeContainer
pivotLevel
- The pivot level, assuming this node has level 0, the children level 1 and so onpublic void setAllChildrenChecked(boolean checked)
setAllChildrenChecked
in interface ITreeContainer
public int getLevel()
ITreeContainer
getLevel
in interface ITreeContainer
public boolean accept(ITreeNodeVisitor visitor)
ITreeContainer
accept
in interface ITreeContainer
visitor
- The visitor to visit the nodes, must not be nullpublic void addTreeListener(ITreeListener listener)
addTreeListener
in interface ITreeObservable
public void removeTreeListener(ITreeListener listener)
removeTreeListener
in interface ITreeObservable
public void addTreeSelectionListener(ITreeSelectionListener listener)
addTreeSelectionListener
in interface ITreeSelectionObservable
public void removeTreeSelectionListener(ITreeSelectionListener listener)
removeTreeSelectionListener
in interface ITreeSelectionObservable
public void addTreePopupDetectionListener(ITreePopupDetectionListener listener)
addTreePopupDetectionListener
in interface ITreePopupDetectionObservable
public void removeTreePopupDetectionListener(ITreePopupDetectionListener listener)
removeTreePopupDetectionListener
in interface ITreePopupDetectionObservable
public java.util.Collection<ITreeNode> getSelection()
getSelection
in interface ITree
public void setSelection(java.util.Collection<? extends ITreeNode> selection)
setSelection
in interface ITree
public void setSelection(ITreeNode... selection)
setSelection
in interface ITree
public void clearSelection()
clearSelection
in interface ITree
Siehe auch Jowidgets Nutzerhandbuch