|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface HierarchyComponent.Item<H extends HierarchyComponent,I extends HierarchyComponent.Item>
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_ITEM_IMAGE
|
static java.lang.String |
PROPERTY_ITEM_TEXT
|
static java.lang.String |
PROPERTY_ITEM_USER_OBJECT
|
Method Summary | |
---|---|
java.util.List<I> |
getChildren()
Get the List that contains the children of this item. |
H |
getHierarchy()
|
java.lang.String |
getImage()
Get the image file name that is displayed on the left side of the item. |
ImageInfo |
getImageInfo()
Returns an immutable ImageInfo class that provides information
about the assigned image, such as width, height, format, etc. |
int |
getIndex()
A convenience method that returns the index of this item in it's parents children List. |
java.lang.Object |
getParent()
Get the parent object of this item. |
java.lang.String |
getText()
Get the text that is displayed for the item in the menu. |
java.lang.Object |
getUserObject()
Get the user defined value for this item. |
boolean |
hasChildren()
|
void |
setImage(java.lang.String image)
Set the image file name that is displayed on the left side of the item. |
void |
setText(java.lang.String text)
Set the text that is displayed for the item in the menu. |
void |
setUserObject(java.lang.Object userObject)
Set a user defined value for this item. |
Field Detail |
---|
static final java.lang.String PROPERTY_ITEM_IMAGE
static final java.lang.String PROPERTY_ITEM_TEXT
static final java.lang.String PROPERTY_ITEM_USER_OBJECT
Method Detail |
---|
java.lang.String getText()
void setText(java.lang.String text)
text
- the text that should be displayed for the item.java.lang.String getImage()
void setImage(java.lang.String image)
image
- the name of the image file that should be displayed for the item.
java.lang.IllegalArgumentException
- if the image file does not exist.
java.lang.RuntimeException
- if the system cannot determine the image file's canonical path.ImageInfo getImageInfo()
ImageInfo
class that provides information
about the assigned image, such as width, height, format, etc.
ImageInfo
describing this item's image.java.lang.Object getUserObject()
void setUserObject(java.lang.Object userObject)
value
- an object that should be associated to this item.int getIndex()
item.getParent().getChildren().indexOf(item);
.
java.lang.IllegalStateException
- if this item has not yet been added to another Menu.Item or if this item is the root item
for the menu.H getHierarchy()
java.lang.Object getParent()
boolean hasChildren()
java.util.List<I> getChildren()
List
that contains the children of this item.
List
that contains the children of this item or an empty List
if there are no
children.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |