|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.Bin
org.gnu.gtk.ScrolledWindow
A ScrolledWindow is a Bin subclass; it's a container that accepts a single child widget. ScrolledWindow adds scrollbars to the child widget and optionally draws a beveled frame around the child widget.
The ScrolledWindow works in two ways. Some Widgets have native
scrolling support; these widgets have "slots" for Adjustment
objects.
For Widgets that lack native scrolling support the Viewport
Widget acts as an adaptor class, implementing scrollability for
child Widgets that lack their own scrolling capability.
If a Widget has native scrolling capabilities it can be added with the
add
method. If a Widget does not, you must first add the
Widget to a Viewport
and then add the Viewport
to the ScrolledWindow. The convenience method
addWithViewport
does exactly this, so you can ignore the
presence of the Viewport
.
The position of the scrollbars is controlled by the scroll adjustments.
See Adjustment
for details on how to determine the position
of the layout.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
ScrolledWindow()
Creates a new ScrolledWindow object. |
|
ScrolledWindow(Adjustment hadj,
Adjustment vadj)
Create a new ScrolledWindow object. |
|
ScrolledWindow(Handle handle)
Construct a ScrolledWindow using a handle to a native resource. |
Method Summary | |
void |
addWithViewport(Widget child)
Used to add children without native scrolling capability. |
Adjustment |
getHAdjustment()
Returns the horizontal Scrollbar's Adjustment. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
Adjustment |
getVAdjustment()
Returns the vertical Scrollbar's Adjustment. |
protected static void |
gtk_scrolled_window_add_with_viewport(Handle scrolled_window,
Handle child)
|
protected static Handle |
gtk_scrolled_window_get_hadjustment(Handle scrolled_window)
|
protected static int |
gtk_scrolled_window_get_placement(Handle scrolled_window)
|
protected static void |
gtk_scrolled_window_get_policy(Handle scrolled_window,
int[] hscrollbarPolicy,
int[] vscrollbarPolicy)
|
protected static int |
gtk_scrolled_window_get_shadow_type(Handle scrolled_window)
|
protected static int |
gtk_scrolled_window_get_type()
|
protected static Handle |
gtk_scrolled_window_get_vadjustment(Handle scrolled_window)
|
protected static Handle |
gtk_scrolled_window_new(Handle hadjustment,
Handle vadjustment)
|
protected static void |
gtk_scrolled_window_set_hadjustment(Handle scrolled_window,
Handle hadjustment)
|
protected static void |
gtk_scrolled_window_set_placement(Handle scrolled_window,
int windowPlacement)
|
protected static void |
gtk_scrolled_window_set_policy(Handle scrolled_window,
int hscrollbarPolicy,
int vscrollbarPolicy)
|
protected static void |
gtk_scrolled_window_set_shadow_type(Handle scrolled_window,
int type)
|
protected static void |
gtk_scrolled_window_set_vadjustment(Handle scrolled_window,
Handle vadjustment)
|
void |
setHAdjustment(Adjustment hadj)
Sets the horizontal Scrollbar's Adjustment. |
void |
setPlacement(CornerType windowPlacement)
Determines the location of the child widget with respect to the scrollbars. |
void |
setPolicy(PolicyType hScrollBarPolicy,
PolicyType vScrollBarPolicy)
Sets the scrollbar policy for the horizontal and vertical scrollbars. |
void |
setShadowType(ShadowType type)
Changes the type of shadow drawn around the contents of the ScrolledWindow. |
void |
setVAdjustment(Adjustment vadj)
Sets the vertical Scrollbar's Adjustment. |
Methods inherited from class org.gnu.gtk.Bin |
getChild, gtk_bin_get_child, gtk_bin_get_type |
Methods inherited from class org.gnu.gtk.GtkObject |
getFlags, gtk_object_destroy, gtk_object_get_type, gtk_object_sink, setFlags, sink |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScrolledWindow(Adjustment hadj, Adjustment vadj)
Adjustments
; these will be shared
with the scrollbars and the child widgets to keep the bars in
sync with the child.
hadj
- The horizontal Adjustment.vadj
- The vertical Adjustment.public ScrolledWindow()
Adjustment
s automatically.
public ScrolledWindow(Handle handle)
Method Detail |
public Adjustment getHAdjustment()
public void setHAdjustment(Adjustment hadj)
hadj
- The horizontal Adjustment.public Adjustment getVAdjustment()
public void setVAdjustment(Adjustment vadj)
vadj
- The vertical Adjustment.public void setPolicy(PolicyType hScrollBarPolicy, PolicyType vScrollBarPolicy)
hScrollBarPolicy
- The policy for the horizontal ScrollBar.vScrollBarPolicy
- The policy for the vertical ScrollBar.public void addWithViewport(Widget child)
child
- The Widget to add to the ScrolledWindow.public void setPlacement(CornerType windowPlacement)
windowPlacement
- The placement for the child widget.public void setShadowType(ShadowType type)
type
- The type of shadow to draw.public static Type getType()
protected static final int gtk_scrolled_window_get_type()
protected static final Handle gtk_scrolled_window_new(Handle hadjustment, Handle vadjustment)
protected static final void gtk_scrolled_window_set_hadjustment(Handle scrolled_window, Handle hadjustment)
protected static final void gtk_scrolled_window_set_vadjustment(Handle scrolled_window, Handle vadjustment)
protected static final Handle gtk_scrolled_window_get_hadjustment(Handle scrolled_window)
protected static final Handle gtk_scrolled_window_get_vadjustment(Handle scrolled_window)
protected static final void gtk_scrolled_window_set_policy(Handle scrolled_window, int hscrollbarPolicy, int vscrollbarPolicy)
protected static final void gtk_scrolled_window_get_policy(Handle scrolled_window, int[] hscrollbarPolicy, int[] vscrollbarPolicy)
protected static final void gtk_scrolled_window_set_placement(Handle scrolled_window, int windowPlacement)
protected static final int gtk_scrolled_window_get_placement(Handle scrolled_window)
protected static final void gtk_scrolled_window_set_shadow_type(Handle scrolled_window, int type)
protected static final int gtk_scrolled_window_get_shadow_type(Handle scrolled_window)
protected static final void gtk_scrolled_window_add_with_viewport(Handle scrolled_window, Handle child)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |