org.gnu.gtk

Class Viewport


public class Viewport
extends Bin

A Viewport is a container that does not resize to fit in the space allocated to it. Instead, it adds scrollbars as necessary so you can view any part of the window.

Constructor Summary

Viewport(Handle handle)
Construct a Viewport using a handle to a native resource.
Viewport(Adjustment hadj, Adjustment vadj)
Construct a new Viewport with the given Adjustments.

Method Summary

Adjustment
getHAdjustment()
Returns the horizontal Viewport's Adjustment.
static Type
getType()
Retrieve the runtime type used by the GLib library.
Adjustment
getVAdjustment()
Returns the vertical Viewport's Adjustment.
static Viewport
getViewport(Handle handle)
Internal static factory method to be used by Java-Gnome only.
void
setHAdjustment(Adjustment hadj)
Sets the horizontal Viewport's Adjustment.
void
setVAdjustment(Adjustment vadj)
Sets the vertical Viewport's Adjustment.

Methods inherited from class org.gnu.gtk.Bin

getChild, getType

Methods inherited from class org.gnu.gtk.Container

add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, getType, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode

Methods inherited from class org.gnu.gtk.Widget

activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getEventListenerClass, getEventType, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getType, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight

Methods inherited from class org.gnu.gtk.GtkObject

destroy, getType, sink

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

Viewport

public Viewport(Handle handle)
Construct a Viewport using a handle to a native resource.

Viewport

public Viewport(Adjustment hadj,
                Adjustment vadj)
Construct a new Viewport with the given Adjustments.
Parameters:
hadj - The horizontal Adjustment to use for the Viewport.
vadj - The vertical Adjustment to use for the Viewport.

Method Details

getHAdjustment

public Adjustment getHAdjustment()
Returns the horizontal Viewport's Adjustment. This can be used to connect the horizontal scrollbar to the child Widget's horizontal scroll functionality.
Returns:
The horizontal Viewport's Adjustment.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.
Overrides:
getType in interface Bin

getVAdjustment

public Adjustment getVAdjustment()
Returns the vertical Viewport's Adjustment. This can be used to connect the vertical scrollbar to the child Widget's vertical scroll functionality.
Returns:
The vertical Viewport's Adjustment.

getViewport

public static Viewport getViewport(Handle handle)
Internal static factory method to be used by Java-Gnome only.

setHAdjustment

public void setHAdjustment(Adjustment hadj)
Sets the horizontal Viewport's Adjustment.
Parameters:
hadj - The horizontal Adjustment.

setVAdjustment

public void setVAdjustment(Adjustment vadj)
Sets the vertical Viewport's Adjustment.
Parameters:
vadj - The vertical Adjustment.