|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
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.Fixed
public class Fixed
Fixed is a Container Widget that allows you to position other widgets on it at fixed coordinates. These could include Buttons and Labels as well as more complex composite widgets like Boxes.
You should not use Fixed for any non-trivial purpose. While you might think at first that it would simplify your application, the reality is that Fixed is almost always the wrong Container choice. Because GTK is the widget toolkit used to power the user interfaces of GNOME applications, the appearance of Widgets is very dynamic. Different window managers and theme engines can radically change the size and appearance of Widgets to suit varying accessibility and usability requirements; different fonts available to your users will cause Labels to be sized differently than you'd expect, and of course translation completely throws predictability right out the window. Since the Fixed Container does not adapt to the size requests of the Widgets with in it, the frequent result is truncated text, overlapping Widgets, and other visual bugs.
The Fixed widget can't be properly mirrored in right-to-left languages such as Hebrew and Arabic. A Fixed widget with a right-to-left font will render your application unusable.
Adding or removing any GUI elements from this Fixed requires you to reposition all the other Widgets within it. As you can imagine, this will end up a long-term maintenance headache for your application.
If any of those are a concern for your application, then you should be
using a different Container, either combinations of VBox
and
HBox
, or perhaps Table
. You have been warned!
Layout
,
DrawingArea
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 |
Nested classes/interfaces inherited from class org.gnome.gtk.Object |
---|
Object.Destroy |
Constructor Summary | |
---|---|
Fixed()
Create a new Fixed Widget. |
Method Summary | |
---|---|
void |
move(Widget widget,
int x,
int y)
Move a Widget that has already been added to this Fixed to a new location. |
void |
put(Widget widget,
int x,
int y)
Place a Widget into the Fixed Container at a specified location. |
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, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll |
Methods inherited from class org.gnome.gtk.Object |
---|
connect, destroy |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Fixed()
Method Detail |
---|
public void move(Widget widget, int x, int y)
Calling move()
will cause GTK to inherently redraw the
entire Fixed surface. If you have many Widgets in a Fixed, this can
lead to flickering. Consider using Layout
or
DrawingArea
instead.
The x and y co-ordinates are measured in pixels from the top left corner of the Fixed.
widget
- the Widget that will be moved.x
- the horizontal position to move widget
to.y
- the vertical position to move widget
to.public void put(Widget widget, int x, int y)
It is up to you to ensure that the placing of the new Widget will not overlap any existing Widgets. If this is starting to be a burden, it's a good sign you're using the wrong Container!
The x and y co-ordinates are measured in pixels from the top left corner of the Fixed.
widget
- the Widget to be placed in the Fixed.x
- horizontal position for the Widget being addedy
- vertical position for the Widget being added
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |