All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCOutlinerComponent

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jclass.bwt.JCComponent
                           |
                           +----jclass.bwt.JCOutlinerComponent

public class JCOutlinerComponent
extends JCComponent
implements JCOutlinerInterface, JCMultiColumnInterface, JCSortInterface, JCScrollableInterface
The internal private component of a JCOutliner.

See Also:
JCOutliner

Variable Index

 o actionListeners
List of JCActionEvent listeners
 o BEGIN
 o data
The object which maintains the multi-column data.
 o default_style
 o END
 o FOLDER_CLOSED
 o FOLDER_OPEN_ALL
 o FOLDER_OPEN_FOLDERS
 o FOLDER_OPEN_ITEMS
 o FOLDER_OPEN_NONE
 o full_node_height
 o itemListeners
List of JCOutlinerEvent listeners
 o node_list
List of all nodes, in drawing order.
 o scrolled_window
Parent window.
 o shortcut_close_icon
 o shortcut_open_icon
 o SHORTCUT_SIZE
 o style_list

Constructor Index

 o JCOutlinerComponent()
Creates an empty JCOutliner.
 o JCOutlinerComponent(JCOutlinerNode)
Creates a new JCOutliner with the specified root node.
 o JCOutlinerComponent(JCOutlinerNode, Applet, String)
Creates an outliner which reads parameters from the applet's HTML file.

Method Index

 o addActionListener(JCActionListener)
Adds the specified action listener to receive action events.
 o addItemListener(JCItemListener)
Adds the specified item listener to receive node events.
 o addNotify()
Creates icons and processes nodes.
 o calculateNodeHeight(JCOutlinerNode)
Calculates the height of a node (by looking at the node's style).
 o calculateStyleHeight(JCOutlinerNodeStyle)
Calculates the height of a node given its style characteristics.
 o calcWidth(int)
Calculates the width of a column for all nodes.
 o calcWidth(JCOutlinerNode, int)
Calculates the width of a node's column, excluding the left and right margins.
 o checkState(int)
Checks that a state is valid.
 o compare(Object, Object)
JCSortInterface comparison method.
 o countAllNodes(JCOutlinerNode, JCVector)
Returns the number of nodes and subnodes in a folder, regardless of visibility
 o countChildren(JCOutlinerNode)
Returns the number of nodes and subnodes in a folder.
 o countPreviousRows(JCOutlinerNode)
Returns the number of visible nodes prior to a node.
 o countRows(JCOutlinerNode)
Returns the number of visible nodes and subnodes in a folder.
 o countRows(JCOutlinerNode, JCOutlinerNode)
Returns the number of visible nodes between 2 nodes.
 o doubleClickAction(JCOutlinerNode, Event)
Called when the node is double-clicked.
 o drawNode(JCOutlinerNode, boolean)
Draws a single node.
 o drawNode(JCOutlinerNode, Graphics, boolean)
Draws a single node.
 o drawNode(JCOutlinerNode, int, int, Graphics)
Draws a node and its children.
 o drawShortcut(JCOutlinerNode, Graphics, int, int)
Draws a folder's shortcut button.
 o eventInShortcut(Event, JCOutlinerNode)
Returns true if the node is a folder and the event is within the folder's shortcut button.
 o eventToNode(Event)
Gets the node in which the event occurred.
 o findNode(char)
Finds the first node whose label starts with the specified character, or null if none could be found.
 o findNode(JCOutlinerNode, int)
Returns a visible node at a position.
 o folderChanged(JCOutlinerNode)
Notifies the outliner that the number of a folder's children has changed.
 o getAutoSelect()
Gets the AutoSelect value.
 o getBatched()
Gets the Batched value.
 o getBounds(JCOutlinerNode, Rectangle)
Gets the physical bounding rectangle of a node (icon and label) (ie adjusted for scrolling and insets).
 o getColumnAlignment(int)
Gets a column's alignment.
 o getColumnAlignments()
Gets the column alignments.
 o getColumnLeftMargin(int)
Gets the column's left margin value (pixels).
 o getColumnPosition(int)
Gets the physical position of the left boundary of the column (accounting for horizontal scrolling).
 o getColumnRightMargin(int)
Gets the column's right margin value (pixels).
 o getColumnWidth(int)
Gets the current width of a column, or 0 if the column does not exist.
 o getColumnWidths()
Gets a list of the column widths.
 o getDefaultNodeStyle()
Gets the default node style.
 o getDoubleBufferGraphics()
Creates a double-buffer image, for subsequent retrieval via getDoubleBufferImage
 o getDoubleBufferImage()
Returns the double-buffer image previously created in a call to getDoubleBufferGraphics.
 o getFocusNode()
Returns the node which currently has focus, or null.
 o getHorizOrigin()
Gets the horizontal origin.
 o getIcon(JCOutlinerNode)
Gets the appropriate image for a node.
 o getMultiColumnData()
Gets the component's JCMultiColumnData instance.
 o getNextNode(JCOutlinerNode)
Returns the next node (not necessarily visible).
 o getNextState(JCOutlinerNode)
Gets the folder's next state, or BWTEnum.NOVALUE if the node is not a folder.
 o getNextVisibleNode(JCOutlinerNode)
Returns the next visible node, or null if none was found.
 o getNodeHeight()
Gets the NodeHeight value.
 o getNodeIndent()
Gets the NodeIndent value.
 o getNumColumns()
Gets the current number of columns.
 o getNumNodes()
Gets the current number of non-collapsed nodes (ie the number of open folders and their children).
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o getPreviousNode(JCOutlinerNode)
Returns the previous node (not necessarily visible).
 o getPreviousVisibleNode(JCOutlinerNode)
Returns the previous visible node, or null if none was found.
 o getRootNode()
Gets the root node.
 o getRootVisible()
Gets the RootVisible value.
 o getSelectedIndexes()
Returns an array (length 1) containing the selected index (0), or null if no items are selected.
 o getSelectedNode()
Returns the currently selected node, or null.
 o getSelectedObjects()
Returns the an array (length 1) containing the label of the selected node, or null if no node is selected.
 o getSpacing()
Gets the spacing between items.
 o getStateList()
Gets the current StateList.
 o getStyleList()
Gets the current StyleList.
 o getTree()
Gets the current node hierarchy as a string list.
 o getVertOrigin()
Gets the vertical origin.
 o getVisibleNodes()
Gets a list of the nodes which are currently displayed.
 o getVisibleRows()
Returns the number of visible lines.
 o invalidate()
Invalidates the component.
 o isVisible(JCOutlinerNode)
Checks whether the node should be visible.
 o keyDown(Event, int)
If the down arrow is hit, calls nextFocus.

If the up arrow is hit, calls previousFocus.

If RETURN is hit, calls doubleClickAction for the focus node.

If space key is hit, selects focus node.

 o makeNodeVisible(JCOutlinerNode)
Scrolls the display if necessary to make the node visible.
 o mouseDown(Event, int, int)
Process mouse down events.

If a node is clicked, setFocusNode and selectNode are called.

If a node is double-clicked or a shortcut button is clicked, calls doubleClickAction.

 o nextFocus(Event)
Sets the focus on the next node after the current node which has focus.
 o paintComponent(Graphics)
Draws all visible nodes.
 o postActionEvent(Event, int, JCOutlinerNode, int)
Posts an JCActionEvent and/or a JCOutlinerEvent
 o preferredHeight()
Calculates the height based on the node heights.
 o preferredWidth()
Gets the subclass' preferred width (default: 100).
 o previousFocus(Event)
Sets the focus on the previous node before the current node which has focus.
 o processRootNode()
Sets the node_list.
 o removeActionListener(JCActionListener)
Removes the specified action listener so it no longer receives action events.
 o removeItemListener(JCItemListener)
Removes the specified item listener so it no longer receives node events.
 o repaint()
Repaints the component if Batched is false.
 o selectNode(JCOutlinerNode, Event)
Selects a node, and posts a JCOutlinerEvent.
 o setAutoSelect(boolean)
If true (default), the node which currently has focus is also selected.
 o setBatched(boolean)
If false (default), the component is repainted every time an item is changed.
 o setColumnAlignment(int, int)
Sets a column's alignment.
 o setColumnAlignments(int[])
Sets the column's alignments.
 o setColumnButtons(JCVector)
If the list is a child of a JCMultiColumnList, sets a header for the window with buttons with the specified labels.
 o setColumnLabels(JCVector)
If the list is a child of a JCMultiColumnList, sets a header for the window with the specified labels.
 o setColumnLeftMargin(int, int)
Sets the column's left margin value (pixels) (default: 2).
 o setColumnRightMargin(int, int)
Sets the column's right margin value (pixels) (default: 2).

The values for all columns may be set from an HTML file using a PARAM tag with a "ColumnRightMargins" name and a comma-separated list of ints.

 o setColumnWidth(int, int)
Sets the width of a column.
 o setColumnWidths(int[])
Sets the list of column widths.
 o setDoubleBuffer(boolean)
Controls whether double-buffering is used when displaying and updating the component.

HTML param name/value: "DoubleBuffer"/boolean

 o setFocusNode(JCOutlinerNode, Event)
Sets a node to have the keyboard focus.
 o setFont(Font)
Sets the font of the component.
 o setHorizOrigin(int)
Sets the horizontal origin prior to scrolling.
 o setNodeHeight(int)
Sets the height of each node (pixels).
 o setNodeIndent(int)
Sets the indentation of each node relative to its parent (pixels) (default: 15).
 o setNodeState(JCOutlinerNode, int, boolean)
Sets the state of a folder.
 o setNumColumns(int)
Sets the current number of columns (default: 1).

HTML param name/value: "NumColumns"/int

 o setRootNode(JCOutlinerNode)
Sets the root node.
 o setRootVisible(boolean)
If true (default), the root node is drawn.
 o setSpacing(int)
Sets the spacing between items (default: 0).
 o setStateList(int[])
Sets a list of values used for double-clicking on a folder or clicking it shortcut button.
 o setStyleList(JCOutlinerNodeStyle[])
Sets the list of node styles.
 o setTree(String[])
Sets the node hierarchy by parsing the string list.
 o setVertOrigin(int)
Sets the vertical origin prior to scrolling.
 o setVisibleRows(int)
Sets the number of visible rows.
 o shouldBeDrawn(JCOutlinerNode)
Checks the node's folder to determine whether the node should be drawn.
 o sort(int, JCSortInterface, int)
Sorts the open nodes in the list based on a specified column, using the String equivalents of each value.

Variables

 o FOLDER_CLOSED
  public final static int FOLDER_CLOSED
 o FOLDER_OPEN_NONE
  public final static int FOLDER_OPEN_NONE
 o FOLDER_OPEN_FOLDERS
  public final static int FOLDER_OPEN_FOLDERS
 o FOLDER_OPEN_ITEMS
  public final static int FOLDER_OPEN_ITEMS
 o FOLDER_OPEN_ALL
  public final static int FOLDER_OPEN_ALL
 o data
  protected OutlinerMultiColumnData data
The object which maintains the multi-column data.

 o scrolled_window
  protected transient JCMultiColumnWindow scrolled_window
Parent window.

 o node_list
  protected JCVector node_list
List of all nodes, in drawing order.

 o style_list
  protected JCOutlinerNodeStyle style_list[]
 o default_style
  protected JCOutlinerNodeStyle default_style
 o shortcut_open_icon
  protected transient Image shortcut_open_icon
 o shortcut_close_icon
  protected transient Image shortcut_close_icon
 o SHORTCUT_SIZE
  protected final static int SHORTCUT_SIZE
 o BEGIN
  protected final static int BEGIN
 o END
  protected final static int END
 o full_node_height
  protected int full_node_height
 o itemListeners
  protected JCVector itemListeners
List of JCOutlinerEvent listeners

 o actionListeners
  protected JCVector actionListeners
List of JCActionEvent listeners

Constructors

 o JCOutlinerComponent
  public JCOutlinerComponent()
Creates an empty JCOutliner.

 o JCOutlinerComponent
  public JCOutlinerComponent(JCOutlinerNode root)
Creates a new JCOutliner with the specified root node.

 o JCOutlinerComponent
  public JCOutlinerComponent(JCOutlinerNode root,
                             Applet applet,
                             String name)
Creates an outliner which reads parameters from the applet's HTML file.

Parameters:
root - the root node (may be null, and set later with setRootNode())
applet - the applet whose PARAM tags are to be read
name - if this is not null, only parameters preceded by this name are read
See Also:
setRootNode, getParameter, JCString

Methods

 o getParameters
  protected void getParameters()
Reads the parameter values from the HTML page using the component's applet. The values will override those previously set.

Overrides:
getParameters in class JCComponent
 o setFont
  public synchronized void setFont(Font f)
Sets the font of the component. This value may be set from an HTML file using a PARAM tag with a "Font" name and a Font value.

Overrides:
setFont in class JCComponent
See Also:
toFont
 o processRootNode
  protected void processRootNode()
Sets the node_list.

 o setColumnLabels
  public void setColumnLabels(JCVector labels)
If the list is a child of a JCMultiColumnList, sets a header for the window with the specified labels.

See Also:
setColumnLabels
 o setColumnButtons
  public void setColumnButtons(JCVector labels)
If the list is a child of a JCMultiColumnList, sets a header for the window with buttons with the specified labels.

See Also:
setColumnButtons
 o folderChanged
  public void folderChanged(JCOutlinerNode node)
Notifies the outliner that the number of a folder's children has changed. This must be called only if the outliner has been made visible.

 o getRootNode
  public JCOutlinerNode getRootNode()
Gets the root node.

See Also:
setRootNode
 o setRootNode
  public void setRootNode(JCOutlinerNode node)
Sets the root node.

 o getTree
  public String[] getTree()
Gets the current node hierarchy as a string list.

See Also:
setTree
 o setTree
  public void setTree(String s[])
Sets the node hierarchy by parsing the string list. Each line in the list represents a node. Spaces or tabs at the start of each line specify the tree hierarchy. Lines with the same indentation level are children.

Throws: IllegalArgumentException
if the indentation levels are invalid
 o getRootVisible
  public boolean getRootVisible()
Gets the RootVisible value.

See Also:
setRootVisible
 o setRootVisible
  public void setRootVisible(boolean v)
If true (default), the root node is drawn.

 o getBatched
  public boolean getBatched()
Gets the Batched value.

See Also:
setBatched
 o setBatched
  public void setBatched(boolean v)
If false (default), the component is repainted every time an item is changed. If set to true, the component is only repainted (if necessary) when the value is again set to false.

 o getNodeHeight
  public int getNodeHeight()
Gets the NodeHeight value.

See Also:
setNodeHeight
 o setNodeHeight
  public void setNodeHeight(int v)
Sets the height of each node (pixels). If 0 (default), the height is determined using the largest font and image height in the list of node styles.

 o getNumNodes
  public int getNumNodes()
Gets the current number of non-collapsed nodes (ie the number of open folders and their children).

 o getAutoSelect
  public boolean getAutoSelect()
Gets the AutoSelect value.

See Also:
setAutoSelect
 o setAutoSelect
  public void setAutoSelect(boolean v)
If true (default), the node which currently has focus is also selected.

See Also:
setFocusNode, selectNode
 o getNodeIndent
  public int getNodeIndent()
Gets the NodeIndent value.

See Also:
setNodeIndent
 o setNodeIndent
  public void setNodeIndent(int v)
Sets the indentation of each node relative to its parent (pixels) (default: 15).

 o getStateList
  public int[] getStateList()
Gets the current StateList.

See Also:
setStateList
 o setStateList
  public void setStateList(int list[])
Sets a list of values used for double-clicking on a folder or clicking it shortcut button. If this list is changed, the outliner will be redrawn. The folder's state is cycled through the list. Valid values:
FOLDER_CLOSED       Folder closed; no children visible
FOLDER_OPEN_NONE    Folder open; no children visible
FOLDER_OPEN_FOLDERS Folder open; only folder children visible
FOLDER_OPEN_ITEMS   Folder open; only non-folder children visible
FOLDER_OPEN_ALL     Folder open; all children visible
 
Default value: { FOLDER_CLOSED, FOLDER_OPEN_ALL }

 o getStyleList
  public JCOutlinerNodeStyle[] getStyleList()
Gets the current StyleList.

See Also:
setStyleList
 o setStyleList
  public void setStyleList(JCOutlinerNodeStyle list[])
Sets the list of node styles. The list is only used for determining the node height if it has not been set.

See Also:
setNodeHeight
 o getDefaultNodeStyle
  public JCOutlinerNodeStyle getDefaultNodeStyle()
Gets the default node style.

 o getSpacing
  public int getSpacing()
Gets the spacing between items.

See Also:
setSpacing
 o setSpacing
  public void setSpacing(int v)
Sets the spacing between items (default: 0). This value increases the HighlightThickness value.

See Also:
setHighlightThickness
 o getVisibleRows
  public int getVisibleRows()
Returns the number of visible lines.

See Also:
setVisibleRows
 o setVisibleRows
  public void setVisibleRows(int v)
Sets the number of visible rows. If set to 0 (default), the list will attempt to resize itself so that all its items are visible.

 o getSelectedIndexes
  public int[] getSelectedIndexes()
Returns an array (length 1) containing the selected index (0), or null if no items are selected.

 o getSelectedObjects
  public Object[] getSelectedObjects()
Returns the an array (length 1) containing the label of the selected node, or null if no node is selected.

 o getSelectedNode
  public JCOutlinerNode getSelectedNode()
Returns the currently selected node, or null.

 o selectNode
  public void selectNode(JCOutlinerNode node,
                         Event ev)
Selects a node, and posts a JCOutlinerEvent.

Parameters:
node - if null, the currently selected node is deselected
ev - event which caused the selection
See Also:
addItemListener
 o getFocusNode
  public JCOutlinerNode getFocusNode()
Returns the node which currently has focus, or null.

 o setFocusNode
  public void setFocusNode(JCOutlinerNode node,
                           Event ev)
Sets a node to have the keyboard focus.

Parameters:
node - if null, no the current focus node is unchanged
ev - event which caused the focus change
 o getVisibleNodes
  public JCVector getVisibleNodes()
Gets a list of the nodes which are currently displayed.

 o findNode
  public JCOutlinerNode findNode(char c)
Finds the first node whose label starts with the specified character, or null if none could be found.

 o calculateNodeHeight
  public int calculateNodeHeight(JCOutlinerNode node)
Calculates the height of a node (by looking at the node's style).

 o calculateStyleHeight
  protected int calculateStyleHeight(JCOutlinerNodeStyle style)
Calculates the height of a node given its style characteristics.

 o preferredHeight
  protected int preferredHeight()
Calculates the height based on the node heights.

Overrides:
preferredHeight in class JCComponent
 o preferredWidth
  protected int preferredWidth()
Gets the subclass' preferred width (default: 100).

Overrides:
preferredWidth in class JCComponent
 o repaint
  public synchronized void repaint()
Repaints the component if Batched is false.

Overrides:
repaint in class JCComponent
See Also:
setBatched
 o addNotify
  public void addNotify()
Creates icons and processes nodes.

Overrides:
addNotify in class JCComponent
 o setDoubleBuffer
  public void setDoubleBuffer(boolean v)
Controls whether double-buffering is used when displaying and updating the component.

HTML param name/value: "DoubleBuffer"/boolean

Overrides:
setDoubleBuffer in class JCComponent
 o invalidate
  public void invalidate()
Invalidates the component.

Overrides:
invalidate in class Component
 o getDoubleBufferImage
  public Image getDoubleBufferImage()
Returns the double-buffer image previously created in a call to getDoubleBufferGraphics.

Overrides:
getDoubleBufferImage in class JCComponent
 o getDoubleBufferGraphics
  public synchronized Graphics getDoubleBufferGraphics()
Creates a double-buffer image, for subsequent retrieval via getDoubleBufferImage

Overrides:
getDoubleBufferGraphics in class JCComponent
 o paintComponent
  protected void paintComponent(Graphics gc)
Draws all visible nodes.

Overrides:
paintComponent in class JCComponent
 o setNodeState
  public boolean setNodeState(JCOutlinerNode node,
                              int state,
                              boolean notify)
Sets the state of a folder.

Parameters:
node - if not a folder, no action is taken
state - one of:
FOLDER_CLOSED       Folder closed; no children visible
FOLDER_OPEN_NONE    Folder open; no children visible
FOLDER_OPEN_FOLDERS Folder open; only folder children visible
FOLDER_OPEN_ITEMS   Folder open; only non-folder children visible
FOLDER_OPEN_ALL     Folder open; all children visible
 
notify - if true, a JCOutlinerEvent is posted for the node
Returns:
false if the app disallowed the state change
Throws: IllegalArgumentException
If the value is invalid
See Also:
addItemListener
 o makeNodeVisible
  public boolean makeNodeVisible(JCOutlinerNode node)
Scrolls the display if necessary to make the node visible.

Returns:
false if the node could not be made visible due to its parents state
 o checkState
  protected boolean checkState(int state)
Checks that a state is valid.

 o getNextState
  protected int getNextState(JCOutlinerNode folder)
Gets the folder's next state, or BWTEnum.NOVALUE if the node is not a folder.

 o getNextNode
  public JCOutlinerNode getNextNode(JCOutlinerNode node)
Returns the next node (not necessarily visible).

See Also:
getNextVisibleNode
 o getNextVisibleNode
  public JCOutlinerNode getNextVisibleNode(JCOutlinerNode node)
Returns the next visible node, or null if none was found.

 o getPreviousNode
  public JCOutlinerNode getPreviousNode(JCOutlinerNode node)
Returns the previous node (not necessarily visible).

See Also:
getPreviousVisibleNode
 o getPreviousVisibleNode
  public JCOutlinerNode getPreviousVisibleNode(JCOutlinerNode node)
Returns the previous visible node, or null if none was found.

 o nextFocus
  protected boolean nextFocus(Event ev)
Sets the focus on the next node after the current node which has focus.

 o previousFocus
  protected boolean previousFocus(Event ev)
Sets the focus on the previous node before the current node which has focus.

 o addItemListener
  public void addItemListener(JCItemListener l)
Adds the specified item listener to receive node events. If the listener implements JCOutlinerListener (an JCItemListener subclass), it will be passed JCOutlinerEvents.

See Also:
JCItemEvent, JCOutlinerEvent, JCOutlinerListener
 o removeItemListener
  public void removeItemListener(JCItemListener l)
Removes the specified item listener so it no longer receives node events.

 o addActionListener
  public void addActionListener(JCActionListener l)
Adds the specified action listener to receive action events. Action events occur when a node is double-clicked.

See Also:
JCActionEvent
 o removeActionListener
  public void removeActionListener(JCActionListener l)
Removes the specified action listener so it no longer receives action events.

See Also:
addActionListener
 o postActionEvent
  protected JCOutlinerEvent postActionEvent(Event ev,
                                            int stage,
                                            JCOutlinerNode node,
                                            int new_state)
Posts an JCActionEvent and/or a JCOutlinerEvent

Parameters:
stage - BEGIN or END
Returns:
the posted event, or null if no itemListeners have been registered #see addActionListeners #see addItemListeners
 o doubleClickAction
  protected boolean doubleClickAction(JCOutlinerNode node,
                                      Event ev)
Called when the node is double-clicked.

 o keyDown
  public boolean keyDown(Event ev,
                         int key)
If the down arrow is hit, calls nextFocus.

If the up arrow is hit, calls previousFocus.

If RETURN is hit, calls doubleClickAction for the focus node.

If space key is hit, selects focus node.

Overrides:
keyDown in class Component
See Also:
nextFocus, previousFocus, doubleClickAction
 o eventToNode
  public JCOutlinerNode eventToNode(Event ev)
Gets the node in which the event occurred.

 o eventInShortcut
  public boolean eventInShortcut(Event ev,
                                 JCOutlinerNode node)
Returns true if the node is a folder and the event is within the folder's shortcut button.

 o mouseDown
  public boolean mouseDown(Event ev,
                           int x,
                           int y)
Process mouse down events.

If a node is clicked, setFocusNode and selectNode are called.

If a node is double-clicked or a shortcut button is clicked, calls doubleClickAction.

Overrides:
mouseDown in class JCComponent
See Also:
setFocusNode, selectNode, doubleClickAction
 o getBounds
  public Rectangle getBounds(JCOutlinerNode node,
                             Rectangle rect)
Gets the physical bounding rectangle of a node (icon and label) (ie adjusted for scrolling and insets).

Parameters:
rect - if not null, its members are set
Returns:
null if rect is null, otherwise the bounding rectangle
 o getIcon
  protected Image getIcon(JCOutlinerNode node)
Gets the appropriate image for a node.

 o shouldBeDrawn
  protected boolean shouldBeDrawn(JCOutlinerNode node)
Checks the node's folder to determine whether the node should be drawn.

 o isVisible
  protected boolean isVisible(JCOutlinerNode node)
Checks whether the node should be visible.

 o drawNode
  protected boolean drawNode(JCOutlinerNode node,
                             boolean clear)
Draws a single node.

Parameters:
clear - if true, the node's rectangle is cleared to the background color
Returns:
false if the node is outside the drawing area
 o drawNode
  protected boolean drawNode(JCOutlinerNode node,
                             Graphics gc,
                             boolean clear)
Draws a single node.

Parameters:
clear - if true, the node's rectangle is cleared to the background color
Returns:
false if the node is outside the drawing area
 o drawNode
  protected int drawNode(JCOutlinerNode node,
                         int indent,
                         int row,
                         Graphics gc)
Draws a node and its children.

Parameters:
indent - indentation level at which to draw node
row - row at which to draw node
Returns:
the number of rows this node took to display
 o drawShortcut
  protected void drawShortcut(JCOutlinerNode node,
                              Graphics gc,
                              int x,
                              int y)
Draws a folder's shortcut button.

 o countRows
  protected int countRows(JCOutlinerNode node)
Returns the number of visible nodes and subnodes in a folder.

 o countChildren
  protected int countChildren(JCOutlinerNode node)
Returns the number of nodes and subnodes in a folder.

 o countPreviousRows
  protected int countPreviousRows(JCOutlinerNode node)
Returns the number of visible nodes prior to a node.

 o countRows
  protected int countRows(JCOutlinerNode from,
                          JCOutlinerNode to)
Returns the number of visible nodes between 2 nodes.

 o countAllNodes
  protected int countAllNodes(JCOutlinerNode node,
                              JCVector list)
Returns the number of nodes and subnodes in a folder, regardless of visibility

Parameters:
list - if not null, the node is added to it
 o findNode
  protected JCOutlinerNode findNode(JCOutlinerNode node,
                                    int row)
Returns a visible node at a position. If not present, its visible children are checked.

 o compare
  public boolean compare(Object o1,
                         Object o2)
JCSortInterface comparison method. Compares nodes based on their labels.

 o sort
  public void sort(int column,
                   JCSortInterface sort_if,
                   int direction)
Sorts the open nodes in the list based on a specified column, using the String equivalents of each value.

Parameters:
sort_if - An optional interface whose compare method is called during sorting, to provide a mechanism for the application to specify whether one object is greater than another (similar to qsort's compare function). If this parameter is null, the column is sorted by numerical or string comparison as applicable.
direction - sort direction: JCqsort.ASCENDING or DESCENDING
 o calcWidth
  protected int calcWidth(JCOutlinerNode node,
                          int col)
Calculates the width of a node's column, excluding the left and right margins.

 o calcWidth
  public int calcWidth(int col)
Calculates the width of a column for all nodes.

 o getColumnWidths
  public int[] getColumnWidths()
Gets a list of the column widths.

See Also:
setColumnWidths
 o setColumnWidths
  public void setColumnWidths(int widths[])
Sets the list of column widths. If a column's value is set to BWTEnum.VARIABLE, the width is set to the widest value in the column.

This value may be set from an HTML file using a PARAM tag with a "ColumnWidths" name and a comma-separated list of ints.

 o getColumnWidth
  public int getColumnWidth(int col)
Gets the current width of a column, or 0 if the column does not exist.

 o setColumnWidth
  public void setColumnWidth(int col,
                             int width)
Sets the width of a column. If the value is set to BWTEnum.VARIABLE, the width is set to the widest value in the column.

 o getNumColumns
  public int getNumColumns()
Gets the current number of columns.

 o setNumColumns
  public void setNumColumns(int v)
Sets the current number of columns (default: 1).

HTML param name/value: "NumColumns"/int

 o getColumnAlignments
  public int[] getColumnAlignments()
Gets the column alignments.

 o getColumnAlignment
  public int getColumnAlignment(int col)
Gets a column's alignment.

 o setColumnAlignment
  public void setColumnAlignment(int col,
                                 int align)
Sets a column's alignment. The first column's alignment (column 0) cannot be set.

Parameters:
alignment - one of: BWTEnum.TOPLEFT, TOPCENTER, TOPRIGHT, MIDDLELEFT (default), MIDDLECENTER, MIDDLERIGHT, BOTTOMLEFT, BOTTOMCENTER and BOTTOMRIGHT
 o setColumnAlignments
  public void setColumnAlignments(int align[])
Sets the column's alignments. The first column's alignment (column 0) cannot be set.

HTML param name/value: "ColumnAlignments"/a comma-separated list of enums.

Parameters:
align - one of: BWTEnum.TOPLEFT, TOPCENTER, TOPRIGHT, MIDDLELEFT (default), MIDDLECENTER, MIDDLERIGHT, BOTTOMLEFT, BOTTOMCENTER and BOTTOMRIGHT
 o getColumnPosition
  public int getColumnPosition(int col)
Gets the physical position of the left boundary of the column (accounting for horizontal scrolling).

 o getColumnLeftMargin
  public int getColumnLeftMargin(int col)
Gets the column's left margin value (pixels).

 o setColumnLeftMargin
  public void setColumnLeftMargin(int col,
                                  int value)
Sets the column's left margin value (pixels) (default: 2). The values for all columns may be set from an HTML file using a PARAM tag with a "ColumnLeftMargins" name and a comma-separated list of ints.

 o getColumnRightMargin
  public int getColumnRightMargin(int col)
Gets the column's right margin value (pixels).

 o setColumnRightMargin
  public void setColumnRightMargin(int col,
                                   int value)
Sets the column's right margin value (pixels) (default: 2).

The values for all columns may be set from an HTML file using a PARAM tag with a "ColumnRightMargins" name and a comma-separated list of ints.

 o getMultiColumnData
  public JCMultiColumnData getMultiColumnData()
Gets the component's JCMultiColumnData instance.

 o getHorizOrigin
  public int getHorizOrigin()
Gets the horizontal origin.

 o setHorizOrigin
  public void setHorizOrigin(int v)
Sets the horizontal origin prior to scrolling.

 o getVertOrigin
  public int getVertOrigin()
Gets the vertical origin.

 o setVertOrigin
  public void setVertOrigin(int v)
Sets the vertical origin prior to scrolling.


All Packages  Class Hierarchy  This Package  Previous  Next  Index