org.wings
Class STree

java.lang.Object
  extended by org.wings.SComponent
      extended by org.wings.STree
All Implemented Interfaces:
Serializable, Cloneable, LowLevelEventListener, Renderable, Scrollable

public class STree
extends SComponent
implements Scrollable, LowLevelEventListener

Swing-like tree widget.

Author:
Armin Haaf
See Also:
Serialized Form

Nested Class Summary
protected  class STree.TreeModelHandler
          Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.
 
Field Summary
static int CONTIGUOUS_TREE_SELECTION
          Tree selection model.
static int DISCONTIGUOUS_TREE_SELECTION
          Tree selection model.
protected  boolean epochCheckEnabled
           
protected  TreeModel model
           
protected  STreeCellRenderer renderer
           
protected  ArrayList requestedExpansionPaths
          store here expansion paths that will be processed after procession the request.
protected  STreeSelectionModel selectionModel
           
static int SINGLE_TREE_SELECTION
          Tree selection model.
protected  TreeModelListener treeModelListener
           
protected  AbstractLayoutCache treeState
           
protected  Rectangle viewport
          Implementation of the Scrollable interface.
 
Fields inherited from class org.wings.SComponent
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME
 
Constructor Summary
STree()
           
STree(TreeModel model)
           
 
Method Summary
protected  void addDelayedExpansionEvent(TreeExpansionEvent e, boolean expansion)
           
 void addMouseListener(SMouseListener l)
          Adds the specified mouse listener to receive mouse events from this component.
 void addSelectionPath(TreePath path)
          Adds the node identified by the specified TreePath to the current selection.
 void addSelectionPaths(TreePath[] paths)
          Adds each path in the array of paths to the current selection.
 void addSelectionRow(int row)
          Adds the path at the specified row to the current selection.
 void addSelectionRows(int[] rows)
          Adds the paths at each of the specified rows to the current selection.
 void addTreeExpansionListener(TreeExpansionListener tel)
           
 void addTreeSelectionListener(TreeSelectionListener tsl)
           
 void addTreeWillExpandListener(TreeWillExpandListener tel)
          Adds a listener for TreeWillExpand events.
 void addViewportChangeListener(SViewportChangeListener l)
          Adds the given SViewportChangeListener to the scrollable.
 void collapsePath(TreePath p)
           
 void collapseRow(int row)
           
 void collapseRow(TreePath p)
          Deprecated. This method is deprecated and should not be used because collapsePath(TreePath) is the proper method with the same functionality.
protected  TreeModelListener createTreeModelListener()
          Creates an instance of TreeModelHandler.
 void expandPath(TreePath p)
          Expand this tree row.
 void expandRow(int row)
           
 void expandRow(TreePath p)
          Deprecated. This method is deprecated and should not be used because expandPath(TreePath) is the proper method with the same functionality.
protected  int fillPathForAbsoluteRow(int row, Object node, ArrayList path)
           
protected  void fireDelayedExpansionEvents()
           
 void fireFinalEvents()
          Internal event trigger used by CGs.
 void fireIntermediateEvents()
          fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ...
protected  void fireMouseClickedEvent(SMouseEvent event)
          Reports a mouse click event.
 void fireTreeCollapsed(TreePath path)
          Notify all listeners that have registered interest for notification on this event type.
 void fireTreeExpanded(TreePath path)
          Notify all listeners that have registered interest for notification on this event type.
protected  void fireTreeExpansionEvent(TreeExpansionEvent e, boolean expansion)
           
protected  void fireTreeSelectionEvent(TreeSelectionEvent e)
           
 void fireTreeWillExpand(TreePath path, boolean expand)
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireViewportChanged(boolean horizontal)
          Notifies all listeners that have registered interest for notification on changes to this scrollable's viewport in the specified direction.
 STreeCellRenderer getCellRenderer()
           
 SCellRendererPane getCellRendererPane()
           
protected static TreeModel getDefaultTreeModel()
          Creates and returns a sample TreeModel.
 String getExpansionParameter(int row, boolean absolute)
          This is for plafs only! With this parameter the tree expands the given node
 Object getLastSelectedPathComponent()
          Returns the last path component in the first node of the current selection.
 TreePath getLeadSelectionPath()
          Returns the path of the last node added to the selection.
 int getLeadSelectionRow()
          Returns the row index of the last node added to the selection.
 int getMaximumExpandedDepth()
           
 int getMaxSelectionRow()
          Gets the last selected row.
 int getMinSelectionRow()
          Gets the first selected row.
 TreeModel getModel()
           
 int getNodeIndentDepth()
           
protected  TreePath[] getPathBetweenRows(int index0, int index1)
          Returns JTreePath instances representing the path between index0 and index1 (including index1).
 TreePath getPathForAbsoluteRow(int row)
           
 TreePath getPathForRow(int row)
           
 int getRowCount()
           
 int getRowForLocation(SPoint point)
          Returns the tree row for the passed SPoint.
 int getRowForPath(TreePath path)
           
 Rectangle getScrollableViewportSize()
          The size of the component in respect to scrollable units.
 int getSelectionCount()
          Returns the number of nodes selected.
 STreeSelectionModel getSelectionModel()
          Returns the model for selections.
 String getSelectionParameter(int row, boolean absolute)
          This is for plafs only! With this parameter the tree selects the given node
 TreePath getSelectionPath()
          Returns the path to the first selected node.
 TreePath[] getSelectionPaths()
          Returns the paths of all selected values.
 int[] getSelectionRows()
          Returns all of the currently selected rows.
 Rectangle getViewportSize()
          Returns the actual visible part of a scrollable.
 boolean isEpochCheckEnabled()
          Asks the low-level event listener if epoch checking should be perfomed on it.
 boolean isExpanded(TreePath path)
           
 boolean isPathSelected(TreePath path)
          Returns true if the item identified by the path is currently selected.
 boolean isRootVisible()
           
 boolean isRowSelected(int row)
          Returns true if the node identitifed by row is selected.
 boolean isVisible(TreePath path)
           
 void processLowLevelEvent(String action, String[] values)
          Deliver low level/http events (parameters).
protected  void processRequestedExpansionPaths()
           
 void removeMouseListener(SMouseListener l)
          Removes the specified mouse listener so that it no longer receives mouse events from this component.
 void removeSelectionInterval(int index0, int index1)
          Removes the nodes between index0 and index1, inclusive, from the selection.
 void removeSelectionPath(TreePath path)
          Removes the node identified by the specified path from the current selection.
 void removeSelectionPaths(TreePath[] paths)
          Removes the nodes identified by the specified paths from the current selection.
 void removeSelectionRow(int row)
          Removes the path at the index row from the current selection.
 void removeSelectionRows(int[] rows)
           
 void removeTreeExpansionListener(TreeExpansionListener tel)
           
 void removeTreeSelectionListener(TreeSelectionListener tsl)
           
 void removeTreeWillExpandListener(TreeWillExpandListener tel)
          Removes a listener for TreeWillExpand events.
 void removeViewportChangeListener(SViewportChangeListener l)
          Removes the given SViewportChangeListener from the scrollable.
 int rowAtPoint(SPoint point)
          Returns the table row for the passed SPoint instance received via addMouseListener(org.wings.event.SMouseListener).
 void setCellRenderer(STreeCellRenderer x)
           
 void setCG(TreeCG cg)
           
 void setEpochCheckEnabled(boolean epochCheckEnabled)
           
 void setModel(TreeModel m)
           
 void setNodeIndentDepth(int depth)
          Set the indent depth in pixel between two nodes of a different level.
 void setParent(SContainer p)
          Sets the parent container.
protected  void setParentFrame(SFrame f)
          Sets the parent frame.
 void setRootVisible(boolean rootVisible)
           
 void setSelectionModel(STreeSelectionModel selectionModel)
          Sets the tree's selection model.
 void setSelectionPath(TreePath path)
          Selects the node identified by the specified path.
 void setSelectionPaths(TreePath[] paths)
          Selects the nodes identified by the specified array of paths.
 void setSelectionRow(int row)
          Selects the node at the specified row in the display.
 void setSelectionRows(int[] rows)
          Selects the nodes corresponding to each of the specified rows in the display.
 void setViewportSize(Rectangle newViewport)
          Sets the actual visible part of a scrollable.
protected  void togglePathExpansion(TreePath path)
           
protected  void togglePathSelection(TreePath path)
           
 
Methods inherited from class org.wings.SComponent
addComponentListener, addDynamicStyle, addEventListener, addNotify, addParentFrameListener, addPropertyChangeListener, addPropertyChangeListener, addRenderListener, addScriptListener, addStyle, clone, fireComponentChangeEvent, fireKeyEvents, fireRenderEvent, getActionMap, getBackground, getBorder, getCG, getClientProperty, getComponentPopupMenu, getDynamicStyle, getDynamicStyles, getFocusTraversalIndex, getFont, getForeground, getHorizontalAlignment, getInputMap, getInputMap, getListenerCount, getListenerList, getListeners, getLowLevelEventId, getName, getParent, getParentFrame, getPreferredSize, getRequestURL, getResidesInForm, getScriptListenerList, getScriptListeners, getSession, getShowAsFormComponent, getStyle, getToolTipText, getVerticalAlignment, invite, isDifferent, isEnabled, isFocusOwner, isRecursivelyVisible, isReloadForced, isUpdatePossible, isVisible, paramString, processComponentEvent, processKeyEvents, putClientProperty, reload, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, removeComponentListener, removeDynamicStyle, removeEventListener, removeNotify, removeParentFrameListener, removePropertyChangeListener, removePropertyChangeListener, removeRenderListener, removeScriptListener, removeStyle, requestFocus, scrollRectToVisible, setActionMap, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setBackground, setBorder, setCG, setComponentPopupMenu, setDynamicStyles, setEnabled, setFocusTraversalIndex, setFont, setForeground, setHorizontalAlignment, setInputMap, setInputMap, setName, setNameRaw, setPreferredSize, setReloadForced, setShowAsFormComponent, setStyle, setToolTipText, setVerticalAlignment, setVisible, toString, update, updateCG, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wings.LowLevelEventListener
getLowLevelEventId, getName, isEnabled
 

Field Detail

SINGLE_TREE_SELECTION

public static final int SINGLE_TREE_SELECTION
Tree selection model.

See Also:
TreeSelectionModel.setSelectionMode(int), TreeSelectionModel.SINGLE_TREE_SELECTION, Constant Field Values

CONTIGUOUS_TREE_SELECTION

public static final int CONTIGUOUS_TREE_SELECTION
Tree selection model.

See Also:
TreeSelectionModel.setSelectionMode(int), TreeSelectionModel.CONTIGUOUS_TREE_SELECTION, Constant Field Values

DISCONTIGUOUS_TREE_SELECTION

public static final int DISCONTIGUOUS_TREE_SELECTION
Tree selection model.

See Also:
TreeSelectionModel.setSelectionMode(int), TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION, Constant Field Values

model

protected TreeModel model

treeModelListener

protected transient TreeModelListener treeModelListener

renderer

protected STreeCellRenderer renderer

selectionModel

protected STreeSelectionModel selectionModel

requestedExpansionPaths

protected final ArrayList requestedExpansionPaths
store here expansion paths that will be processed after procession the request.


treeState

protected transient AbstractLayoutCache treeState

viewport

protected Rectangle viewport
Implementation of the Scrollable interface.


epochCheckEnabled

protected boolean epochCheckEnabled
See Also:
LowLevelEventListener.isEpochCheckEnabled()
Constructor Detail

STree

public STree(TreeModel model)

STree

public STree()
Method Detail

getDefaultTreeModel

protected static TreeModel getDefaultTreeModel()
Creates and returns a sample TreeModel. Used primarily for beanbuilders. to show something interesting.

Returns:
the default TreeModel

addTreeSelectionListener

public void addTreeSelectionListener(TreeSelectionListener tsl)

removeTreeSelectionListener

public void removeTreeSelectionListener(TreeSelectionListener tsl)

fireTreeSelectionEvent

protected void fireTreeSelectionEvent(TreeSelectionEvent e)

addTreeWillExpandListener

public void addTreeWillExpandListener(TreeWillExpandListener tel)
Adds a listener for TreeWillExpand events.

Parameters:
tel - a TreeWillExpandListener that will be notified when a tree node will be expanded or collapsed (a "negative expansion")

removeTreeWillExpandListener

public void removeTreeWillExpandListener(TreeWillExpandListener tel)
Removes a listener for TreeWillExpand events.

Parameters:
tel - the TreeWillExpandListener to remove

fireTreeWillExpand

public void fireTreeWillExpand(TreePath path,
                               boolean expand)
                        throws ExpandVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the path parameter.

Parameters:
path - the TreePath indicating the node that was expanded
Throws:
ExpandVetoException
See Also:
EventListenerList

addTreeExpansionListener

public void addTreeExpansionListener(TreeExpansionListener tel)

removeTreeExpansionListener

public void removeTreeExpansionListener(TreeExpansionListener tel)

addDelayedExpansionEvent

protected void addDelayedExpansionEvent(TreeExpansionEvent e,
                                        boolean expansion)

fireDelayedExpansionEvents

protected void fireDelayedExpansionEvents()

fireTreeExpanded

public void fireTreeExpanded(TreePath path)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

Parameters:
path - the TreePath indicating the node that was expanded
See Also:
EventListenerList

fireTreeExpansionEvent

protected void fireTreeExpansionEvent(TreeExpansionEvent e,
                                      boolean expansion)

fireTreeCollapsed

public void fireTreeCollapsed(TreePath path)
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

Parameters:
path - the TreePath indicating the node that was collapsed
See Also:
EventListenerList

addMouseListener

public final void addMouseListener(SMouseListener l)
Adds the specified mouse listener to receive mouse events from this component. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the component listener.
See Also:
SMouseEvent, SMouseListener, STable.removeMouseListener(org.wings.event.SMouseListener)

removeMouseListener

public final void removeMouseListener(SMouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the component listener.
See Also:
SMouseEvent, SMouseListener, STable.addMouseListener(org.wings.event.SMouseListener)

fireMouseClickedEvent

protected void fireMouseClickedEvent(SMouseEvent event)
Reports a mouse click event.

Parameters:
event - report this event to all listeners
See Also:
SMouseListener

processRequestedExpansionPaths

protected void processRequestedExpansionPaths()

fireIntermediateEvents

public void fireIntermediateEvents()
Description copied from interface: LowLevelEventListener
fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ...

Specified by:
fireIntermediateEvents in interface LowLevelEventListener

rowAtPoint

public int rowAtPoint(SPoint point)
Returns the table row for the passed SPoint instance received via addMouseListener(org.wings.event.SMouseListener).

Parameters:
point - The pointed retuned by the mouse event.
Returns:
The row index

getRowForLocation

public int getRowForLocation(SPoint point)
Returns the tree row for the passed SPoint. instance received via addMouseListener(org.wings.event.SMouseListener).

Parameters:
point - The pointed returned by the mouse event.
Returns:
The tree row index

fireFinalEvents

public void fireFinalEvents()
Description copied from class: SComponent
Internal event trigger used by CGs. This Method is called internal and should not be called directly

Specified by:
fireFinalEvents in interface LowLevelEventListener
Overrides:
fireFinalEvents in class SComponent

isEpochCheckEnabled

public boolean isEpochCheckEnabled()
Description copied from interface: LowLevelEventListener
Asks the low-level event listener if epoch checking should be perfomed on it. If true the Dispatcher will ignore request originating from old views (typically iniated by triggering browser back and clicking somewhere.)

Specified by:
isEpochCheckEnabled in interface LowLevelEventListener
Returns:
true if epoch checking should be perfomed, false if all request for this component should be processed.
See Also:
LowLevelEventListener.isEpochCheckEnabled()

setEpochCheckEnabled

public void setEpochCheckEnabled(boolean epochCheckEnabled)
See Also:
LowLevelEventListener.isEpochCheckEnabled()

setRootVisible

public void setRootVisible(boolean rootVisible)

isRootVisible

public boolean isRootVisible()

setModel

public void setModel(TreeModel m)

getModel

public TreeModel getModel()

getRowCount

public int getRowCount()

getPathForRow

public TreePath getPathForRow(int row)

getRowForPath

public int getRowForPath(TreePath path)

fillPathForAbsoluteRow

protected int fillPathForAbsoluteRow(int row,
                                     Object node,
                                     ArrayList path)

getPathForAbsoluteRow

public TreePath getPathForAbsoluteRow(int row)

setSelectionModel

public void setSelectionModel(STreeSelectionModel selectionModel)
Sets the tree's selection model. When a null value is specified an empty electionModel is used, which does not allow selections.

Parameters:
selectionModel - the TreeSelectionModel to use, or null to disable selections
See Also:
TreeSelectionModel

getSelectionModel

public STreeSelectionModel getSelectionModel()
Returns the model for selections. This should always return a non-null value. If you don't want to allow anything to be selected set the selection model to null, which forces an empty selection model to be used.

See Also:
setSelectionModel(org.wings.tree.STreeSelectionModel)

getPathBetweenRows

protected TreePath[] getPathBetweenRows(int index0,
                                        int index1)
Returns JTreePath instances representing the path between index0 and index1 (including index1).

Parameters:
index0 - an int specifying a display row, where 0 is the first row in the display
index1 - an int specifying a second display row
Returns:
an array of TreePath objects, one for each node between index0 and index1, inclusive

setSelectionPath

public void setSelectionPath(TreePath path)
Selects the node identified by the specified path. If any component of the path is hidden (under a collapsed node), it is exposed (made viewable).

Parameters:
path - the TreePath specifying the node to select

setSelectionPaths

public void setSelectionPaths(TreePath[] paths)
Selects the nodes identified by the specified array of paths. If any component in any of the paths is hidden (under a collapsed node), it is exposed (made viewable).

Parameters:
paths - an array of TreePath objects that specifies the nodes to select

setSelectionRow

public void setSelectionRow(int row)
Selects the node at the specified row in the display.

Parameters:
row - the row to select, where 0 is the first row in the display

setSelectionRows

public void setSelectionRows(int[] rows)
Selects the nodes corresponding to each of the specified rows in the display.

Parameters:
rows - an array of ints specifying the rows to select, where 0 indicates the first row in the display

addSelectionPath

public void addSelectionPath(TreePath path)
Adds the node identified by the specified TreePath to the current selection. If any component of the path isn't visible, it is made visible.

Parameters:
path - the TreePath to add

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
Adds each path in the array of paths to the current selection. If any component of any of the paths isn't visible, it is made visible.

Parameters:
paths - an array of TreePath objects that specifies the nodes to add

addSelectionRow

public void addSelectionRow(int row)
Adds the path at the specified row to the current selection.

Parameters:
row - an int specifying the row of the node to add, where 0 is the first row in the display

addSelectionRows

public void addSelectionRows(int[] rows)
Adds the paths at each of the specified rows to the current selection.

Parameters:
rows - an array of ints specifying the rows to add, where 0 indicates the first row in the display

getLastSelectedPathComponent

public Object getLastSelectedPathComponent()
Returns the last path component in the first node of the current selection.

Returns:
the last Object in the first selected node's TreePath, or null if nothing is selected
See Also:
TreePath.getLastPathComponent()

getSelectionPath

public TreePath getSelectionPath()
Returns the path to the first selected node.

Returns:
the TreePath for the first selected node, or null if nothing is currently selected

getSelectionPaths

public TreePath[] getSelectionPaths()
Returns the paths of all selected values.

Returns:
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected.

getSelectionRows

public int[] getSelectionRows()
Returns all of the currently selected rows.

Returns:
an array of ints that identifies all currently selected rows where 0 is the first row in the display

getSelectionCount

public int getSelectionCount()
Returns the number of nodes selected.

Returns:
the number of nodes selected

getMinSelectionRow

public int getMinSelectionRow()
Gets the first selected row.

Returns:
an int designating the first selected row, where 0 is the first row in the display

getMaxSelectionRow

public int getMaxSelectionRow()
Gets the last selected row.

Returns:
an int designating the last selected row, where 0 is the first row in the display

getLeadSelectionRow

public int getLeadSelectionRow()
Returns the row index of the last node added to the selection.

Returns:
an int giving the row index of the last node added to the selection, where 0 is the first row in the display

getLeadSelectionPath

public TreePath getLeadSelectionPath()
Returns the path of the last node added to the selection.

Returns:
the TreePath of the last node added to the selection.

isPathSelected

public boolean isPathSelected(TreePath path)
Returns true if the item identified by the path is currently selected.

Parameters:
path - a TreePath identifying a node
Returns:
true if the node is selected

isRowSelected

public boolean isRowSelected(int row)
Returns true if the node identitifed by row is selected.

Parameters:
row - an int specifying a display row, where 0 is the first row in the display
Returns:
true if the node is selected

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Removes the nodes between index0 and index1, inclusive, from the selection.

Parameters:
index0 - an int specifying a display row, where 0 is the first row in the display
index1 - an int specifying a second display row

removeSelectionPath

public void removeSelectionPath(TreePath path)
Removes the node identified by the specified path from the current selection.

Parameters:
path - the TreePath identifying a node

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
Removes the nodes identified by the specified paths from the current selection.

Parameters:
paths - an array of TreePath objects that specifies the nodes to remove

removeSelectionRow

public void removeSelectionRow(int row)
Removes the path at the index row from the current selection.

Parameters:
row - the row identifying the node to remove

removeSelectionRows

public void removeSelectionRows(int[] rows)

getMaximumExpandedDepth

public int getMaximumExpandedDepth()

expandRow

@Deprecated
public void expandRow(TreePath p)
Deprecated. This method is deprecated and should not be used because expandPath(TreePath) is the proper method with the same functionality.

Expand this tree row. If tree is inside a SScrollPane try to adjust pane, so that as much as possible new nodes are visible.

Parameters:
p - the TreePath to expand

expandPath

public void expandPath(TreePath p)
Expand this tree row. If tree is inside a SScrollPane try to adjust pane, so that as much as possible new nodes are visible.

Parameters:
p - the TreePath to expand

expandRow

public void expandRow(int row)

collapseRow

@Deprecated
public void collapseRow(TreePath p)
Deprecated. This method is deprecated and should not be used because collapsePath(TreePath) is the proper method with the same functionality.

Collapse this tree row. If tree is inside a SScrollPane try to adjust pane, so that as much as possible new nodes are visible.

Parameters:
p - the TreePath to expand

collapsePath

public void collapsePath(TreePath p)

collapseRow

public void collapseRow(int row)

isVisible

public boolean isVisible(TreePath path)

isExpanded

public boolean isExpanded(TreePath path)

togglePathSelection

protected void togglePathSelection(TreePath path)

togglePathExpansion

protected void togglePathExpansion(TreePath path)
                            throws ExpandVetoException
Throws:
ExpandVetoException

getExpansionParameter

public String getExpansionParameter(int row,
                                    boolean absolute)
This is for plafs only! With this parameter the tree expands the given node


getSelectionParameter

public String getSelectionParameter(int row,
                                    boolean absolute)
This is for plafs only! With this parameter the tree selects the given node


processLowLevelEvent

public void processLowLevelEvent(String action,
                                 String[] values)
Description copied from interface: LowLevelEventListener
Deliver low level/http events (parameters). The name-value-pairs of the HTTPRequest are considered low level events.

Specified by:
processLowLevelEvent in interface LowLevelEventListener
Overrides:
processLowLevelEvent in class SComponent
Parameters:
action - the name-value-pair's name
values - the name-value-pair's values

setNodeIndentDepth

public void setNodeIndentDepth(int depth)
Set the indent depth in pixel between two nodes of a different level. Note: only positive values apply, negative values are cut off at 0.

Parameters:
depth - the depth to set

getNodeIndentDepth

public int getNodeIndentDepth()

setCellRenderer

public void setCellRenderer(STreeCellRenderer x)

getCellRenderer

public STreeCellRenderer getCellRenderer()

createTreeModelListener

protected TreeModelListener createTreeModelListener()
Creates an instance of TreeModelHandler.


setParent

public void setParent(SContainer p)
Description copied from class: SComponent
Sets the parent container. Also gets the parent frame from the parent.

Overrides:
setParent in class SComponent
Parameters:
p - the container

setParentFrame

protected void setParentFrame(SFrame f)
Description copied from class: SComponent
Sets the parent frame.

Overrides:
setParentFrame in class SComponent
Parameters:
f - the frame

getCellRendererPane

public SCellRendererPane getCellRendererPane()

setCG

public void setCG(TreeCG cg)

getScrollableViewportSize

public Rectangle getScrollableViewportSize()
The size of the component in respect to scrollable units.

Specified by:
getScrollableViewportSize in interface Scrollable

getViewportSize

public Rectangle getViewportSize()
Returns the actual visible part of a scrollable.

Specified by:
getViewportSize in interface Scrollable

setViewportSize

public void setViewportSize(Rectangle newViewport)
Sets the actual visible part of a scrollable.

Specified by:
setViewportSize in interface Scrollable

addViewportChangeListener

public void addViewportChangeListener(SViewportChangeListener l)
Adds the given SViewportChangeListener to the scrollable.

Specified by:
addViewportChangeListener in interface Scrollable
Parameters:
l - the listener to be added

removeViewportChangeListener

public void removeViewportChangeListener(SViewportChangeListener l)
Removes the given SViewportChangeListener from the scrollable.

Specified by:
removeViewportChangeListener in interface Scrollable
Parameters:
l - the listener to be removed

fireViewportChanged

protected void fireViewportChanged(boolean horizontal)
Notifies all listeners that have registered interest for notification on changes to this scrollable's viewport in the specified direction.

See Also:
EventListenerList


wingS Swings ;-)