com.intel.ui
Class CompositeWidget
java.lang.Objectcom.intel.ui.Widget
com.intel.ui.CompositeWidget
- Direct Known Subclasses:
- Button
public abstract class CompositeWidget
- extends Widget
This abstract class represents a Widget
which can contain other widgets.
The widgets will be drawn on top of the parent and the locations are relative to this Widget
top-left corner.
Method Summary | |
---|---|
void |
addWidget(Widget widget)
Adds a child widget to this CompositeWidget . |
void |
addWidgets(Widget[] widgets)
Adds child widgets to this CompositeWidget . |
Widget[] |
getWidgets()
Returns the widget list this CompositeWidget contains. |
Methods inherited from class com.intel.ui.Widget |
---|
getColor, getId, getRelativeLocation, getSize |
Methods inherited from class java.lang.Object |
---|
equals, hashCode, toString |
Method Detail |
---|
getWidgets
public final Widget[] getWidgets()
- Returns the widget list this
CompositeWidget
contains.- Returns:
- Returns the widget list this
CompositeWidget
contains or null if there are no child widgets.
addWidget
public final void addWidget(Widget widget) throws UiException
- Adds a child widget to this
CompositeWidget
. If thisCompositeWidget
is alsoClickable
additionalClickable
must not be added on top of it. TheWidget
instance should be added once toCompositeWidget
, otherwise, the previous added instances will be ignored and only the last one will be drawn.- Parameters:
widget
- TheWidget
to add. Cannot be null.- Throws:
UiIllegalParameterException
- in one of the following cases:- The size or location of the widget being added exceeds the bounding box of the parent widget.
- This
CompositeWidget
isClickable
and so is the widget being added.
UiException
addWidgets
public final void addWidgets(Widget[] widgets) throws UiException
- Adds child widgets to this
CompositeWidget
. If thisCompositeWidget
is alsoClickable
additionalClickable
must not be added on top of it. EachWidget
instance from the list should be added once toCompositeWidget
, otherwise, the previous added instances will be ignored and only the last one will be drawn.- Parameters:
widgets
- TheWidget
array to add. Can't be null or contain null members.- Throws:
UiIllegalParameterException
- in one of the following cases:- The size of one of the widgets being added exceeds the bounding box of the parent widget.
- This
CompositeWidget
isClickable
and so is one of the widgets being added.
UiException