GtkWidget is the base class of all widgets.
activate
public boolean activate()
For widgets that can be activeated (buttons, menu items, etc.) this
method activiates them. Activation is what happens when you press
Enter on a widget during keyboard navigation.
- False if this widget is not activatable.
addListener
public void addListener(DragDestinationListener listener)
Register an object to receive drag drop (destination) events.
listener
- The object that has implemented the
DragDestinationListener interface
addListener
public void addListener(DragSourceListener listener)
Register an object to receive drag source events.
listener
- The object that has implemented the
DragSourceListener interface
addListener
public void addListener(ExposeListener listener)
Register an object to receive expose event
notification.
listener
- The object that has implemented the
ExposeListener interface that is to receive the
expose events.
addListener
public void addListener(FocusListener listener)
Register an object to receive focus event notification.
listener
- The object that has implemented the
FocusListener interface that is to receive the focus events.
addListener
public void addListener(KeyListener listener)
Register an object to receive key event notification.
An important thing to notice is that some widgets don't
receive
low-level events (such as a key-press event) by default.
So if you want to capture events from them, you should add them to an
EventBox
, and capture events on the
EventBox
.
The reason why this happens is that some widgets, for efficiency, don't
have their own X window, which is necessary to receive events. These are
the widgets that don't have their own X window:
Alignment
Arrow
Bin
Box
Image
Item
Label
Pixmap
ScrolledWindow
Separator
Table
AspectFrame
Frame
VBox
HBox
VSeparator
HSeparator
listener
- The object that has implemented the
KeyListener interface that is to receive the key events.
addListener
public void addListener(LifeCycleListener listener)
Register an object to receive life cycle event notification.
listener
- The object that has implemented the
LifeCycleListener interface that is to receive the life cycle events.
addListener
public void addListener(MouseListener listener)
Register an object to receive mouse event notification.
An important thing to notice is that some widgets don't
receive
low-level events (such as a mouse-click event) by default.
So if you want to capture events from them, you should add them to an
EventBox
, and capture events on the
EventBox
.
The reason why this happens is that some widgets, for efficiency, don't
have their own X window, which is necessary to receive events. These are
the widgets that don't have their own X window:
Alignment
Arrow
Bin
Box
Image
Item
Label
Pixmap
ScrolledWindow
Separator
Table
AspectFrame
Frame
VBox
HBox
VSeparator
HSeparator
listener
- The object that has implemented the
MouseListener interface that is to receive the mouse events.
addListener
public void addListener(MouseMotionListener listener)
Register an object to receive mouse motion event
notification.
An important thing to notice is that some widgets don't
receive
low-level events (such as a mouse-enter event) by default.
So if you want to capture events from them, you should add them to an
EventBox
, and capture events on the
EventBox
.
The reason why this happens is that some widgets, for efficiency, don't
have their own X window, which is necessary to receive events. These are
the widgets that don't have their own X window:
Alignment
Arrow
Bin
Box
Image
Item
Label
Pixmap
ScrolledWindow
Separator
Table
AspectFrame
Frame
VBox
HBox
VSeparator
HSeparator
listener
- The object that has implemented the
MouseMotionListener interface that is to receive the
mouse motion events.
canActivateAccel
public boolean canActivateAccel(int signalId)
createContext
public Context createContext()
Creates a new Context with the appropriate Colormap, FontDescription,
and base direction for drawing text for this widget.
- A context that can be used for drawig text.
createLayout
public Layout createLayout(String text)
Creates a new Layout with the appropriate Colormap, FontDescription and
base direction for drawing text for this widget.
text
- The text used for the layout.
- The layout that can be used for drawing text.
destroy
public void destroy()
Destroy this widget. If this widget is inside a container the widget will be
removed from the container. All of this widget's children are also destroyed.
- destroy in interface GtkObject
draw
public void draw()
Causes the entire widget to be redrawn.
drawArea
public void drawArea(int x,
int y,
int width,
int height)
Causes the specified area to be redrawn
x
- The x coordinate for the area to be redrawn.y
- The y coordinate for the area to be redrawn.width
- The width of the area to be redrawn.height
- The height of the area to be redrawn.
drawArea
public void drawArea(Rectangle area)
Causes the specified area to be redrawn.
area
- The area to be redrawn.
findListener
protected static int findListener(Vector list,
Object listener)
Give us a way to locate a specific listener in a Vector.
list
- The Vector of listeners to search.listener
- The object that is to be located in the Vector.
- Returns the index of the listener in the Vector, or -1 if
the listener is not contained in the Vector.
finish
public static void finish(DragContext context,
boolean success,
boolean delete)
fireBooleanLifeCycleEvent
protected boolean fireBooleanLifeCycleEvent(LifeCycleEvent event,
boolean defaultValue)
fireDragDestinationEvent
protected void fireDragDestinationEvent(Widget widget,
DragContext dragContext,
int x,
int y,
SelectionData data,
int id,
int time)
fireExposeEvent
protected boolean fireExposeEvent(ExposeEvent event)
fireFocusEvent
protected boolean fireFocusEvent(FocusEvent event)
fireKeyEvent
protected boolean fireKeyEvent(KeyEvent event)
fireLifeCycleEvent
protected void fireLifeCycleEvent(LifeCycleEvent event)
fireMouseEvent
protected boolean fireMouseEvent(MouseEvent event)
fireMouseMotionEvent
protected boolean fireMouseMotionEvent(MouseMotionEvent event)
getAccessible
public AtkObject getAccessible()
Returns the accessible object associated with this widget.
- The AtkObject.
getColormap
public Colormap getColormap()
Returns the Colormap that will be used to render this widget.
- The colormap used for this widget.
getContext
public Context getContext()
Gets a Context with the appropriate Colormap, FontDescription and base
direction for this widget. Unlike the createContext method, this context
is owned by the widget and can be as long as the widget exists. This
context will be updated to match any changes to the widget's attributes.
- A context that can be used for drawing text.
getDisplay
public Display getDisplay()
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface GObject
getEventType
public EventType getEventType(String signal)
- getEventType in interface GObject
getModifierStyle
public RcStyle getModifierStyle()
- The current RcStyle for the Widget.
getName
public String getName()
Returns the name for the widget.
- The name for the widget.
getParent
public Widget getParent()
Returns the parent container for this widget
- The parent container for this widget.
getParentWindow
public Window getParentWindow()
Returns the widget's parent window.
- Returns the widget's parent window.
getPointer
public Point getPointer()
Returns the location of the mouse pointer in widget coordinates. This
method will return null if the mouse is not currently in the widget.
- The location of the mouse or null
getRootWindow
public Window getRootWindow()
getScreen
public Screen getScreen()
getSensitive
public boolean getSensitive()
Gets the sensitivity of the widget.
- true if the widget is sensitive, false otherwise.
getStyle
public Style getStyle()
Returns the Widgets
Style
.
- The current Style for the Widget.
getToplevel
public Widget getToplevel()
Returns the topmost widget in the container hierarchy.
- The topmost widget.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface GtkObject
getWindow
public Window getWindow()
Return the widget's gdk window. This is the window to draw
upon when writing custom widgets. It's available after the
widget has been mapped. Thus if you listen to
LifeCycleEvents, you can fetch the Window instance using
this method after an LifeCycleEvent of type MAP has
occured.
- the widget's gdk window, or null if a) it hasn't
been mapped yet or b) it is of a type that doesn't have a
gdk window.
grabDefault
public void grabDefault()
Causes the widget to become the default widget. The default widget
is activated when the user presses Enter in the window. Default widgets
must be activatable.
grabFocus
public void grabFocus()
Causes the widget to gain focus within its' TOPLEVEL.
gtk_drag_dest_set
protected static final void gtk_drag_dest_set(Handle widget,
int flags,
Handle[] targets,
int actions)
gtk_drag_dest_unset
protected static final void gtk_drag_dest_unset(Handle widget)
gtk_drag_finish
protected static final void gtk_drag_finish(Handle context,
boolean success,
boolean delete)
gtk_drag_get_data
protected static final void gtk_drag_get_data(Handle widget,
Handle context,
int target)
gtk_drag_highlight
protected static final void gtk_drag_highlight(Handle widget)
gtk_drag_source_set
protected static final void gtk_drag_source_set(Handle widget,
int start_button_mask,
Handle[] targets,
int actions)
gtk_drag_source_set_icon
protected static final void gtk_drag_source_set_icon(Handle widget,
Handle colormap,
Handle pixmap,
Handle mask)
gtk_drag_source_set_icon_pixbuf
protected static final void gtk_drag_source_set_icon_pixbuf(Handle widget,
Handle pixbuf)
gtk_drag_source_set_icon_stock
protected static final void gtk_drag_source_set_icon_stock(Handle widget,
String stockId)
gtk_drag_source_unset
protected static final void gtk_drag_source_unset(Handle widget)
gtk_drag_unhighlight
protected static final void gtk_drag_unhighlight(Handle widget)
gtk_widget_activate
protected static final boolean gtk_widget_activate(Handle widget)
gtk_widget_add_accelerator
protected static final void gtk_widget_add_accelerator(Handle widget,
String accelSignal,
Handle accelGroup,
int accelKey,
int accelMods,
int accelFlags)
gtk_widget_add_events
protected static final void gtk_widget_add_events(Handle widget,
int events)
gtk_widget_add_mnemonic_label
protected static final void gtk_widget_add_mnemonic_label(Handle widget,
Handle label)
gtk_widget_can_activate_accel
protected static final boolean gtk_widget_can_activate_accel(Handle widget,
int signalId)
gtk_widget_child_focus
protected static final boolean gtk_widget_child_focus(Handle widget,
int direction)
gtk_widget_child_notify
protected static final void gtk_widget_child_notify(Handle widget,
String childProperty)
gtk_widget_class_path
protected static final void gtk_widget_class_path(Handle widget,
int[] pathLength,
String[] path,
String[] pathReversed)
gtk_widget_create_pango_context
protected static final Handle gtk_widget_create_pango_context(Handle widget)
gtk_widget_create_pango_layout
protected static final Handle gtk_widget_create_pango_layout(Handle widget,
String text)
gtk_widget_destroy
protected static final void gtk_widget_destroy(Handle widget)
gtk_widget_destroyed
protected static final void gtk_widget_destroyed(Handle widget,
Handle[] widgetPointer)
gtk_widget_ensure_style
protected static final void gtk_widget_ensure_style(Handle widget)
gtk_widget_event
protected static final boolean gtk_widget_event(Handle widget,
Handle event)
gtk_widget_freeze_child_notify
protected static final void gtk_widget_freeze_child_notify(Handle widget)
gtk_widget_get_accessible
protected static final Handle gtk_widget_get_accessible(Handle widget)
gtk_widget_get_ancestor
protected static final Handle gtk_widget_get_ancestor(Handle widget,
int widgetType)
gtk_widget_get_child_requisition
protected static final void gtk_widget_get_child_requisition(Handle widget,
Handle[] requisition)
gtk_widget_get_child_visible
protected static final boolean gtk_widget_get_child_visible(Handle widget)
gtk_widget_get_colormap
protected static final Handle gtk_widget_get_colormap(Handle widget)
gtk_widget_get_composite_name
protected static final String gtk_widget_get_composite_name(Handle widget)
gtk_widget_get_default_colormap
protected static final Handle gtk_widget_get_default_colormap()
gtk_widget_get_default_direction
protected static final int gtk_widget_get_default_direction()
gtk_widget_get_default_style
protected static final Handle gtk_widget_get_default_style()
gtk_widget_get_default_visual
protected static final Handle gtk_widget_get_default_visual()
gtk_widget_get_direction
protected static final int gtk_widget_get_direction(Handle widget)
gtk_widget_get_display
protected static final Handle gtk_widget_get_display(Handle widget)
gtk_widget_get_events
protected static final int gtk_widget_get_events(Handle widget)
gtk_widget_get_extension_events
protected static final int gtk_widget_get_extension_events(Handle widget)
gtk_widget_get_modifier_style
protected static final Handle gtk_widget_get_modifier_style(Handle widget)
gtk_widget_get_name
protected static final String gtk_widget_get_name(Handle widget)
gtk_widget_get_pango_context
protected static final Handle gtk_widget_get_pango_context(Handle widget)
gtk_widget_get_parent
protected static final Handle gtk_widget_get_parent(Handle widget)
gtk_widget_get_parent_window
protected static final Handle gtk_widget_get_parent_window(Handle widget)
gtk_widget_get_pointer
protected static final void gtk_widget_get_pointer(Handle widget,
int[] x,
int[] y)
gtk_widget_get_root_window
protected static final Handle gtk_widget_get_root_window(Handle widget)
gtk_widget_get_screen
protected static final Handle gtk_widget_get_screen(Handle widget)
gtk_widget_get_sensitive
protected static final boolean gtk_widget_get_sensitive(Handle widget)
gtk_widget_get_settings
protected static final Handle gtk_widget_get_settings(Handle widget)
gtk_widget_get_size_request
protected static final void gtk_widget_get_size_request(Handle widget,
int[] width,
int[] height)
gtk_widget_get_style
protected static final Handle gtk_widget_get_style(Handle widget)
gtk_widget_get_toplevel
protected static final Handle gtk_widget_get_toplevel(Handle widget)
gtk_widget_get_type
protected static final int gtk_widget_get_type()
gtk_widget_get_visual
protected static final Handle gtk_widget_get_visual(Handle widget)
gtk_widget_get_window
protected static final Handle gtk_widget_get_window(Handle widget)
gtk_widget_grab_default
protected static final void gtk_widget_grab_default(Handle widget)
gtk_widget_grab_focus
protected static final void gtk_widget_grab_focus(Handle widget)
gtk_widget_has_screen
protected static final boolean gtk_widget_has_screen(Handle widget)
gtk_widget_hide
protected static final void gtk_widget_hide(Handle widget)
gtk_widget_hide_all
protected static final void gtk_widget_hide_all(Handle widget)
gtk_widget_hide_on_delete
protected static final boolean gtk_widget_hide_on_delete(Handle widget)
gtk_widget_intersect
protected static final boolean gtk_widget_intersect(Handle widget,
Handle area,
Handle intersection)
gtk_widget_is_ancestor
protected static final boolean gtk_widget_is_ancestor(Handle widget,
Handle ancestor)
gtk_widget_is_focus
protected static final boolean gtk_widget_is_focus(Handle widget)
gtk_widget_list_accel_closures
protected static final int gtk_widget_list_accel_closures(Handle widget)
gtk_widget_list_mnemonic_labels
protected static final Handle[] gtk_widget_list_mnemonic_labels(Handle widget)
gtk_widget_map
protected static final void gtk_widget_map(Handle widget)
gtk_widget_mnemonic_activate
protected static final boolean gtk_widget_mnemonic_activate(Handle widget,
boolean groupCycling)
gtk_widget_modify_base
protected static final void gtk_widget_modify_base(Handle widget,
int state,
Handle color)
gtk_widget_modify_bg
protected static final void gtk_widget_modify_bg(Handle widget,
int state,
Handle color)
gtk_widget_modify_fg
protected static final void gtk_widget_modify_fg(Handle widget,
int state,
Handle color)
gtk_widget_modify_font
protected static final void gtk_widget_modify_font(Handle widget,
Handle fontDesc)
gtk_widget_modify_style
protected static final void gtk_widget_modify_style(Handle widget,
Handle style)
gtk_widget_modify_text
protected static final void gtk_widget_modify_text(Handle widget,
int state,
Handle color)
gtk_widget_path
protected static final void gtk_widget_path(Handle widget,
int[] pathLength,
String[] path,
String[] pathReversed)
gtk_widget_pop_colormap
protected static final void gtk_widget_pop_colormap()
gtk_widget_pop_composite_child
protected static final void gtk_widget_pop_composite_child()
gtk_widget_push_colormap
protected static final void gtk_widget_push_colormap(Handle cmap)
gtk_widget_push_composite_child
protected static final void gtk_widget_push_composite_child()
gtk_widget_queue_draw
protected static final void gtk_widget_queue_draw(Handle widget)
gtk_widget_queue_draw_area
protected static final void gtk_widget_queue_draw_area(Handle widget,
int x,
int y,
int width,
int height)
gtk_widget_queue_resize
protected static final void gtk_widget_queue_resize(Handle widget)
gtk_widget_realize
protected static final void gtk_widget_realize(Handle widget)
gtk_widget_ref
protected static final Handle gtk_widget_ref(Handle widget)
gtk_widget_region_intersect
protected static final int gtk_widget_region_intersect(Handle widget,
Handle region)
gtk_widget_remove_accelerator
protected static final boolean gtk_widget_remove_accelerator(Handle widget,
Handle accelGroup,
int accelKey,
int accelMods)
gtk_widget_remove_mnemonic_label
protected static final void gtk_widget_remove_mnemonic_label(Handle widget,
Handle label)
gtk_widget_render_icon
protected static final Handle gtk_widget_render_icon(Handle widget,
String stockID,
int size,
String detail)
gtk_widget_reparent
protected static final void gtk_widget_reparent(Handle widget,
Handle newParent)
gtk_widget_reset_rc_styles
protected static final void gtk_widget_reset_rc_styles(Handle widget)
gtk_widget_send_expose
protected static final int gtk_widget_send_expose(Handle widget,
Handle event)
gtk_widget_set_accel_path
protected static final void gtk_widget_set_accel_path(Handle widget,
String accelPath,
Handle accelGroup)
gtk_widget_set_app_paintable
protected static final void gtk_widget_set_app_paintable(Handle widget,
boolean appPaintable)
gtk_widget_set_child_visible
protected static final void gtk_widget_set_child_visible(Handle widget,
boolean isVisible)
gtk_widget_set_colormap
protected static final void gtk_widget_set_colormap(Handle widget,
Handle cmap)
gtk_widget_set_composite_name
protected static final void gtk_widget_set_composite_name(Handle widget,
String name)
gtk_widget_set_default_colormap
protected static final void gtk_widget_set_default_colormap(Handle cmap)
gtk_widget_set_default_direction
protected static final void gtk_widget_set_default_direction(int dir)
gtk_widget_set_direction
protected static final void gtk_widget_set_direction(Handle widget,
int dir)
gtk_widget_set_double_buffered
protected static final void gtk_widget_set_double_buffered(Handle widget,
boolean doubleBuffered)
gtk_widget_set_events
protected static final void gtk_widget_set_events(Handle widget,
int events)
gtk_widget_set_extension_events
protected static final void gtk_widget_set_extension_events(Handle widget,
int mode)
gtk_widget_set_name
protected static final void gtk_widget_set_name(Handle widget,
String name)
gtk_widget_set_parent
protected static final void gtk_widget_set_parent(Handle widget,
Handle parent)
gtk_widget_set_parent_window
protected static final void gtk_widget_set_parent_window(Handle widget,
Handle parent)
gtk_widget_set_redraw_on_allocate
protected static final void gtk_widget_set_redraw_on_allocate(Handle widget,
boolean redrawOnAllocate)
gtk_widget_set_scroll_adjustments
protected static final void gtk_widget_set_scroll_adjustments(Handle widget,
Handle hadj,
Handle vadj)
gtk_widget_set_sensitive
protected static final void gtk_widget_set_sensitive(Handle widget,
boolean sensitive)
gtk_widget_set_size_request
protected static final void gtk_widget_set_size_request(Handle widget,
int width,
int height)
gtk_widget_set_state
protected static final void gtk_widget_set_state(Handle widget,
int state)
gtk_widget_set_style
protected static final void gtk_widget_set_style(Handle widget,
Handle style)
gtk_widget_shape_combine_mask
protected static final void gtk_widget_shape_combine_mask(Handle widget,
Handle shapeMask,
int offsetX,
int offsetY)
gtk_widget_show
protected static final void gtk_widget_show(Handle widget)
gtk_widget_show_all
protected static final void gtk_widget_show_all(Handle widget)
gtk_widget_show_now
protected static final void gtk_widget_show_now(Handle widget)
gtk_widget_size_allocate
protected static final void gtk_widget_size_allocate(Handle widget,
Handle allocation)
gtk_widget_size_request
protected static final void gtk_widget_size_request(Handle widget,
Handle requisition)
gtk_widget_style_get_property
protected static final void gtk_widget_style_get_property(Handle widget,
String propertyName,
Handle value)
gtk_widget_thaw_child_notify
protected static final void gtk_widget_thaw_child_notify(Handle widget)
gtk_widget_translate_coordinates
protected static final boolean gtk_widget_translate_coordinates(Handle srcWidget,
Handle destWidget,
int srcX,
int srcY,
int[] destX,
int[] destY)
gtk_widget_unmap
protected static final void gtk_widget_unmap(Handle widget)
gtk_widget_unparent
protected static final void gtk_widget_unparent(Handle widget)
gtk_widget_unrealize
protected static final void gtk_widget_unrealize(Handle widget)
gtk_widget_unref
protected static final void gtk_widget_unref(Handle widget)
handleButtonPressed
protected boolean handleButtonPressed(Handle event)
handleButtonReleased
protected boolean handleButtonReleased(Handle event)
handleDelete
protected boolean handleDelete(Handle event)
handleDragDataGet
protected void handleDragDataGet(Handle context,
Handle data,
int id,
int time)
handleDragDestination
protected void handleDragDestination(Handle context,
int x,
int y,
Handle data,
int id,
int time)
handleExpose
protected boolean handleExpose(Handle event)
handleFocusIn
protected boolean handleFocusIn(Handle event)
handleFocusOut
protected boolean handleFocusOut(Handle event)
handleHide
protected void handleHide()
handleKeyPressed
protected boolean handleKeyPressed(Handle event)
handleKeyReleased
protected boolean handleKeyReleased(Handle event)
handleMap
protected void handleMap()
handleMouseEnter
protected boolean handleMouseEnter(Handle event)
handleMouseLeave
protected boolean handleMouseLeave(Handle event)
handleMouseMotion
protected boolean handleMouseMotion(Handle event)
handleNoExpose
protected boolean handleNoExpose(Handle event)
handleRealize
protected void handleRealize()
handleScroll
protected boolean handleScroll(Handle event)
handleShow
protected void handleShow()
handleUnmap
protected void handleUnmap()
hasFocus
public boolean hasFocus()
Determines if the widget has focus within its' TOPLEVEL.
- true if the widget has focus.
hasScreen
public boolean hasScreen()
hide
public void hide()
Cause this Widget to not be visible.
hideAll
public void hideAll()
Cause this Widget and all of its' children to not be visible.
highlight
public static void highlight(Widget widget)
intersect
public Rectangle intersect(Rectangle area)
Computes the intersection of the widget's area and area
.
area
- The area to use to compute the intersection.
- The intersection. If the areas don't intersect this method returns null.
isAncestor
public boolean isAncestor(Widget ancestor)
Determines whether this widget is somewhere inside of ancestor.
ancestor
- The possible parent widget
makeWidget
public static Widget makeWidget(Handle handle)
throws ClassNotFoundException
Create a Java-GNOME Widget subclass from an existing native
GTK+ handle.
handle
- The handle that represents a pointer to a
native resource.
modifyStyle
public void modifyStyle(RcStyle style)
Modifies style values on the Widget. Modifications made using this
technique take precedence over style values set via an RC file.
style
- The style to apply to the Widget
popColormap
public void popColormap()
Pops the top colormap off of the stack of colormaps. The topmost Colormap
on the stack will be used to create all Widgets.
pushColormap
public void pushColormap(Colormap colormap)
Pushes a Colormap onto the stack of colormaps. The topmost Colormap
on the stack will be used to create all Widgets.
colormap
- The Colormap to push onto the stack.
realize
public void realize()
Creates a native window resource associated with this widget. Normally a widget
realization happens implicitly; if you show a widget and all of its' parent containers
then the widget will be realized automatically.
removeListener
public void removeListener(DragDestinationListener listener)
Unregister an object that was receiving dragDestination event notification.
listener
- The object that is to no longer receive
dragDestination events
removeListener
public void removeListener(DragSourceListener listener)
Unregister an object that was receiving drag source event notification.
listener
- The object that is to no longer receive
drag source events
removeListener
public void removeListener(ExposeListener listener)
Unregister an object that was receiving expose event
notification.
listener
- The object that is to no longer receive
expose events.
removeListener
public void removeListener(FocusListener listener)
Unregister an object that was receiving focus event notification.
listener
- The object that is to no longer receive
focus events.
removeListener
public void removeListener(KeyListener listener)
Unregister an object that was receiving key event notification.
listener
- The object that is to no longer receive
key events.
removeListener
public void removeListener(LifeCycleListener listener)
Unregister an object that was receiving life cycle event notification.
listener
- The object that is to no longer receive
life cycle events.
removeListener
public void removeListener(MouseListener listener)
Unregister an object that was receiving mouse event notification.
listener
- The object that is to no longer receive
mouse events.
removeListener
public void removeListener(MouseMotionListener listener)
Unregister an object that was receiving mouse motion event
notification.
listener
- The object that is to no longer receive
mouse motion events.
reparent
public void reparent(Widget newParent)
Moves a widget from one Container to another.
newParent
- The widget that will be the new parent.
setBackgroundColor
public void setBackgroundColor(StateType state,
Color color)
Sets the background color for a widget in a particular state. All other
style values are left untouched.
state
- The widget state to modify.color
- The color to set the background.
setBaseColor
public void setBaseColor(StateType state,
Color color)
Sets the base color used for a widget in a particular state. The base color
is the backgound color used along with the text color for widgets such as
Entry, TextView, etc.
state
- The widget state to modify.color
- The color to set.
setColormap
public void setColormap(Colormap colormap)
Set the Colormap that will be used to render this widget.
colormap
- The colormap to be used.
setDoubleBuffered
public void setDoubleBuffered(boolean doubleBuffered)
Enables/Disables double buffering for this widget. Widgets are double buffered
by default.
doubleBuffered
- Set if the widget should be double buffered.
setDragDestination
public void setDragDestination(DestDefaults flags,
TargetEntry[] targets,
DragAction actions)
Sets up the widget so that is can receive drops as part of drag drop
events and specifies what sort of drops it will accept
flags
-
setDragIconPixbuf
public void setDragIconPixbuf(Widget widget,
Pixbuf pixbuf)
setDragIconStock
public void setDragIconStock(Widget widget,
String stockId)
setDragSource
public void setDragSource(ModifierType buttons,
TargetEntry[] targets,
DragAction actions)
Sets up the widget so that it can be the source of drag and drop
operations.
buttons
- Buttons which can start the dragtargets
- An array of names of drag and drop operations accepted
(these are made up by the application designers. Widgets must set as drag
sources and destinations with one of these the same)actions
- Drag action - determines which events will be called.
setFont
public void setFont(FontDescription fontDesc)
Sets the font to use for the widget.
fontDesc
- The font description to use.
setForegroundColor
public void setForegroundColor(StateType state,
Color color)
Sets the foreground color for a widget in a particular state. All other
style values are left untouched.
state
- The widget state to modify.color
- The color to set the foreground.
setMinimumSize
public void setMinimumSize(int width,
int height)
Sets the minimum size of a widget. You can use this method to force a widget
to be either larger or smaller that it normally be.
In most cases
Window.setDefaultSize()
is a better choice for toplevel
windows than this method. Setting the default size will still allow users to shrink
the window. Setting the minimum size will force them to leave the window at
least as large as the request.
Note the inherent danger of setting any fixed size - themes, translations into
other languages, different fonts, and user action can change the appropriate
size for a given widget. So, it's basically impossible to hardcode a size that
will always be correct.
If the minimum size in a given direction is -1 then the "natural" size for the
widget will be used instead.
width
- The minimum width size to use.height
- The minimum height size to use.
setName
public void setName(String name)
Sets the name for this widget. Widgets can be named which allows you
to refer to them from a gtkrc file. You can apply a style to widgets with a
particular name in the gtkrc file.
name
- The name for the widget.
setNoDragDestination
public void setNoDragDestination()
Removes support for this widget being a drag and drop target
setNoDragSource
public void setNoDragSource()
Removes support for this widget being a drag and drop source.
setSensitive
public void setSensitive(boolean sensitive)
Sets the sensitivity of the widget.
sensitive
- Indicates if the widget should be sensitive.
setTextColor
public void setTextColor(StateType state,
Color color)
Sets the text color for a widget in a particilar state. All other style values
are left untouched. The text color is the foreground color along with the
base color for widgets such as Entry, TextView, etc.
state
- The widget state to modify.color
- The color to set the text.
shapeCombineMask
public void shapeCombineMask(Bitmap shapeMask,
int x,
int y)
Sets the shape of this widgets OS window. This allows for transparent windows.
shapeMask
- Shape to be added or null to remove an existing shape.x
- X Position of the shape mask with respect to the window.y
- Y Position of the shape mask with respect to the window.
show
public void show()
Cause this Widget to be visible.
showAll
public void showAll()
Cause this Widget and all of its' children to be visible.
unHighlight
public static void unHighlight(Widget widget)