|
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.Paned
public abstract class Paned
Base type for Containers that dispose child Widgets in two panes, arranged
either horizontally (HPaned
) or vertically (VPaned
). A Paned will have two children, referred as child 1
and 2
.
This Widget is mainly used to divide the Window area in two parts. The user can adjust the size of the panes by dragging the separator that appears between them. This way, the user can choose at any time how much size allocate for each of the two child Widgets.
A typical usage of the Paned Container is to provide some kind of navigator facilities to a application, generally with a list of bookmarks or an index. In those cases, a HPaned is used to divide the application Window in two columns, one at the left, with the index in a TreeView, and another, wider, at the right, with the contents.
Note that Paned should only be used when we really need to allow users to
dynamically change the way size is distributed between the two children.
Otherwise, a HBox
or VBox
would be a better
choice.
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 |
Method Summary | |
---|---|
void |
add1(Widget child)
Adds a child Widget to the top (in case of VPaned) or to the left (in case of HPaned) pane. |
void |
add2(Widget child)
Adds a child Widget to the bottom (in case of VPaned) or to the right (in case of HPaned) pane. |
Widget |
getChild1()
Get the child Widget in the top (in case of a VPaned) or in the left (in case of an HPaned) pane. |
Widget |
getChild2()
Get the child Widget at the bottom (in case of VPaned) or at the right (in case of HPaned) pane. |
int |
getPosition()
Obtains the position of the divider between the two panes. |
void |
pack1(Widget child,
boolean resize,
boolean shrink)
Adds a child Widget to the top (in case of VPaned) or to the left (in case of HPaned) pane. |
void |
pack2(Widget child,
boolean resize,
boolean shrink)
Adds a child Widget to the bottom (in case of a VPaned) or to the right (in case of an HPaned) pane. |
void |
setPosition(int position)
Sets the position of the divider between the two panes. |
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 |
Method Detail |
---|
public void add1(Widget child)
This call is equivalent to pack1(child, false, true)
.
public void add2(Widget child)
This call is equivalent to pack2(child, false, true)
.
public Widget getChild1()
public Widget getChild2()
public int getPosition()
public void pack1(Widget child, boolean resize, boolean shrink)
child
- the Widget to be addedresize
- Whether this pane (and thus its Widget) should be resized
when the Paned is resize.shrink
- Whether the user can make the pane smaller than the size
requested by the child Widget. This can be useful to let the
user hide one of the two panels, but depending of the child
Widget type it can lead to poor visual results. Use with
caution.public void pack2(Widget child, boolean resize, boolean shrink)
pack1()
for details.
public void setPosition(int position)
Note that the main utility of a Paned is to let user to set the position, so in most cases you don't want to call this method. It can be useful to set the initial position, if you feel that the default value chosen by Gtk is not suitable for your application.
position
- The position of the divider, in pixels. A negative value
means that the position is not being forced.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |