public class TreeChip extends AbstractChip
TreeModel to get data and
TreeCellRenderer to get the display chips for the node contents.TreeModel,
TreeCellRenderer,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
class |
TreeChip.TreeNodeChip
Chip representing one node in the tree.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
TREE_EVENT
help event, always active, to enable proper node selection event processing
|
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
TreeChip(DisplayState displayState,
Chip parent,
TreeModel model,
TreeCellRenderer cellRenderer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearSelection() |
void |
expand(TreePath path)
Expands the given node.
|
TreeCellRenderer |
getCellRenderer()
Gets the tree cell renderer used by this tree.
|
TreePath |
getCurrentPath()
Returns the current path.
|
String |
getCurrentPathBackground() |
TreePath |
getFirstSelectedPath() |
Chip |
getHeaderRendererChip(int row) |
String |
getJSPURI()
Returns the URI of the JSP that this chip wants to use.
|
int |
getMaxLevel() |
TreeModel |
getModel()
Gets the tree model used by this tree.
|
TreeChip.TreeNodeChip |
getRootNodeChip()
Gets the root node chip.
|
Set |
getSelectedPaths()
Returns the currently selected paths.
|
Chip |
getSelectionHeaderRendererChip() |
boolean |
highlightCurrentPath() |
boolean |
isCurrentPath(TreePath path)
Returns
true if the given tree path is the current path, false otherwise. |
boolean |
isMultipleSelectionEnabled() |
boolean |
isSelected(TreePath path)
Returns
true if the given tree path is selected, false otherwise. |
boolean |
isSelectionEnabled() |
boolean |
makePathVisible(TreePath path) |
boolean |
pathExists(TreePath path)
Returns
true if the given path exists within the model, false otherwise. |
boolean |
pathVisible(TreePath path)
Returns
true if the given path is visible (parent node is expanded), false otherwise. |
void |
processEvents(Map events)
Handles all incoming requests for this chip.
|
void |
refresh() |
void |
resetHeader() |
void |
select(TreePath path)
Selects the given tree path.
|
void |
setCurrentPath(TreePath path)
Selects the given tree path.
|
void |
setCurrentPathBackground(String color) |
void |
setHighlightCurrentPath(boolean highlight) |
void |
setModel(TreeModel model) |
void |
setMultipleSelectionEnabled(boolean multipleSelection) |
void |
setRenderer(TreeCellRenderer cellRenderer) |
void |
setSelectionEnabled(boolean selectionEnabled) |
void |
setShowHeader(boolean show) |
void |
setShowLines(boolean show) |
void |
setShowRoot(boolean show) |
boolean |
showHeader() |
boolean |
showLines() |
boolean |
showRoot() |
void |
synchronize()
Updates the tree structure.
|
addEventListener, checkValid, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getMenuEntries, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueName, getProposedUniqueNameFor, getRequestFocus, getSessionIdentifier, getStringValue, getUniqueName, getWindow, goFullScreen, hasVisibleContextMenuEntries, isButtonPushed, isButtonPushed, isErrorQueueEmpty, isValid, leaveFullScreen, notifyEventListeners, notifyEventListeners, postErrorMessage, postInfoMessage, postWindowEvent, refreshChild, registerUniqueName, removeEventListener, removeInfoMessage, render, render, setClipboard, setParent, setRequestFocus, setValid, setWindowStatus, translateFormFieldToEventName, translateFormFieldToEventValuepublic static final String TREE_EVENT
public TreeChip(DisplayState displayState, Chip parent, TreeModel model, TreeCellRenderer cellRenderer)
displayState - parent - model - cellRenderer - public void setModel(TreeModel model)
public void setRenderer(TreeCellRenderer cellRenderer)
public void refresh()
refresh in class AbstractChippublic void synchronize()
public void processEvents(Map events)
Chippublic String getJSPURI()
Chippublic boolean isSelectionEnabled()
public void setSelectionEnabled(boolean selectionEnabled)
public boolean isMultipleSelectionEnabled()
public void setMultipleSelectionEnabled(boolean multipleSelection)
public void setShowLines(boolean show)
public boolean showLines()
public void setHighlightCurrentPath(boolean highlight)
public boolean highlightCurrentPath()
public void setCurrentPathBackground(String color)
public String getCurrentPathBackground()
public void setShowRoot(boolean show)
public boolean showRoot()
public void setShowHeader(boolean show)
public boolean showHeader()
public void resetHeader()
public Chip getHeaderRendererChip(int row)
public Chip getSelectionHeaderRendererChip()
public TreeModel getModel()
public TreeCellRenderer getCellRenderer()
public TreeChip.TreeNodeChip getRootNodeChip()
public boolean pathExists(TreePath path)
true if the given path exists within the model, false otherwise. The path may
not be visible.path - true if the given path exists within the model, false otherwisepublic boolean pathVisible(TreePath path)
true if the given path is visible (parent node is expanded), false otherwise.path - true if the given path is visible (parent node is expanded), false otherwisepublic boolean makePathVisible(TreePath path)
public void expand(TreePath path)
path - the path to the node to be expandedpublic void select(TreePath path)
public void clearSelection()
public boolean isCurrentPath(TreePath path)
true if the given tree path is the current path, false otherwise.path - the tree pathtrue if the given tree path is the current path, false otherwisepublic TreePath getCurrentPath()
public void setCurrentPath(TreePath path)
path - the tree pathpublic boolean isSelected(TreePath path)
true if the given tree path is selected, false otherwise.path - the tree pathtrue if the given tree path is selected, false otherwisepublic Set getSelectedPaths()
public TreePath getFirstSelectedPath()
public int getMaxLevel()
Copyright © 2017 SAP SE. All Rights Reserved.