org.gnu.gtk
Class Alignment

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gtk.GtkObject
              |
              +--org.gnu.gtk.Widget
                    |
                    +--org.gnu.gtk.Container
                          |
                          +--org.gnu.gtk.Bin
                                |
                                +--org.gnu.gtk.Alignment

public class Alignment
extends Bin

This is a container widget that is capable of controlling the size of a single child widget. The scale values are from 0.0 to 1.0, indicating the maximum amount the child can expand to fill the space allocated to the Alignment widget. The align values determine the x and y positions relative to the top left and bottom right corners of the Alignment rectangle. The align values are from 0.0 to the top or left side, and 1.0 for the bottom or right side.


Constructor Summary
Alignment(double xAlign, double yAlign, double xScale, double yScale)
          Construct a new Alignment.
Alignment(int handle)
          Construct an alignment using a handle to a native resource.
 
Method Summary
static Type getType()
          Retrieve the runtime type used by the GLib library.
 void set(double xAlign, double yAlign, double xScale, double yScale)
          Set the alignment and scale for an already created Alignment object.
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getEventListenerClass, getEventType, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, createContext, createLayout, destroy, draw, drawArea, drawArea, getAccessible, getColormap, getContext, getModifierStyle, getName, getParent, getParentWindow, getPointer, getSensitive, getStyle, getToplevel, grabDefault, grabFocus, hasFocus, hide, hideAll, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Alignment

public Alignment(double xAlign,
                 double yAlign,
                 double xScale,
                 double yScale)
Construct a new Alignment.

Parameters:
xAlign - The horizontal alignment of the child widget from 0 (left) to 1 (right).
yAlign - The vertical alignment of the child widget from 0 (top) to 1 (bottom).
xScale - The amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Alignment.
yScale - The amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xScale.

Alignment

public Alignment(int handle)
Construct an alignment using a handle to a native resource.

Method Detail

set

public void set(double xAlign,
                double yAlign,
                double xScale,
                double yScale)
Set the alignment and scale for an already created Alignment object.

Parameters:
xAlign - The horizontal alignment of the child widget from 0 (left) to 1 (right).
yAlign - The vertical alignment of the child widget from 0 (top) to 1 (bottom).
xScale - The amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Alignment.
yScale - The amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xScale.

getType

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


Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net