|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.ui.dm.userInteraction.mainMenu.file.MenuNode
public class MenuNode
A node of the main menu. The main menu can be hierarchically. Thus, a node can have a parent and multiple children (currently, a maximum of 15 children is allowed). The leaf node of this tree should have a service class and vendor associated.
Constructor Summary | |
---|---|
MenuNode(int level)
|
Method Summary | |
---|---|
void |
add(String path,
String vendor,
String serviceClass)
|
int |
add(String path,
String vendor,
String serviceClass,
String iconURL)
Add a new node to the menu. |
Iterable<MenuNode> |
children()
Get an iterator for all children of this node. |
String |
getIconURL()
|
String |
getLabel()
Get the label of this node. |
MenuNode |
getParent()
Get the parent of this node. |
String |
getPath()
Get the path of this node. |
ServiceRequest |
getService(Resource user)
Create a service request with the user as well as service class and vendor of this node (if this node a leaf node and has an associated service). |
boolean |
hasChild()
Determines whether this node has children. |
boolean |
hasService()
Determines whether a service (and a vendor) is bound to this node. |
protected MenuNode |
newMenuNode(int level)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MenuNode(int level)
Method Detail |
---|
public int add(String path, String vendor, String serviceClass, String iconURL)
path
- The path of possibly multiple labels according to the
different levels in the menu.vendor
- The vendor of the service.serviceClass
- The class the service implements.
protected MenuNode newMenuNode(int level)
public void add(String path, String vendor, String serviceClass)
public Iterable<MenuNode> children()
public String getLabel()
public MenuNode getParent()
public String getPath()
public ServiceRequest getService(Resource user)
user
- The user.
public boolean hasChild()
public boolean hasService()
public String getIconURL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |