| Constructor and Description |
|---|
NavTreeImpl() |
NavTreeImpl(NavGroup root) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(NavItemVisitor visitor)
Entry point for visitor interfaces
|
NavDivider |
addDivider(String parentId,
boolean modifiable)
Creates and register a brand new
NavDivider item. |
NavGroup |
addGroup(String id,
String name,
String description,
String parentId,
boolean modifiable)
Creates and register a brand new
NavGroup item. |
NavItem |
addItem(String id,
String name,
String description,
String parentId,
boolean modifiable,
String context)
Creates and register a brand new
NavItem item. |
void |
changePosition(String id,
boolean up,
Integer npositions) |
NavTree |
cloneTree()
Creates a brand new copy of this tree
|
NavItem |
deleteItem(String id)
Delete an existing item including all its children.
|
NavTree |
getItemAsTree(String id)
Given an existing item, it creates a brand new subtree where the item (or its children in case of groups)
is taken as the root node.
|
NavItem |
getItemById(String id)
Get an item given its id.
|
List<NavItem> |
getRootItems()
The list of items belonging to the first tree level
|
NavItem |
moveItem(String id,
String newParentId)
Changes the location of an item in the tree
|
void |
moveItemDown(String id)
Move an item one position down in its parent's children list
|
void |
moveItemFirst(String id)
Move the specified item to the first position within its parent's children list
|
void |
moveItemLast(String id)
Move the specified item to the last position within its parent's children list
|
void |
moveItemUp(String id)
Move an item one position up in its parent's children list
|
List<NavItem> |
searchItems(NavItemContext ctx)
Get the items that match the given context
|
List<NavItem> |
searchItems(NavItemContext ctx,
List<NavItem> navItemList) |
NavItem |
setItemContext(String id,
String context)
Updates the perspective attached to an existing perspective link
|
NavItem |
setItemDescription(String id,
String description)
Updates the description attribute of an existing item
|
NavItem |
setItemModifiable(String id,
boolean modifiable)
Updates the modifiable flag attribute of an existing item
|
NavItem |
setItemName(String id,
String name)
Updates the name attribute of an existing item
|
public NavTreeImpl()
public NavTreeImpl(NavGroup root)
public List<NavItem> getRootItems()
NavTreegetRootItems in interface NavTreeNavItem instancespublic NavItem getItemById(String id)
NavTreegetItemById in interface NavTreeid - The unique identifier of the itempublic NavTree getItemAsTree(String id)
NavTreegetItemAsTree in interface NavTreeid - The unique identifier of the itempublic List<NavItem> searchItems(NavItemContext ctx)
NavTreesearchItems in interface NavTreectx - The context to search forpublic List<NavItem> searchItems(NavItemContext ctx, List<NavItem> navItemList)
public NavGroup addGroup(String id, String name, String description, String parentId, boolean modifiable)
NavTreeNavGroup item.addGroup in interface NavTreeid - The unique id of the itemname - The item's namedescription - A brief description of the itemparentId - The identifier of an existing node in the tree where to append the newly created item as a childmodifiable - Flag indicating if the item can be modified once addedpublic NavItem addItem(String id, String name, String description, String parentId, boolean modifiable, String context)
NavTreeNavItem item.addItem in interface NavTreeid - The unique id of the itemname - The item's namedescription - A brief description of the itemparentId - The identifier of an existing node in the tree where to append the newly created item as a childmodifiable - Flag indicating if the item can be modified once addedcontext - An string that contains item related information, like an external reference for instance.public NavDivider addDivider(String parentId, boolean modifiable)
NavTreeNavDivider item.addDivider in interface NavTreeparentId - The identifier of an existing node in the tree where to append the newly created item as a childmodifiable - Flag indicating if the item can be modified once addedpublic NavItem deleteItem(String id)
NavTreedeleteItem in interface NavTreeid - The unique identifier of the itempublic NavItem setItemName(String id, String name)
NavTreesetItemName in interface NavTreeid - The unique id of the itemname - A brief description of the itempublic NavItem setItemDescription(String id, String description)
NavTreesetItemDescription in interface NavTreeid - The unique id of the itemdescription - A brief description of the itempublic NavItem setItemModifiable(String id, boolean modifiable)
NavTreesetItemModifiable in interface NavTreeid - The unique id of the itemmodifiable - Flag indicating if the item can be modifiedpublic NavItem setItemContext(String id, String context)
NavTreesetItemContext in interface NavTreeid - The unique id of the itemcontext - The item's contextpublic NavItem moveItem(String id, String newParentId)
NavTreepublic void moveItemFirst(String id)
NavTreemoveItemFirst in interface NavTreeid - The unique id of the itempublic void moveItemLast(String id)
NavTreemoveItemLast in interface NavTreeid - The unique id of the itempublic void moveItemUp(String id)
NavTreemoveItemUp in interface NavTreeid - The unique id of the itempublic void moveItemDown(String id)
NavTreemoveItemDown in interface NavTreeid - The unique id of the itempublic void accept(NavItemVisitor visitor)
NavTreeCopyright © 2012–2020 JBoss by Red Hat. All rights reserved.