    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface jclass.bwt.JCOutlinerInterface

public interface JCOutlinerInterface
extends JCMultiColumnInterface, JCItemSelectable

An interface which defines the API for components which have an outliner-like behavior.

See Also:
  JCOutliner

##

calculateNodeHeight(JCOutlinerNode)
  Calculates the height of a node (by looking at the node's style).
eventInShortcut(Event, JCOutlinerNode)
  Returns true if the node is a folder and the event is within the folder's shortcut button.
eventToNode(Event)
  Gets the node in which the event occurred.
folderChanged(JCOutlinerNode)
  Notifies the outliner that the number of a folder's children has changed.
getAutoSelect()
  Gets the AutoSelect value.
getBounds(JCOutlinerNode, Rectangle)
  Gets the physical bounding rectangle of a node (icon and label) (adjusted for scrolling and insets).
getDefaultNodeStyle()
  Gets the default node style.
getFocusNode()
  Returns the node which currently has focus, or null.
getNextNode(JCOutlinerNode)
  Returns the next visible node, or null if none was found.
getNodeHeight()
  Gets the NodeHeight value.
getNodeIndent()
  Gets the NodeIndent value.
getNumNodes()
  Gets the current number of non-collapsed nodes (the number of open folders and their children).
getPreviousNode(JCOutlinerNode)
  Returns the previous visible node, or null if none was found.
getRootNode()
  Gets the root node.
getRootVisible()
  Gets the RootVisible value.
getSelectedNode()
  Returns the currently selected node, or null.
getSpacing()
  Gets the spacing between items.
getStateList()
  Gets the current StateList.
getStyleList()
  Gets the current StyleList.
getVisibleNodes()
  Gets a list of the nodes which are currently displayed.
getVisibleRows()
  Returns the number of visible lines.
makeNodeVisible(JCOutlinerNode)
  Scrolls the display if necessary to make the node visible.
selectNode(JCOutlinerNode, Event)
  Selects a node, and posts a JCOutlinerEvent.
setAutoSelect(boolean)
  If true, the node which currently has focus is also selected.
setFocusNode(JCOutlinerNode, Event)
  Sets a node to have the keyboard focus.
setNodeHeight(int)
  Sets the height of each node (pixels).
setNodeIndent(int)
  Sets the indentation of each node relative to its parent (pixels).
setNodeState(JCOutlinerNode, int, boolean)
  Sets the state of a folder.
setRootNode(JCOutlinerNode)
  Sets the root node.
setRootVisible(boolean)
  If true, the root node is drawn.
setSpacing(int)
  Sets the spacing between items (default: 0).
setStateList(int[])
  Sets a list of values used for double-clicking on a folder or clicking its shortcut button.
setStyleList(JCOutlinerNodeStyle[])
  Sets the list of node styles.
setVisibleRows(int)
  Sets the number of visible rows.

##

folderChanged

     public abstract void folderChanged(JCOutlinerNode node)

  Notifies the outliner that the number of a folder's children has changed.

getRootNode

     public abstract JCOutlinerNode getRootNode()

  Gets the root node.

  See Also:
    setRootNode

setRootNode

     public abstract void setRootNode(JCOutlinerNode node)

  Sets the root node.

getRootVisible

     public abstract boolean getRootVisible()

  Gets the RootVisible value.

  See Also:
    setRootVisible

setRootVisible

     public abstract void setRootVisible(boolean v)

  If true, the root node is drawn.

calculateNodeHeight

     public abstract int calculateNodeHeight(JCOutlinerNode node)

  Calculates the height of a node (by looking at the node's style).

getNodeHeight

     public abstract int getNodeHeight()

  Gets the NodeHeight value.

  See Also:
    setNodeHeight

setNodeHeight

     public abstract void setNodeHeight(int v)

  Sets the height of each node (pixels). If 0, the height is determined using the largest font and image height in the list of node styles.

getAutoSelect

     public abstract boolean getAutoSelect()

  Gets the AutoSelect value.

  See Also:
    setAutoSelect

setAutoSelect

     public abstract void setAutoSelect(boolean v)

  If true, the node which currently has focus is also selected.

  See Also:
    setFocusNode, selectNode

getNodeIndent

     public abstract int getNodeIndent()

  Gets the NodeIndent value.

  See Also:
    setNodeIndent

setNodeIndent

     public abstract void setNodeIndent(int v)

  Sets the indentation of each node relative to its parent (pixels).

getStateList

     public abstract int[] getStateList()

  Gets the current StateList.

  See Also:
    setStateList

setStateList

     public abstract void setStateList(int list[])

  Sets a list of values used for double-clicking on a folder or clicking its shortcut button. The folder's state is cycled through the list. Valid values:

      BWTEnum.FOLDER_CLOSED		Folder closed; no children visible
      BWTEnum.FOLDER_OPEN_NONE	Folder open; no children visible
      BWTEnum.FOLDER_OPEN_FOLDERS	Folder open; only folder children visible
      BWTEnum.FOLDER_OPEN_ITEMS	Folder open; only non-folder children visible
      BWTEnum.FOLDER_OPEN_ALL		Folder open; all children visible

getStyleList

     public abstract JCOutlinerNodeStyle[] getStyleList()

  Gets the current StyleList.

  See Also:
    setStyleList

setStyleList

     public abstract 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

getDefaultNodeStyle

     public abstract JCOutlinerNodeStyle getDefaultNodeStyle()

  Gets the default node style.

getSpacing

     public abstract int getSpacing()

  Gets the spacing between items.

  See Also:
    setSpacing

setSpacing

     public abstract void setSpacing(int v)

  Sets the spacing between items (default: 0). This value increases the HighlightThickness value.

  See Also:
    setHighlightThickness

getVisibleRows

     public abstract int getVisibleRows()

  Returns the number of visible lines.

  See Also:
    setVisibleRows

setVisibleRows

     public abstract 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.

getSelectedNode

     public abstract JCOutlinerNode getSelectedNode()

  Returns the currently selected node, or null.

selectNode

     public abstract 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

getFocusNode

     public abstract JCOutlinerNode getFocusNode()

  Returns the node which currently has focus, or null.

setFocusNode

     public abstract 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

getVisibleNodes

     public abstract JCVector getVisibleNodes()

  Gets a list of the nodes which are currently displayed.

setNodeState

     public abstract 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:

        BWTEnum.FOLDER_CLOSED        Folder closed; no children visible
        BWTEnum.FOLDER_OPEN_NONE     Folder open; no children visible
        BWTEnum.FOLDER_OPEN_FOLDERS  Folder open; only folder children visible
        BWTEnum.FOLDER_OPEN_ITEMS    Folder open; only non-folder children visible
        BWTEnum.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

makeNodeVisible

     public abstract 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

getNumNodes

     public abstract int getNumNodes()

  Gets the current number of non-collapsed nodes (the number of open folders and their children).

getNextNode

     public abstract JCOutlinerNode getNextNode(JCOutlinerNode node)

  Returns the next visible node, or null if none was found.

getPreviousNode

     public abstract JCOutlinerNode getPreviousNode(JCOutlinerNode node)

  Returns the previous visible node, or null if none was found.

getBounds

     public abstract Rectangle getBounds(JCOutlinerNode node,
                                         Rectangle rect)

  Gets the physical bounding rectangle of a node (icon and label) (adjusted for scrolling and insets).

  Parameters:
    rect - if not null, its members are set
  Returns:
    null if rect is null, otherwise the bounding rectangle

eventToNode

     public abstract JCOutlinerNode eventToNode(Event ev)

  Gets the node in which the event occurred.

eventInShortcut

     public abstract boolean eventInShortcut(Event ev,
                                             JCOutlinerNode node)

  Returns true if the node is a folder and the event is within the folder's shortcut button.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index