org.gnu.gtk

Class Layout


public class Layout
extends Container

This widget is similar to DrawingArea in that it's a "blank slate" and doesn't do anything but paint a blank background by default. It's different in that it supports scrolling natively and it contains child widgets since it is a Container.
See Also:
Container

Constructor Summary

Layout(Handle handle)
Construct a new Layout from a handle to a native resource.
Layout(Adjustment hAdj, Adjustment vAdj)
Construct a new Layout object.

Method Summary

void
addChild(Widget child, int x, int y)
Add a child Widget to this Layout.
Window
getBinWindow()
Return the Layout's bin window, into which content is drawn.
Adjustment
getHorizontalAdjustment()
Return the Horizontal Adjustment.
static Layout
getLayout(Handle handle)
Construct a new Layout from a handle to a native resource.
Requisition
getSize()
Retrieve the size of the scrollabel area of the layout.
static Type
getType()
Retrieve the runtime type used by the GLib library.
Adjustment
getVerticalAdjustment()
Return the Vertical Adjustment.
void
moveChild(Widget child, int x, int y)
Move a child Widget to a new position
void
setHorizontalAdjustment(Adjustment adjust)
Set the Horizontal Adjustment.
void
setSize(int width, int height)
Set the size of the scrollable area of the layout.
void
setVerticalAdjustment(Adjustment adjust)
Set the Vertical Adjustment.

Methods inherited from class org.gnu.gtk.Container

add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, getType, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode

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, getCanFocus, 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, setCanFocus, 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

Constructor Details

Layout

public Layout(Handle handle)
Construct a new Layout from a handle to a native resource.

Layout

public Layout(Adjustment hAdj,
              Adjustment vAdj)
Construct a new Layout object.
Parameters:
hAdj - The horizontal Adjustment object.
vAdj - The vertical Adjustment object.

Method Details

addChild

public void addChild(Widget child,
                     int x,
                     int y)
Add a child Widget to this Layout.
Parameters:
child - The child Widget to add to this Layout.
x - The X coordinate to position the child.
y - The Y coordinate to position the child.

getBinWindow

public Window getBinWindow()
Return the Layout's bin window, into which content is drawn.

getHorizontalAdjustment

public Adjustment getHorizontalAdjustment()
Return the Horizontal Adjustment.

getLayout

public static Layout getLayout(Handle handle)
Construct a new Layout from a handle to a native resource.

getSize

public Requisition getSize()
Retrieve the size of the scrollabel area of the layout.
Returns:
The size of the scrollabel area.

getType

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

getVerticalAdjustment

public Adjustment getVerticalAdjustment()
Return the Vertical Adjustment.

moveChild

public void moveChild(Widget child,
                      int x,
                      int y)
Move a child Widget to a new position
Parameters:
child - The child Widget to move.
x - The X coordinate for the new position.
y - The Y coordinate for the new position.

setHorizontalAdjustment

public void setHorizontalAdjustment(Adjustment adjust)
Set the Horizontal Adjustment.

setSize

public void setSize(int width,
                    int height)
Set the size of the scrollable area of the layout.
Parameters:
width - The width for the new size.
height - The height for the new size.

setVerticalAdjustment

public void setVerticalAdjustment(Adjustment adjust)
Set the Vertical Adjustment.