org.gnu.gtk
Class Layout

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.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(org.gnu.glib.Handle handle)
          Construct a new Layout from a handle to a native resource.
 
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(org.gnu.glib.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, 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, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, 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, sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

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(org.gnu.glib.Handle handle)
Construct a new Layout from a handle to a native resource.

Method Detail

getLayout

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


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.

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.

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.

getSize

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

Returns:
The size of the scrollabel area.

getHorizontalAdjustment

public Adjustment getHorizontalAdjustment()
Return the Horizontal Adjustment.


setHorizontalAdjustment

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


getVerticalAdjustment

public Adjustment getVerticalAdjustment()
Return the Vertical Adjustment.


setVerticalAdjustment

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


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


getBinWindow

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