|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.JTree
Nested Class Summary |
Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
Field Summary | |
protected TreePath |
anchorSelectionPath
|
protected TreeCellEditor |
cellEditor
|
protected TreeCellRenderer |
cellRenderer
|
protected Component |
editingComponent
|
protected java.lang.Object |
editingNode
|
protected org.eclipse.swt.widgets.TreeItem |
editingTreeItem
|
protected boolean |
isEditable
|
protected boolean |
isRootVisible
|
protected TreeModel |
model
|
protected org.eclipse.swt.widgets.Tree |
ppeer
|
protected org.eclipse.swt.custom.TreeEditor |
swtEditor
SWT Editor |
protected java.util.Vector |
treeExpansionListeners
|
protected java.util.Vector |
treeSelectionListeners
|
protected java.util.Vector |
treeWillExpansionListeners
|
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JTree()
|
|
JTree(TreeModel model)
|
|
JTree(TreeNode root)
|
Method Summary | |
void |
addSelectionPath(TreePath t)
|
void |
addSelectionPaths(TreePath[] path)
|
void |
addTreeExpansionListener(TreeExpansionListener l)
|
void |
addTreeSelectionListener(TreeSelectionListener l)
|
void |
addWillTreeExpansionListener(TreeWillExpandListener l)
|
void |
collapsePath(TreePath parent)
|
void |
collapseRow(int row)
|
void |
drawTree()
Draws the tree from the model data |
void |
editingCanceled(ChangeEvent e)
|
void |
editingStopped(ChangeEvent e)
Callback when the editor is stopped - need to put any changes back into the model. |
void |
expandPath(TreePath parent)
|
void |
expandRow(int row)
|
void |
fireTreeExpanded(TreePath path)
|
void |
fireTreeWillExpandOrCollapse(org.eclipse.swt.events.TreeEvent e,
boolean collapse)
Notifies all listeners that have registered interest for notification on this event type. |
TreePath |
getAnchorSelectionPath()
|
TreeCellEditor |
getCellEditor()
|
TreeCellRenderer |
getCellRenderer()
|
TreePath |
getClosestPathForLocation(int x,
int y)
|
java.lang.Object |
getLastSelectedPathComponent()
|
TreeModel |
getModel()
|
TreePath |
getPathForLocation(int x,
int y)
|
TreePath |
getPathForRow(int row)
Because SWT Trees don't have a row concept (apart from a row count), we have to make a guess. |
protected org.eclipse.swt.widgets.TreeItem |
getPeerTreeItem(java.lang.Object swingNode)
|
int |
getRowCount()
|
TreeSelectionModel |
getSelectionModel()
NOT IMPLEMENTED - RETURNS DUMMY STUB |
TreePath |
getSelectionPath()
|
TreePath[] |
getSelectionPaths()
|
TreePath |
getTreePath(java.lang.Object node)
Returns a TreePath from a given node - not a real Swing method, but useful for us here for generating events |
boolean |
isEditable()
|
boolean |
isRootVisible()
Returns true if the root node of the tree is displayed |
protected void |
processTreeEdit(java.lang.Object node,
org.eclipse.swt.widgets.TreeItem item)
Called back when the user selects a node to allow them to edit the value (if the tree is editable) |
protected void |
processTreeExpansion(org.eclipse.swt.events.TreeEvent e,
boolean collapse)
|
protected void |
processTreeSelection(org.eclipse.swt.events.SelectionEvent e)
|
protected void |
registerTreeEvents()
Registers some tree specific events and maps them to Swing events. |
void |
removeSelectionPath(TreePath t)
|
void |
removeSelectionPaths(TreePath[] t)
|
void |
removeTreeExpansionListener(TreeExpansionListener l)
|
void |
removeTreeSelectionListener(TreeSelectionListener l)
|
void |
removeTreeWillExpansionListener(TreeWillExpandListener l)
|
void |
scrollPathToVisible(TreePath t)
Scrolls the Tree to show the selected path |
void |
setAnchorSelectionPath(TreePath path)
|
void |
setCellEditor(TreeCellEditor cell)
|
void |
setCellRenderer(TreeCellRenderer renderer)
|
void |
setEditable(boolean b)
|
void |
setModel(TreeModel model)
|
void |
setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible. |
void |
setScrollsOnExpand(boolean b)
NOT IMPLEMENTED |
void |
setSelectionModel(TreeSelectionModel model)
NOT IMPLEMENTED |
void |
setSelectionPath(TreePath t)
|
void |
setSelectionPaths(TreePath[] t)
|
void |
setShowsRootHandles(boolean b)
NOT IMPLEMENTED |
void |
setSwingWTParent(Container parent)
Once a parent component receives an "add" call for a child, this being the child, this should be called to tell us to instantiate the peer and load in any cached properties. |
void |
treeNodesChanged(TreeModelEvent e)
|
void |
treeNodesInserted(TreeModelEvent e)
|
void |
treeNodesRemoved(TreeModelEvent e)
|
void |
treeStructureChanged(TreeModelEvent e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.eclipse.swt.widgets.Tree ppeer
protected TreeModel model
protected TreeCellRenderer cellRenderer
protected TreeCellEditor cellEditor
protected boolean isEditable
protected boolean isRootVisible
protected TreePath anchorSelectionPath
protected org.eclipse.swt.custom.TreeEditor swtEditor
protected org.eclipse.swt.widgets.TreeItem editingTreeItem
protected java.lang.Object editingNode
protected Component editingComponent
protected java.util.Vector treeWillExpansionListeners
protected java.util.Vector treeExpansionListeners
protected java.util.Vector treeSelectionListeners
Constructor Detail |
public JTree()
public JTree(TreeNode root)
public JTree(TreeModel model)
Method Detail |
protected org.eclipse.swt.widgets.TreeItem getPeerTreeItem(java.lang.Object swingNode)
public void addTreeExpansionListener(TreeExpansionListener l)
public void removeTreeExpansionListener(TreeExpansionListener l)
public void addWillTreeExpansionListener(TreeWillExpandListener l)
public void removeTreeWillExpansionListener(TreeWillExpandListener l)
public void addTreeSelectionListener(TreeSelectionListener l)
public void removeTreeSelectionListener(TreeSelectionListener l)
public void setModel(TreeModel model)
public TreeModel getModel()
public boolean isEditable()
public void setEditable(boolean b)
public void setCellEditor(TreeCellEditor cell)
public TreeCellEditor getCellEditor()
public void setSwingWTParent(Container parent) throws java.lang.Exception
setSwingWTParent
in class JComponent
java.lang.Exception
protected void registerTreeEvents()
protected void processTreeEdit(java.lang.Object node, org.eclipse.swt.widgets.TreeItem item)
public void editingStopped(ChangeEvent e)
editingStopped
in interface CellEditorListener
public void fireTreeExpanded(TreePath path)
public TreePath getAnchorSelectionPath()
public void setAnchorSelectionPath(TreePath path)
protected void processTreeSelection(org.eclipse.swt.events.SelectionEvent e)
protected void processTreeExpansion(org.eclipse.swt.events.TreeEvent e, boolean collapse)
public void fireTreeWillExpandOrCollapse(org.eclipse.swt.events.TreeEvent e, boolean collapse) throws ExpandVetoException
path
parameter.
e
- the TreeExpansionEvent instancecollapse
- boolean indication for collapse state of the tree
ExpandVetoException
public TreePath getTreePath(java.lang.Object node)
public void addSelectionPaths(TreePath[] path)
public TreePath getSelectionPath()
public TreePath[] getSelectionPaths()
public void addSelectionPath(TreePath t)
public void removeSelectionPath(TreePath t)
public void removeSelectionPaths(TreePath[] t)
public void setScrollsOnExpand(boolean b)
public void setShowsRootHandles(boolean b)
public void setSelectionModel(TreeSelectionModel model)
public TreeSelectionModel getSelectionModel()
public void scrollPathToVisible(TreePath t)
public void setSelectionPaths(TreePath[] t)
public void setSelectionPath(TreePath t)
public TreePath getPathForLocation(int x, int y)
public TreePath getClosestPathForLocation(int x, int y)
public TreePath getPathForRow(int row)
public int getRowCount()
public void expandRow(int row)
for faults with row based stuff - use
path methods if possible.
public void collapseRow(int row)
for faults with row based stuff - use
path methods if possible.
public void expandPath(TreePath parent)
public void collapsePath(TreePath parent)
public void drawTree()
public java.lang.Object getLastSelectedPathComponent()
public void setCellRenderer(TreeCellRenderer renderer)
public TreeCellRenderer getCellRenderer()
public void treeNodesChanged(TreeModelEvent e)
treeNodesChanged
in interface TreeModelListener
public void treeNodesInserted(TreeModelEvent e)
treeNodesInserted
in interface TreeModelListener
public void treeNodesRemoved(TreeModelEvent e)
treeNodesRemoved
in interface TreeModelListener
public void treeStructureChanged(TreeModelEvent e)
treeStructureChanged
in interface TreeModelListener
public void setRootVisible(boolean rootVisible)
rootVisible
- true if the root node of the tree is to be displayedpublic boolean isRootVisible()
public void editingCanceled(ChangeEvent e)
editingCanceled
in interface CellEditorListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |