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(Adjustment hAdj, Adjustment vAdj)
Construct a new Layout object.
Layout(Handle handle)
Construct a new Layout from a handle to a native resource.
Method Summary
voidaddChild(Widget child, int x, int y)
Add a child Widget to this Layout.
WindowgetBinWindow()
Return the Layout's bin window, into which content is drawn.
AdjustmentgetHorizontalAdjustment()
Return the Horizontal Adjustment.
static LayoutgetLayout(Handle handle)
Construct a new Layout from a handle to a native resource.
RequisitiongetSize()
Retrieve the size of the scrollabel area of the layout.
static TypegetType()
Retrieve the runtime type used by the GLib library.
AdjustmentgetVerticalAdjustment()
Return the Vertical Adjustment.
voidmoveChild(Widget child, int x, int y)
Move a child Widget to a new position
voidsetHorizontalAdjustment(Adjustment adjust)
Set the Horizontal Adjustment.
voidsetSize(int width, int height)
Set the size of the scrollable area of the layout.
voidsetVerticalAdjustment(Adjustment adjust)
Set the Vertical Adjustment.

Constructor Detail

Layout

public Layout(Adjustment hAdj, Adjustment vAdj)
Construct a new Layout object.

Parameters: hAdj The horizontal Adjustment object. vAdj The vertical Adjustment object.

Layout

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

Method Detail

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.

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.