|
java-gnome version 4.0.15 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Bin
org.gnome.gtk.Alignment
public class Alignment
Control the alignment and size of a child Widget. It has four settings: xscale, yscale, xalign, and yalign. You can also specify padding around the child.
The alignment settings are used to place the child within the available
area. The values range from 0.0f
(top or left) to
1.0f
(bottom or right).
The scale settings are used to specify how much the child should expand to
fill the space allocated to the Alignment. The values can range from
0.0f
(meaning the child doesn't expand at all) to
1.0f
(meaning the child will expand to fill all of the
allocated space). If both scale settings are set to 1.0f
, the
two alignment values will have no effect on the child Widget.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gnome.gtk.Widget |
---|
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent |
Field Summary | |
---|---|
static float |
BOTTOM
Align to the bottom. |
static float |
CENTER
Align to the center. |
static float |
LEFT
Align to the left. |
static float |
RIGHT
Align to the right. |
static float |
TOP
Align to the top. |
Constructor Summary | |
---|---|
Alignment(float xalign,
float yalign,
float xscale,
float yscale)
Creates an empty Alignment. |
|
Alignment(float xalign,
float yalign,
float xscale,
float yscale,
Widget child)
Creates an Alignment wrapping an existing Widget. |
Method Summary | |
---|---|
float |
getAlignmentX()
Get the xalign value. |
float |
getAlignmentY()
Get the yalign value. |
int |
getPaddingBottom()
Returns the padding being added below the bottom of the child. |
int |
getPaddingLeft()
Returns the padding being added to the left of the child. |
int |
getPaddingRight()
Returns the padding being added to the right of the child. |
int |
getPaddingTop()
Returns the padding being added to the top of the child. |
float |
getScaleX()
Get the xscale value. |
float |
getScaleY()
Get the yscale value. |
void |
setAlignment(float xalign,
float yalign,
float xscale,
float yscale)
Set the alignment and scale values. |
void |
setPadding(int paddingTop,
int paddingBottom,
int paddingLeft,
int paddingRight)
Set the padding on the different sides of the Widget. |
Methods inherited from class org.gnome.gtk.Bin |
---|
getChild |
Methods inherited from class org.gnome.gtk.Container |
---|
add, getChildren, remove, setBorderWidth |
Methods inherited from class org.gnome.gtk.Widget |
---|
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float BOTTOM
1.0f
.
public static final float CENTER
0.5f
.
public static final float LEFT
0.0f
.
public static final float RIGHT
1.0f
.
public static final float TOP
0.0f
.
Constructor Detail |
---|
public Alignment(float xalign, float yalign, float xscale, float yscale)
add()
method.
public Alignment(float xalign, float yalign, float xscale, float yscale, Widget child)
Method Detail |
---|
public float getAlignmentX()
public float getAlignmentY()
public int getPaddingBottom()
public int getPaddingLeft()
public int getPaddingRight()
public int getPaddingTop()
public float getScaleX()
public float getScaleY()
public void setAlignment(float xalign, float yalign, float xscale, float yscale)
top
for the interpretation of the values. All
parameters must be within the range of 0.0f
to
1.0f
.
public void setPadding(int paddingTop, int paddingBottom, int paddingLeft, int paddingRight)
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |