Class HorizontalPanel
A panel that lays all of its widgets out in a single horizontal column.

Constructors
Methods
Constructor Detail
HorizontalPanel
public HorizontalPanel()
Creates an empty horizontal panel.
Method Detail
add
Adds a child widget to the panel.
Parameters
- w
- the widget to be added
getHorizontalAlignment
Gets the horizontal alignment.
Return Value
the current horizontal alignment.
getVerticalAlignment
Gets the vertical alignment.
Return Value
the current vertical alignment.
getWidget
public
Widget getWidget(
int index)
Gets the child widget at the specified index.
Parameters
- index
- the child widget's index
Return Value
the child widget
getWidgetCount
public int getWidgetCount()
Gets the number of child widgets in this panel.
Return Value
the number of children
getWidgetIndex
public int
getWidgetIndex(
Widget child)
Gets the index of the specified child widget.
Parameters
- child
- the widget to be found
Return Value
the widget's index, or
-1
if it is not a child of
this panel
insert
public void
insert(
Widget w, int beforeIndex)
Inserts a widget before the specified index.
Parameters
- w
- the widget to be inserted
- beforeIndex
- the index before which it will be inserted
remove
public boolean remove(int index)
Removes the widget at the specified index.
Parameters
- index
- the index of the widget to be removed
Return Value
false
if the widget is not present
remove
public boolean
remove(
Widget w)
Parameters
- w
-
setHorizontalAlignment
Sets the default horizontal alignment to be used for widgets added to this
panel. It only applies to widgets added after this property is set.
Parameters
- align
-
See Also
HorizontalAlignmentConstant)
setVerticalAlignment
Sets the default vertical alignment to be used for widgets added to this
panel. It only applies to widgets added after this property is set.
Parameters
- align
-
See Also
VerticalAlignmentConstant)