HListElement

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.havi.ui
Class HListElement

    java.lang.Object
      org.havi.ui.HListElement

    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.

The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

### Default parameter values exposed in the constructors

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`

### Default parameter values not exposed in the constructors

Description | Default value | Set method | Get method
--- | --- | --- | ---
None.

See Also:
  `HListGroup`, `HListGroupLook`

Constructor Summary
`HListElement(Image icon, String label)` Creates an HListElement object.
`HListElement(String label)` Creates an HListElement object.

Method Summary
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HListElement

    public HListElement(String label)

  Creates an HListElement object. See the class description for details of constructor parameters and default values.

  Parameters:
    `label` - The label for this HListElement.

### HListElement

    public HListElement(Image icon,
                        String label)

  Creates an HListElement object. See the class description for details of constructor parameters and default values.

  Parameters:
    `icon` - The icon for this HListElement.
    `label` - The label for this HListElement.

Method Detail

### getLabel

    public String getLabel()

  Retrieve the label for this HListElement.

  Returns:
    the text label for this HListElement.

### getIcon

    public Image getIcon()

  Retrieve the icon for this HListElement.

  Returns:
    the graphical icon for this HListElement, or `null` if no icon was set.

### setLabel

    public void setLabel(String label)

  Set the label for this HListElement.

  Parameters:
    `label` - The label for this HListElement.

### setIcon

    public void setIcon(Image icon)

  Set the icon for this HListElement. If icon is null, the HListElement will be in the same state as if no icon was set.

  Parameters:
    `icon` - The icon for this HListElement.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD