Package org.dashbuilder.navigation.impl
Class NavItemImpl
- java.lang.Object
-
- org.dashbuilder.navigation.impl.NavItemImpl
-
- All Implemented Interfaces:
NavItem
- Direct Known Subclasses:
NavDividerImpl,NavGroupImpl
@Portable public class NavItemImpl extends Object implements NavItem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.dashbuilder.navigation.NavItem
NavItem.Type
-
-
Constructor Summary
Constructors Constructor Description NavItemImpl()NavItemImpl(String id, String name, String description, NavGroup parent, boolean modifiable, String context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(NavItemVisitor visitor)Entry point for visitor interfacesNavItemcloneItem()Creates a brand new copy of this itembooleanequals(Object obj)StringgetContext()An optional string that can be used to attach contextual information, like an external reference for instance.StringgetDescription()A brief description of the item (optional, if not provided the name is used instead)StringgetId()A unique id within the sameNavTreeStringgetName()The item's nameNavGroupgetParent()Get the parent of this item (if any)NavItem.TypegetType()The item'sNavItem.TypebooleanisModifiable()Flag indicating if the item can be modified from a tree once addedvoidsetContext(String context)Change the item's context attributevoidsetDescription(String description)Change the item's descriptionvoidsetId(String id)Change the item's idvoidsetModifiable(boolean modifiable)Change the item's modifiable flagvoidsetName(String name)Change the item's namevoidsetParent(NavGroup parent)Change the item's parentStringtoString()StringtoString(String type)
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:NavItemA unique id within the sameNavTree
-
setName
public void setName(String name)
Description copied from interface:NavItemChange the item's name
-
getDescription
public String getDescription()
Description copied from interface:NavItemA brief description of the item (optional, if not provided the name is used instead)- Specified by:
getDescriptionin interfaceNavItem
-
setDescription
public void setDescription(String description)
Description copied from interface:NavItemChange the item's description- Specified by:
setDescriptionin interfaceNavItem
-
getType
public NavItem.Type getType()
Description copied from interface:NavItemThe item'sNavItem.Type
-
getParent
public NavGroup getParent()
Description copied from interface:NavItemGet the parent of this item (if any)
-
setParent
public void setParent(NavGroup parent)
Description copied from interface:NavItemChange the item's parent
-
isModifiable
public boolean isModifiable()
Description copied from interface:NavItemFlag indicating if the item can be modified from a tree once added- Specified by:
isModifiablein interfaceNavItem
-
setModifiable
public void setModifiable(boolean modifiable)
Description copied from interface:NavItemChange the item's modifiable flag- Specified by:
setModifiablein interfaceNavItem
-
accept
public void accept(NavItemVisitor visitor)
Description copied from interface:NavItemEntry point for visitor interfaces
-
getContext
public String getContext()
Description copied from interface:NavItemAn optional string that can be used to attach contextual information, like an external reference for instance.- Specified by:
getContextin interfaceNavItem
-
setContext
public void setContext(String context)
Description copied from interface:NavItemChange the item's context attribute- Specified by:
setContextin interfaceNavItem
-
cloneItem
public NavItem cloneItem()
Description copied from interface:NavItemCreates a brand new copy of this item
-
-