Intel

Developer Zone

CompositeWidget


com.intel.ui
Class CompositeWidget

java.lang.Object
  extended by com.intel.ui.Widget
      extended by 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 this CompositeWidget is also Clickable additional Clickable must not be added on top of it. The Widget instance should be added once to CompositeWidget, otherwise, the previous added instances will be ignored and only the last one will be drawn.

Parameters:
widget - The Widget 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 is Clickable and so is the widget being added.
UiException

addWidgets

public final void addWidgets(Widget[] widgets)
                      throws UiException
Adds child widgets to this CompositeWidget. If this CompositeWidget is also Clickable additional Clickable must not be added on top of it. Each Widget instance from the list should be added once to CompositeWidget, otherwise, the previous added instances will be ignored and only the last one will be drawn.

Parameters:
widgets - The Widget 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 is Clickable and so is one of the widgets being added.
UiException