public class RowContainer extends WidgetContainer
In addition to the event types generated by all Widgets, RowContainers generate the following event types:
Constructor and Description |
---|
RowContainer()
Create a new RowContainer.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Widget widget)
Add a Widget to this container, using the default LayoutInfo to position it.
|
void |
add(Widget widget,
int index,
LayoutInfo layout)
Add a Widget to this container.
|
void |
add(Widget widget,
LayoutInfo layout)
Add a Widget to this container.
|
Widget |
getChild(int i)
Get the i'th child of this container.
|
int |
getChildCount()
Get the number of children in this container.
|
int |
getChildIndex(Widget widget)
Get the index of a particular Widget.
|
LayoutInfo |
getChildLayout(int index)
Get the LayoutInfo for a particular Widget.
|
LayoutInfo |
getChildLayout(Widget widget)
Get the LayoutInfo for a particular Widget.
|
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container.
|
javax.swing.JPanel |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
LayoutInfo |
getDefaultLayout()
Get the default LayoutInfo.
|
java.awt.Dimension |
getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn.
|
java.awt.Dimension |
getPreferredSize()
Get the preferred size at which this Widget will look best.
|
void |
layoutChildren()
Layout the child Widgets.
|
void |
remove(int index)
Remove a child Widget from this container.
|
void |
remove(Widget widget)
Remove a child Widget from this container.
|
void |
removeAll()
Remove all child Widgets from this container.
|
void |
setChildLayout(int index,
LayoutInfo layout)
Set the LayoutInfo for a particular Widget.
|
void |
setChildLayout(Widget widget,
LayoutInfo layout)
Set the LayoutInfo for a particular Widget.
|
void |
setDefaultLayout(LayoutInfo layout)
Set the default LayoutInfo.
|
isOpaque, setOpaque
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getName, getParent, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible
addEventLink, addEventLink, removeEventLink
public javax.swing.JPanel getComponent()
Widget
getComponent
in class Widget
public int getChildCount()
getChildCount
in class WidgetContainer
public Widget getChild(int i)
public java.util.Collection<Widget> getChildren()
getChildren
in class WidgetContainer
public void layoutChildren()
layoutChildren
in class WidgetContainer
public void add(Widget widget)
widget
- the Widget to addpublic void add(Widget widget, LayoutInfo layout)
widget
- the Widget to addlayout
- the LayoutInfo to use for this Widget. If null, the default LayoutInfo will be used.public void add(Widget widget, int index, LayoutInfo layout)
widget
- the Widget to addindex
- the index at which to add the Widgetlayout
- the LayoutInfo to use for this Widget. If null, the default LayoutInfo will be used.public LayoutInfo getChildLayout(int index)
index
- the index of the Widget for which to get the LayoutInfopublic void setChildLayout(int index, LayoutInfo layout)
index
- the index of the Widget for which to set the LayoutInfolayout
- the new LayoutInfo. If null, the default LayoutInfo will be usedpublic LayoutInfo getChildLayout(Widget widget)
widget
- the Widget for which to get the LayoutInfopublic void setChildLayout(Widget widget, LayoutInfo layout)
widget
- the Widget for which to set the LayoutInfolayout
- the new LayoutInfo. If null, the default LayoutInfo will be usedpublic LayoutInfo getDefaultLayout()
public void setDefaultLayout(LayoutInfo layout)
public void remove(Widget widget)
remove
in class WidgetContainer
widget
- the Widget to removepublic void remove(int index)
index
- the index of the Widget to removepublic void removeAll()
removeAll
in class WidgetContainer
public int getChildIndex(Widget widget)
widget
- the Widget to locatepublic java.awt.Dimension getMinimumSize()
getMinimumSize
in class Widget
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class Widget
Written by Peter Eastman.