public class DefaultTreeStatus extends Object implements TreeStatus
Modifier and Type | Field and Description |
---|---|
protected boolean |
allNodesOpen |
protected Set |
editedPaths |
protected boolean |
editImpliesExpand |
protected Set |
expandedPaths |
protected boolean |
expandImpliesEdit |
protected String[] |
initiallyEditedPaths |
protected String[] |
initiallyExpandedPaths |
protected org.slf4j.Logger |
log |
protected Set |
selectedPaths |
Constructor and Description |
---|
DefaultTreeStatus() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the treeStatus
|
boolean |
collapse(TreeNode node)
Mark given node as collapsed
|
boolean |
edit(TreeNode node)
Mark given node as edited
|
boolean |
expand(TreeNode node)
Mark given node as expanded
|
protected Set |
getEditedPaths() |
protected Set |
getExpandedPaths() |
String[] |
getInitiallyEditedPaths() |
String[] |
getInitiallyExpandedPaths() |
TreeNode |
getLastEditedNode(Tree tree)
Get the edited node.
|
Object |
getMemento()
Get a memento for this object
|
MessagesComponentHandler |
getMessagesComponentHandler() |
protected Set |
getSelectedPaths() |
protected boolean |
isAllNodesOpen() |
boolean |
isEdited(TreeNode node)
Indicates if a node is currently expanded
|
boolean |
isEditImpliesExpand() |
boolean |
isExpanded(TreeNode node)
Indicates if a node is currently expanded
|
boolean |
isExpandImpliesEdit() |
boolean |
isSelected(TreeNode node)
Indicates if a node is currently selected
|
void |
navigateToPath(Tree tree,
String path) |
boolean |
select(TreeNode node)
Mark given node as selected
|
void |
setEditImpliesExpand(boolean editImpliesExpand) |
void |
setExpandImpliesEdit(boolean expandImpliesEdit) |
void |
setInitiallyEditedPaths(String[] initiallyEditedPaths) |
void |
setInitiallyExpandedPaths(String[] initiallyExpandedPaths) |
void |
setMemento(Object obj)
Set a memento for this object
|
protected void |
start() |
boolean |
unedit(TreeNode node)
Mark given node as unedited
|
boolean |
unselect(TreeNode node)
Mark given node as unselected
|
@Inject protected transient org.slf4j.Logger log
@Inject protected boolean editImpliesExpand
@Inject protected boolean expandImpliesEdit
@Inject protected boolean allNodesOpen
protected Set expandedPaths
protected Set selectedPaths
protected final Set editedPaths
protected String[] initiallyExpandedPaths
protected String[] initiallyEditedPaths
public MessagesComponentHandler getMessagesComponentHandler()
protected Set getEditedPaths()
protected Set getExpandedPaths()
protected boolean isAllNodesOpen()
protected Set getSelectedPaths()
public boolean isEditImpliesExpand()
public void setEditImpliesExpand(boolean editImpliesExpand)
public boolean isExpandImpliesEdit()
public void setExpandImpliesEdit(boolean expandImpliesEdit)
public String[] getInitiallyExpandedPaths()
public void setInitiallyExpandedPaths(String[] initiallyExpandedPaths)
public String[] getInitiallyEditedPaths()
public void setInitiallyEditedPaths(String[] initiallyEditedPaths)
@PostConstruct protected void start()
public boolean isExpanded(TreeNode node)
TreeStatus
isExpanded
in interface TreeStatus
node
- treenode to checkpublic boolean isSelected(TreeNode node)
TreeStatus
isSelected
in interface TreeStatus
node
- treenode to checkpublic boolean isEdited(TreeNode node)
TreeStatus
isEdited
in interface TreeStatus
node
- treenode to checkpublic boolean select(TreeNode node)
TreeStatus
select
in interface TreeStatus
node
- treenode to checkpublic boolean unselect(TreeNode node)
TreeStatus
unselect
in interface TreeStatus
node
- treenode to unselectpublic boolean edit(TreeNode node)
TreeStatus
edit
in interface TreeStatus
node
- treenode to editpublic TreeNode getLastEditedNode(Tree tree)
TreeStatus
getLastEditedNode
in interface TreeStatus
tree
- Tree where the node must belong topublic boolean unedit(TreeNode node)
TreeStatus
unedit
in interface TreeStatus
node
- treenode to uneditpublic boolean expand(TreeNode node)
TreeStatus
expand
in interface TreeStatus
node
- treenode to expandpublic boolean collapse(TreeNode node)
TreeStatus
collapse
in interface TreeStatus
node
- treenode to collapsepublic Object getMemento() throws Exception
TreeStatus
getMemento
in interface TreeStatus
Exception
public void setMemento(Object obj) throws Exception
TreeStatus
setMemento
in interface TreeStatus
Exception
public void clear()
clear
in interface TreeStatus
public void navigateToPath(Tree tree, String path)
navigateToPath
in interface TreeStatus
Copyright © 2012–2016 JBoss by Red Hat. All rights reserved.