public class HListElement extends Object
HListElement is a holder for
content used with the HListGroup
component. It must contain a text string, and may also contain a
single graphical image.
Applications should not directly manipulate
HListElement objects. They are intended
to be used in conjunction with an HListGroup
which maintains a list of them, and is responsible for
their rendering via the HListGroupLook
class. The methods setIcon() and
setLabel() of HListElement shall not be
used for elements, which are part of HListGroup. If an
application requires to alter the content, it shall either replace
the entire element, or remove it temporarily and re-add it after
the content was changed.
| Parameter | Description | Default value | Set method | Get method |
|---|---|---|---|---|
| label | text content of this item | no default | - | getLabel |
| icon | image content of this item | null | - | getIcon |
| Description | Default value | Set method | Get method |
|---|---|---|---|
| None. | |||
HListGroup,
HListGroupLook| Constructor and Description |
|---|
HListElement(Image icon,
String label)
Creates an HListElement object.
|
HListElement(String label)
Creates an HListElement object.
|
| Modifier and Type | Method and Description |
|---|---|
Image |
getIcon()
Retrieve the icon for this HListElement.
|
String |
getLabel()
Retrieve the label for this HListElement.
|
void |
setIcon(Image icon)
Set the icon for this HListElement.
|
void |
setLabel(String label)
Set the label for this HListElement.
|
public HListElement(String label)
label - The label for this HListElement.public String getLabel()
public Image getIcon()
null if no icon was set.public void setLabel(String label)
label - The label for this HListElement.public void setIcon(Image icon)
icon - The icon for this HListElement.Copyright © 2012 code4tv.com. All Rights Reserved.