| java.lang.Object com.javelin.swinglets.SComponent com.javelin.swinglets.STree
All known Subclasses: com.javelin.examples.swinglets.DemoTree,
STree | public class STree extends SComponent (Code) | | STree defines a tree.
This fires an ActionEvent, when the ID is the row number.
author: Robin Sharp |
Constructor Summary | |
public | STree(TreeModel model) | public | STree(TreeNode root) Returns a STree with the specified TreeNode as its root, which
displays the root node. | public | STree(TreeNode root, boolean asksAllowsChildren) Returns a STree with the specified TreeNode as its root, which
displays the root node and which decides whether a node is a
leaf node in the specified manner. | public | STree() Returns a STree with the specified no tree model. |
Method Summary | |
public void | collapsePath(TreePath path) Ensures that the node identified by the specified path is collapsed. | public void | collapseRow(int row) Ensures that the node in the specified row is collapsed. | public void | expandPath(TreePath path) Ensures that the node identified by the specified path is expanded. | public void | expandRow(int row) Ensures that the node in the specified row is expanded. | public SIcon | getBackgroundIcon() Get Tree Background. | public SComponent | getComponent(String name) Get a sub component by name. | public Enumeration | getExpandedDescendants(TreePath path) Returns an Enumeration of the descendants of path that
are currently expanded. | protected Vector | getExpandedDescendants(Vector vector, TreePath path) Recurse down the hierarchy, and add all expanded nodes any
unexpanded children. | public TreeModel | getModel() Get Model. | public TreePath | getPathForRow(int row) Returns the path for the specified row, or null. | public int | getRowCount() Return the number of nodes to be displayed. | public int | getRowForPath(TreePath path) Returns the row for the path, or -1. | public TreePath | getSelectedPath() Get the last Selected Path, or null. | public boolean | getShowsRootHandles() Returns true if handles for the root nodes are displayed. | public STreeCellRenderer | getTreeCellRenderer() Get Tree cell renderer, for the current look and feel. | public STreeCellRenderer | getTreeCellRenderer(String lookAndFeel) Get Tree cell renderer, or null. | public Class | getUIClass() Returns the name of the L&F class that renders this component. | public boolean | isCollapsed(TreePath path) Returns true if the value identified by path is currently collapsed,
this will return false if any of the values in path are currently
not being displayed. | public boolean | isCollapsed(int row) Returns true if the node at the specified display row is collapsed. | public boolean | isExpanded(TreePath path) | public boolean | isExpanded(int row) Returns true if the node at the specified display row is currently
expanded. | public boolean | isPathSelected(TreePath path) Is this path selected. | public boolean | isRootVisible() Is the root be visible. | public boolean | isVisible(TreePath path) Returns true if the value identified by path is currently viewable,
which means it is either the root or all of its parents are exapnded,
Otherwise, this method returns false. | protected void | processEvent(AWTEvent event) Processes events occurring on this component. | protected void | processFormEvent(FormEvent event) Process the FormEvent to compute which node has been
expanded or contracted. | public STree | setBackgroundIcon(SIcon backgroundIcon) Set the background icon. | protected void | setExpandedState(TreePath path, boolean state) Sets the expanded state of the receiver. | public STree | setModel(TreeModel model) Set Model. | public STree | setRootVisible(boolean rootVisible) Set the root be visible. | public STree | setRowCount(int rowCount) Set the number of nodes to be displayed. | public STree | setShowsRootHandles(boolean showsRootHandles) Determines whether the node handles are to be displayed. | public STree | setTreeCellRenderer(STreeCellRenderer treeCellRenderer) Set Tree cell renderer for the current look and feel. | public STree | setTreeCellRenderer(String lookAndFeel, STreeCellRenderer treeCellRenderer) Set Tree cell renderer for each look and feel. |
LABEL | final public static String LABEL(Code) | | Parameter that indicates the the LABEL has been selected.
|
LABEL_SELECTED | final public static int LABEL_SELECTED(Code) | | Action Event id that indicates a label has been selected
|
NODE | final public static String NODE(Code) | | Parameter that indicates the the NODE has been selected.
|
NODE_COLLAPSED | final public static int NODE_COLLAPSED(Code) | | Action Event id that indicates a node has been collapsed
|
NODE_EXPANDED | final public static int NODE_EXPANDED(Code) | | Action Event id that indicates a node has been expanded
|
TEMP_STACK_SIZE | protected static int TEMP_STACK_SIZE(Code) | | |
rootVisible | protected boolean rootVisible(Code) | | |
rowCount | protected int rowCount(Code) | | |
showsRootHandles | protected boolean showsRootHandles(Code) | | |
STree | public STree(TreeModel model)(Code) | | Creates a STree with a swing table model
|
STree | public STree(TreeNode root)(Code) | | Returns a STree with the specified TreeNode as its root, which
displays the root node. By default, the tree defines a leaf node as any node
without children.
|
STree | public STree(TreeNode root, boolean asksAllowsChildren)(Code) | | Returns a STree with the specified TreeNode as its root, which
displays the root node and which decides whether a node is a
leaf node in the specified manner.
|
STree | public STree()(Code) | | Returns a STree with the specified no tree model.
|
collapsePath | public void collapsePath(TreePath path)(Code) | | Ensures that the node identified by the specified path is collapsed.
|
collapseRow | public void collapseRow(int row)(Code) | | Ensures that the node in the specified row is collapsed.
|
expandPath | public void expandPath(TreePath path)(Code) | | Ensures that the node identified by the specified path is expanded.
|
expandRow | public void expandRow(int row)(Code) | | Ensures that the node in the specified row is expanded.
|
getBackgroundIcon | public SIcon getBackgroundIcon()(Code) | | Get Tree Background.
|
getComponent | public SComponent getComponent(String name)(Code) | | Get a sub component by name. This will descend the component
hierarchy and return the SComponent, or null.
|
getExpandedDescendants | public Enumeration getExpandedDescendants(TreePath path)(Code) | | Returns an Enumeration of the descendants of path that
are currently expanded.
|
getExpandedDescendants | protected Vector getExpandedDescendants(Vector vector, TreePath path)(Code) | | Recurse down the hierarchy, and add all expanded nodes any
unexpanded children.
|
getPathForRow | public TreePath getPathForRow(int row)(Code) | | Returns the path for the specified row, or null.
|
getRowCount | public int getRowCount()(Code) | | Return the number of nodes to be displayed.
|
getRowForPath | public int getRowForPath(TreePath path)(Code) | | Returns the row for the path, or -1.
|
getSelectedPath | public TreePath getSelectedPath()(Code) | | Get the last Selected Path, or null.
|
getShowsRootHandles | public boolean getShowsRootHandles()(Code) | | Returns true if handles for the root nodes are displayed.
|
getTreeCellRenderer | public STreeCellRenderer getTreeCellRenderer()(Code) | | Get Tree cell renderer, for the current look and feel.
|
getTreeCellRenderer | public STreeCellRenderer getTreeCellRenderer(String lookAndFeel)(Code) | | Get Tree cell renderer, or null.
If a renderer has not been installed for the look and feel, it is.
picked up from the LookAndFeel as SLookAndFeel.TREE_DEFAULT_CELL_RENDERER.
|
getUIClass | public Class getUIClass()(Code) | | Returns the name of the L&F class that renders this component.
|
isCollapsed | public boolean isCollapsed(TreePath path)(Code) | | Returns true if the value identified by path is currently collapsed,
this will return false if any of the values in path are currently
not being displayed.
|
isCollapsed | public boolean isCollapsed(int row)(Code) | | Returns true if the node at the specified display row is collapsed.
|
isExpanded | public boolean isExpanded(TreePath path)(Code) | | Returns true if the node identified by the path is currently expanded,
|
isExpanded | public boolean isExpanded(int row)(Code) | | Returns true if the node at the specified display row is currently
expanded.
|
isPathSelected | public boolean isPathSelected(TreePath path)(Code) | | Is this path selected.
|
isRootVisible | public boolean isRootVisible()(Code) | | Is the root be visible.
|
isVisible | public boolean isVisible(TreePath path)(Code) | | Returns true if the value identified by path is currently viewable,
which means it is either the root or all of its parents are exapnded,
Otherwise, this method returns false.
|
processEvent | protected void processEvent(AWTEvent event)(Code) | | Processes events occurring on this component.
|
processFormEvent | protected void processFormEvent(FormEvent event)(Code) | | Process the FormEvent to compute which node has been
expanded or contracted.
|
setBackgroundIcon | public STree setBackgroundIcon(SIcon backgroundIcon)(Code) | | Set the background icon.
|
setExpandedState | protected void setExpandedState(TreePath path, boolean state)(Code) | | Sets the expanded state of the receiver. If state is
true, all parents of path and path are marked as
expanded. If state is false, all parents of
path are marked EXPANDED, but path itself
is marked collapsed.
This will fail if a TreeWillExpandListener vetos it.
|
setRootVisible | public STree setRootVisible(boolean rootVisible)(Code) | | Set the root be visible.
|
setRowCount | public STree setRowCount(int rowCount)(Code) | | Set the number of nodes to be displayed.
|
setShowsRootHandles | public STree setShowsRootHandles(boolean showsRootHandles)(Code) | | Determines whether the node handles are to be displayed.
|
setTreeCellRenderer | public STree setTreeCellRenderer(STreeCellRenderer treeCellRenderer)(Code) | | Set Tree cell renderer for the current look and feel.
|
Methods inherited from com.javelin.swinglets.SComponent | public SComponent addActionListener(ActionListener l)(Code)(Java Doc) public SComponent addComponentListener(ComponentListener listener)(Code)(Java Doc) public SComponent addFocusListener(FocusListener listener)(Code)(Java Doc) public SComponent addKeyListener(KeyListener listener)(Code)(Java Doc) public SComponent addMouseListener(MouseListener listener)(Code)(Java Doc) public SComponent addMouseMotionListener(MouseMotionListener listener)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public synchronized SComponent addPropertyChangeListener(PropertyChangeListener listener) throws TooManyListenersException(Code)(Java Doc) public synchronized SComponent addPropertyChangeListener(String propertyName, PropertyChangeListener listener) throws TooManyListenersException(Code)(Java Doc) public SComponent addScript(SScript script)(Code)(Java Doc) protected SComponent addUIListener(EventListener listener)(Code)(Java Doc) protected String constructComponentName()(Code)(Java Doc) public void dispatchEvent(AWTEvent event)(Code)(Java Doc) public boolean equals(Object object)(Code)(Java Doc) public void firePropertyChange()(Code)(Java Doc) final public void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, byte oldValue, byte newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, char oldValue, char newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, short oldValue, short newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, int oldValue, int newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, long oldValue, long newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, float oldValue, float newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, double oldValue, double newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)(Code)(Java Doc) public SContainer getAncestorNamed(String name)(Code)(Java Doc) public SContainer getAncestorOfClass(Class clazz)(Code)(Java Doc) public SColor getBackground()(Code)(Java Doc) public SBorder getBorder()(Code)(Java Doc) public Enumeration getClientKeys()(Code)(Java Doc) final public Object getClientProperty(Object key)(Code)(Java Doc) final public Object getClientProperty(Object key, Object defaultValue)(Code)(Java Doc) public int getClientPropertyCount()(Code)(Java Doc) public SComponent getComponent(String name)(Code)(Java Doc) public String getComponentUrl()(Code)(Java Doc) public String getContentType()(Code)(Java Doc) public Cursor getCursor()(Code)(Java Doc) public SFont getFont()(Code)(Java Doc) public SColor getForeground()(Code)(Java Doc) public int getHorizontalAlignment()(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public SLookAndFeel getLookAndFeel()(Code)(Java Doc) public String getName()(Code)(Java Doc) public SContainer getParent()(Code)(Java Doc) public int getScriptCount()(Code)(Java Doc) public Enumeration getScripts()(Code)(Java Doc) public Dimension getSize()(Code)(Java Doc) public SwingletManager getSwingletManager()(Code)(Java Doc) public int getTabIndex()(Code)(Java Doc) public String getToolTipText()(Code)(Java Doc) public SContainer getTopLevelAncestor()(Code)(Java Doc) public SComponentUI getUI()(Code)(Java Doc) public Class getUIClass()(Code)(Java Doc) public int getVerticalAlignment()(Code)(Java Doc) final protected boolean hasListeners()(Code)(Java Doc) final protected boolean hasListeners(String propertyName)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isCached()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFiringSuspended()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public void onFirstPaint()(Code)(Java Doc) public void onPaintComponent()(Code)(Java Doc) public void onPaintComponentFooter()(Code)(Java Doc) public void onPaintComponentHeader()(Code)(Java Doc) public void onPaintHeader()(Code)(Java Doc) public void paint(Object out)(Code)(Java Doc) public void paintComponent(Object out)(Code)(Java Doc) public void paintComponentFooter(Object out)(Code)(Java Doc) public void paintComponentHeader(Object out)(Code)(Java Doc) public void paintHeader(Object out)(Code)(Java Doc) public void processActionEvent(ActionEvent event)(Code)(Java Doc) protected void processEvent(AWTEvent event)(Code)(Java Doc) final public SComponent putClientProperty(Object key, Object value)(Code)(Java Doc) public SComponent removeActionListener(ActionListener l)(Code)(Java Doc) public SComponent removeComponentListener(ComponentListener listener)(Code)(Java Doc) public SComponent removeFocusListener(FocusListener listener)(Code)(Java Doc) public SComponent removeKeyListener(KeyListener listener)(Code)(Java Doc) public SComponent removeMouseListener(MouseListener listener)(Code)(Java Doc) public SComponent removeMouseMotionListener(MouseMotionListener listener)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public synchronized SComponent removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public synchronized SComponent removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public SComponent removeScript(SScript script)(Code)(Java Doc) protected SComponent removeUIListener(EventListener listener)(Code)(Java Doc) public SComponent setBackground(SColor background)(Code)(Java Doc) public SComponent setBorder(SBorder border)(Code)(Java Doc) public void setCached(boolean cached)(Code)(Java Doc) public void setCursor(Cursor cursor)(Code)(Java Doc) public SComponent setEnabled(boolean enabled)(Code)(Java Doc) public void setFiringSuspended(boolean firingSuspended)(Code)(Java Doc) public SComponent setFont(String name, int style, int size)(Code)(Java Doc) public SComponent setFont(SFont font)(Code)(Java Doc) public SComponent setForeground(SColor foreground)(Code)(Java Doc) public SComponent setHorizontalAlignment(int horizontalAlignment)(Code)(Java Doc) public SComponent setLocale(Locale locale)(Code)(Java Doc) public SComponent setLookAndFeel(String lookAndFeel)(Code)(Java Doc) public SComponent setLookAndFeel(SLookAndFeel lookAndFeel)(Code)(Java Doc) public SComponent setName(String name)(Code)(Java Doc) public SComponent setOpaque(boolean opaque)(Code)(Java Doc) public SComponent setParent(SContainer parent)(Code)(Java Doc) public SComponent setSize(int width, int height)(Code)(Java Doc) public SComponent setSize(Dimension size)(Code)(Java Doc) public void setSwingletManager(SwingletManager swingletManager)(Code)(Java Doc) public SComponent setTabIndex(int tabIndex)(Code)(Java Doc) public SComponent setToolTipText(String toolTipText)(Code)(Java Doc) public SComponent setUI(SComponentUI ui)(Code)(Java Doc) public SComponent setValueAsText(String text)(Code)(Java Doc) public SComponent setVerticalAlignment(int verticalAlignment)(Code)(Java Doc) public SComponent setVisible(boolean visible)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|