org.gnu.gtk

Class Container

Known Direct Subclasses:
Bin, Box, Fixed, IconView, Layout, MenuShell, Notebook, Paned, Table, TextView, ToolBar, TreeView

public class Container
extends Widget

The Container widget is a base class for container widgets. Widgets that inherit from Container have the ability to contain, position, size, and display one or more other widgets.

Method Summary

void
add(Widget widget)
Adds widget to the Container.
void
addListener(ContainerListener listener)
Register an object to handle container events.
int
getBorderWidth()
Retrieves the border width for the Container.
Widget[]
getChildren()
Get an array of all children of this container.
Class
getEventListenerClass(String signal)
EventType
getEventType(String signal)
ResizeMode
getResizeMode()
Returns the ResizeMode for the Container.
static Type
getType()
Retrieve the runtime type used by the GLib library.
void
remove(Widget widget)
Remove a Widget from the Container.
void
removeListener(ContainerListener listener)
Removes a listener
void
resizeChildren()
Informs the container to resize all of its' children based on the size requirements of the children.
void
setBorderWidth(int width)
Sets the border width for the Container.
void
setResizeMode(ResizeMode mode)
Sets the ResizeMode for the Container.

Methods inherited from class org.gnu.gtk.Widget

activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getColormap, getContext, getData, getDisplay, getDragData, getEventListenerClass, getEventType, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getType, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight

Methods inherited from class org.gnu.gtk.GtkObject

destroy, getType, sink

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Method Details

add

public void add(Widget widget)
Adds widget to the Container.
Parameters:
widget - The Widget to be added to this Container.

addListener

public void addListener(ContainerListener listener)
Register an object to handle container events.

getBorderWidth

public int getBorderWidth()
Retrieves the border width for the Container.
Returns:
The border width.

getChildren

public Widget[] getChildren()
Get an array of all children of this container.
Returns:
An array contain all children of this container or null.

getEventListenerClass

public Class getEventListenerClass(String signal)
Overrides:
getEventListenerClass in interface Widget

getEventType

public EventType getEventType(String signal)
Overrides:
getEventType in interface Widget

getResizeMode

public ResizeMode getResizeMode()
Returns the ResizeMode for the Container.
Returns:
The ResizeMode for the Container.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.
Overrides:
getType in interface Widget

remove

public void remove(Widget widget)
Remove a Widget from the Container.
Parameters:
widget - The Widget to remove from the Container.

removeListener

public void removeListener(ContainerListener listener)
Removes a listener

resizeChildren

public void resizeChildren()
Informs the container to resize all of its' children based on the size requirements of the children.

setBorderWidth

public void setBorderWidth(int width)
Sets the border width for the Container.
Parameters:
width - The border width.

setResizeMode

public void setResizeMode(ResizeMode mode)
Sets the ResizeMode for the Container.
Parameters:
mode - The ResizeMode.