org.gnu.gtk

Class HandleBox


public class HandleBox
extends Bin

The HandleBox widget allows a portion of the window to be "torn-off". It is a bin widget which displays its children and a handle that the user can drag to tear off a separate window containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location it can be reattached.

Constructor Summary

HandleBox()
Create a new HandleBox object.
HandleBox(Handle handle)
Construct a HandleBox using a handle to a native resource.

Method Summary

void
addListener(HandleBoxListener listener)
Register an object to handle dialog events.
Class
getEventListenerClass(String signal)
EventType
getEventType(String signal)
static HandleBox
getHandleBox(Handle handle)
Internal static factory method to be used by Java-Gnome only.
PositionType
getHandlePosition()
Retrieves the handle position.
ShadowType
getShadowType()
Retrieves the shadow type used by this widget.
PositionType
getShapEdge()
Retrieves the snap edge of the widget.
static Type
getType()
Retrieve the runtime type used by the GLib library.
void
removeListener(HandleBoxListener listener)
Removes a listener
void
setHandlePosition(PositionType position)
Sets the side of the handle box where the handle is drawn.
void
setShadowType(ShadowType type)
Set the shadow type to be drawn around the border of the handle box.
void
setShapEdge(PositionType edge)
Sets the snap edge of the handle box.

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

HandleBox

public HandleBox()
Create a new HandleBox object.

HandleBox

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

Method Details

addListener

public void addListener(HandleBoxListener listener)
Register an object to handle dialog events.

getEventListenerClass

public Class getEventListenerClass(String signal)
Overrides:
getEventListenerClass in interface Container

getEventType

public EventType getEventType(String signal)
Overrides:
getEventType in interface Container

getHandleBox

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

getHandlePosition

public PositionType getHandlePosition()
Retrieves the handle position.

getShadowType

public ShadowType getShadowType()
Retrieves the shadow type used by this widget.

getShapEdge

public PositionType getShapEdge()
Retrieves the snap edge of the widget.

getType

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

removeListener

public void removeListener(HandleBoxListener listener)
Removes a listener

setHandlePosition

public void setHandlePosition(PositionType position)
Sets the side of the handle box where the handle is drawn.
Parameters:
position - Defines the position of the handle.

setShadowType

public void setShadowType(ShadowType type)
Set the shadow type to be drawn around the border of the handle box.
Parameters:
type - The ShadowType to use for the shadow.

setShapEdge

public void setShapEdge(PositionType edge)
Sets the snap edge of the handle box. The snap edge is the edge of the detached child that must be aligned with the corresponding edge of the ghost left behind when the child was detached to reattach the torn-off window.
Parameters:
edge - The side for the snap edge.