org.gnu.gtk

Class Widget

public class Widget extends GtkObject

GtkWidget is the base class of all widgets.
Constructor Summary
Widget(Handle handle)
Create a new Widget with a handle to a native resource returned from a call to the native libraries.
Method Summary
booleanactivate()
For widgets that can be activated (buttons, menu items, etc.) this method activiates them.
voidaddAccelerator(AccelGroup group, int accelKey, ModifierType accelMods, AccelFlags accelFlags)
voidaddEvents(EventMask events)
Adds the events in the bitfield events to the event mask for widget.
voidaddListener(LifeCycleListener listener)
Register an object to receive life cycle event notification.
voidaddListener(FocusListener listener)
Register an object to receive focus event notification.
voidaddListener(ConfigureListener listener)
Register an object to receive configure event notification.
voidaddListener(KeyListener listener)
Register an object to receive key event notification.
voidaddListener(MouseListener listener)
Register an object to receive mouse event notification.
voidaddListener(DragDestinationListener listener)
Register an object to receive drag drop (destination) events.
voidaddListener(DragTargetListener listener)
voidaddListener(DragSourceListener listener)
Register an object to receive drag source events.
voidaddListener(DragOriginListener listener)
voidaddListener(ExposeListener listener)
Register an object to receive expose event notification.
voidaddListener(MouseMotionListener listener)
Register an object to receive mouse motion event notification.
booleancanActivateAccel(int signalId)
ContextcreateContext()
Creates a new Context with the appropriate Colormap, FontDescription, and base direction for drawing text for this widget.
LayoutcreateLayout(String text)
Creates a new Layout with the appropriate Colormap, FontDescription and base direction for drawing text for this widget.
voiddraw()
Causes the entire widget to be redrawn.
voiddrawArea(Rectangle area)
Causes the specified area to be redrawn.
voiddrawArea(int x, int y, int width, int height)
Causes the specified area to be redrawn
static voidfinish(DragContext context, boolean success, boolean delete)
AtkObjectgetAccessible()
Returns the accessible object associated with this widget.
AllocationgetAllocation()
booleangetCanFocus()
Find out the current value of the "can-focus" property
ColormapgetColormap()
Returns the Colormap that will be used to render this widget.
ContextgetContext()
Gets a Context with the appropriate Colormap, FontDescription and base direction for this widget.
static voidgetData(Widget widget, DragContext context, Atom target)
DisplaygetDisplay()
voidgetDragData(DragContext context, Atom target, int time)
ClassgetEventListenerClass(String signal)
EventTypegetEventType(String signal)
ExtensionModegetExtensionEvents()
Retrieves the extension events the widget will receive.
RcStylegetModifierStyle()
Retruns the Widget's {@link RcStyle}.
StringgetName()
Returns the name for the widget.
WidgetgetParent()
Returns the parent container for this widget
WindowgetParentWindow()
Returns the widget's parent window.
PointgetPointer()
Returns the location of the mouse pointer in widget coordinates.
WindowgetRootWindow()
Get the root window where this widget is located.
ScreengetScreen()
booleangetSensitive()
Gets the sensitivity of the widget.
StylegetStyle()
Returns the Widgets {@link Style}.
WidgetgetToplevel()
Returns the topmost widget in the container hierarchy.
static TypegetType()
Retrieve the runtime type used by the GLib library.
static WidgetgetWidget(Handle handle)
Creates a new Widget with a handle to a native resource returned from a call to the native libraries.
WindowgetWindow()
Return the widget's Gdk window, if it has one.
voidgrabDefault()
Causes the widget to become the default widget.
voidgrabFocus()
Causes the widget to gain focus within its' TOPLEVEL.
booleanhasFocus()
Determines if the widget has focus within its' TOPLEVEL.
booleanhasScreen()
voidhide()
Cause this Widget to not be visible.
voidhideAll()
Cause this Widget and all of its' children to not be visible.
static voidhighlight(Widget widget)
voidhighlight()
Rectangleintersect(Rectangle area)
Computes the intersection of the widget's area and area.
booleanisAncestor(Widget ancestor)
Determines whether this widget is somewhere inside of ancestor.
static WidgetmakeWidget(Handle handle)
Create a Java-GNOME Widget subclass from an existing native GTK+ handle.
voidmodifyStyle(RcStyle style)
Modifies style values on the Widget.
voidpopColormap()
Pops the top colormap off of the stack of colormaps.
voidpushColormap(Colormap colormap)
Pushes a Colormap onto the stack of colormaps.
voidrealize()
Creates a native window resource associated with this widget.
booleanremoveAccelerator(AccelGroup group, int accelKey, ModifierType accelMods)
voidremoveListener(LifeCycleListener listener)
Unregister an object that was receiving life cycle event notification.
voidremoveListener(FocusListener listener)
Unregister an object that was receiving focus event notification.
voidremoveListener(ConfigureListener listener)
Unregister an object that was receiving configure event notification.
voidremoveListener(KeyListener listener)
Unregister an object that was receiving key event notification.
voidremoveListener(MouseListener listener)
Unregister an object that was receiving mouse event notification.
voidremoveListener(DragDestinationListener listener)
Unregister an object that was receiving dragDestination event notification.
voidremoveListener(DragTargetListener listener)
voidremoveListener(DragSourceListener listener)
Unregister an object that was receiving drag source event notification.
voidremoveListener(DragOriginListener listener)
voidremoveListener(ExposeListener listener)
Unregister an object that was receiving expose event notification.
voidremoveListener(MouseMotionListener listener)
Unregister an object that was receiving mouse motion event notification.
voidreparent(Widget newParent)
Moves a widget from one Container to another.
voidsetBackgroundColor(StateType state, Color color)
Sets the background color for a widget in a particular state.
voidsetBaseColor(StateType state, Color color)
Sets the base color used for a widget in a particular state.
voidsetCanFocus(boolean canFocus)
Tell this Widget whether or not it is allowed to accept focus.
voidsetColormap(Colormap colormap)
Set the Colormap that will be used to render this widget.
voidsetDoubleBuffered(boolean doubleBuffered)
Enables/Disables double buffering for this widget.
voidsetDragDestination(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
voidsetDragIcon(Widget widget, Colormap cmap, Pixmap pixmap, Bitmap mask)
voidsetDragIconPixbuf(Widget widget, Pixbuf pixbuf)
voidsetDragIconStock(Widget widget, String stockId)
voidsetDragSource(ModifierType buttons, TargetEntry[] targets, DragAction actions)
Sets up the widget so that it can be the source of drag and drop operations.
voidsetEvents(EventMask events)
Sets the event mask for a widget.
voidsetExtensionEvents(ExtensionMode mode)
Sets the extension events mask to mode.
voidsetFont(FontDescription fontDesc)
Sets the font to use for the widget.
voidsetForegroundColor(StateType state, Color color)
Sets the foreground color for a widget in a particular state.
voidsetMinimumSize(int width, int height)
Sets the minimum size of a widget.
voidsetName(String name)
Sets the name for this widget.
voidsetNoDragDestination()
Removes support for this widget being a drag and drop target
voidsetNoDragSource()
Removes support for this widget being a drag and drop source.
voidsetSensitive(boolean sensitive)
Sets the sensitivity of a widget.
voidsetTextColor(StateType state, Color color)
Sets the text color for a widget in a particular state.
voidshapeCombineMask(Bitmap shapeMask, int x, int y)
Sets the shape of this widgets OS window.
voidshow()
Cause this Widget to be visible.
voidshowAll()
Cause this Widget and all of its' children to be visible.
static voidunHighlight(Widget widget)
voidunHighlight()

Constructor Detail

Widget

public Widget(Handle handle)
Create a new Widget with a handle to a native resource returned from a call to the native libraries.

Parameters: handle The handle that represents a pointer to a native resource.

Method Detail

activate

public boolean activate()
For widgets that can be activated (buttons, menu items, etc.) this method activiates them. Activation is what happens when you press Enter on a widget during keyboard navigation.

Returns: False if this widget is not activatable.

addAccelerator

public void addAccelerator(AccelGroup group, int accelKey, ModifierType accelMods, AccelFlags accelFlags)

addEvents

public void addEvents(EventMask events)
Adds the events in the bitfield events to the event mask for widget. See setEvents() for details.

Parameters: events

addListener

public void addListener(LifeCycleListener listener)
Register an object to receive life cycle event notification.

Parameters: listener The object that has implemented the LifeCycleListener interface that is to receive the life cycle events.

addListener

public void addListener(FocusListener listener)
Register an object to receive focus event notification.

Parameters: listener The object that has implemented the FocusListener interface that is to receive the focus events.

addListener

public void addListener(ConfigureListener listener)
Register an object to receive configure event notification.

Parameters: listener The object that has implemented the ConfigureListener interface that is to receive the configure 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

Parameters: listener The object that has implemented the KeyListener interface that is to receive the key 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

Parameters: listener The object that has implemented the MouseListener interface that is to receive the mouse events.

addListener

public void addListener(DragDestinationListener listener)

Deprecated: Use {@link #addListener(DragTargetListener)} instead.

Register an object to receive drag drop (destination) events.

Parameters: listener The object that has implemented the DragDestinationListener interface

addListener

public void addListener(DragTargetListener listener)

addListener

public void addListener(DragSourceListener listener)

Deprecated: Use {@link #addListener(DragOriginListener)} instead.

Register an object to receive drag source events.

Parameters: listener The object that has implemented the DragSourceListener interface

addListener

public void addListener(DragOriginListener listener)

addListener

public void addListener(ExposeListener listener)
Register an object to receive expose event notification.

Parameters: listener The object that has implemented the ExposeListener interface that is to receive the expose 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

Parameters: 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.

Returns: 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.

Parameters: text The text used for the layout.

Returns: The layout that can be used for drawing text.

draw

public void draw()
Causes the entire widget to be redrawn.

drawArea

public void drawArea(Rectangle area)
Causes the specified area to be redrawn.

Parameters: area The area to be redrawn.

drawArea

public void drawArea(int x, int y, int width, int height)
Causes the specified area to be redrawn

Parameters: 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.

finish

public static void finish(DragContext context, boolean success, boolean delete)

Deprecated: Use {@link DragContext#finish(boolean, boolean, int)}

getAccessible

public AtkObject getAccessible()
Returns the accessible object associated with this widget.

Returns: The AtkObject.

getAllocation

public Allocation getAllocation()

getCanFocus

public boolean getCanFocus()
Find out the current value of the "can-focus" property

Since: 2.8.5

See Also: Widget

getColormap

public Colormap getColormap()
Returns the Colormap that will be used to render this widget.

Returns: 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.

Returns: A context that can be used for drawing text.

getData

public static void getData(Widget widget, DragContext context, Atom target)

Deprecated: Use {@link #getDragData(DragContext, Atom, int)}

getDisplay

public Display getDisplay()

getDragData

public void getDragData(DragContext context, Atom target, int time)

getEventListenerClass

public Class getEventListenerClass(String signal)

getEventType

public EventType getEventType(String signal)

getExtensionEvents

public ExtensionMode getExtensionEvents()
Retrieves the extension events the widget will receive.

Returns: extension events for this widget.

getModifierStyle

public RcStyle getModifierStyle()
Retruns the Widget's {@link RcStyle}.

Returns: The current RcStyle for the Widget.

getName

public String getName()
Returns the name for the widget.

Returns: The name for the widget.

getParent

public Widget getParent()
Returns the parent container for this widget

Returns: The parent container for this widget.

getParentWindow

public Window getParentWindow()
Returns the widget's parent window.

Returns: 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.

Returns: The location of the mouse or null

getRootWindow

public Window getRootWindow()
Get the root window where this widget is located. This function can only be called after the widget has been added to a widget heirarchy with Gtk {@link org.gnu.gtk.Window} at the top.

Returns: the Gdk Window backing the root of this particular Widget's hierarchy.

getScreen

public Screen getScreen()

getSensitive

public boolean getSensitive()
Gets the sensitivity of the widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can't interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits.

Returns: true if the widget is sensitive, false otherwise.

getStyle

public Style getStyle()
Returns the Widgets {@link Style}.

Returns: The current Style for the Widget.

getToplevel

public Widget getToplevel()
Returns the topmost widget in the container hierarchy.

Returns: The topmost widget.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.

getWidget

public static Widget getWidget(Handle handle)
Creates a new Widget with a handle to a native resource returned from a call to the native libraries. Should only be used internally by Java-Gnome.

Parameters: handle The handle that represents a pointer to a native resource.

getWindow

public Window getWindow()
Return the widget's Gdk window, if it has one. 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 occurred.

Returns: 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.

See Also: if you want to be sure of getting to a Gdk Window. for more about custom Widgets.

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.

hasFocus

public boolean hasFocus()
Determines if the widget has focus within its' TOPLEVEL.

Returns: 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)

Deprecated: Use {@link #highlight()}.

highlight

public void highlight()

intersect

public Rectangle intersect(Rectangle area)
Computes the intersection of the widget's area and area.

Parameters: area The area to use to compute the intersection.

Returns: 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.

Parameters: ancestor The possible parent widget

makeWidget

public static Widget makeWidget(Handle handle)
Create a Java-GNOME Widget subclass from an existing native GTK+ handle.

Parameters: handle The handle that represents a pointer to a native resource.

Throws: ClassNotFoundException if a Java-GNOME class cannot be found for the specified handle.

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.

Parameters: 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.

Parameters: 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.

removeAccelerator

public boolean removeAccelerator(AccelGroup group, int accelKey, ModifierType accelMods)

removeListener

public void removeListener(LifeCycleListener listener)
Unregister an object that was receiving life cycle event notification.

Parameters: listener The object that is to no longer receive life cycle events.

removeListener

public void removeListener(FocusListener listener)
Unregister an object that was receiving focus event notification.

Parameters: listener The object that is to no longer receive focus events.

removeListener

public void removeListener(ConfigureListener listener)
Unregister an object that was receiving configure event notification.

Parameters: listener The object that is to no longer receive configure events.

removeListener

public void removeListener(KeyListener listener)
Unregister an object that was receiving key event notification.

Parameters: listener The object that is to no longer receive key events.

removeListener

public void removeListener(MouseListener listener)
Unregister an object that was receiving mouse event notification.

Parameters: listener The object that is to no longer receive mouse events.

removeListener

public void removeListener(DragDestinationListener listener)

Deprecated: Use {@link #removeListener(DragTargetListener)} instead.

Unregister an object that was receiving dragDestination event notification.

Parameters: listener The object that is to no longer receive dragDestination events

removeListener

public void removeListener(DragTargetListener listener)

removeListener

public void removeListener(DragSourceListener listener)

Deprecated: Use {@link #removeListener(DragOriginListener)}

Unregister an object that was receiving drag source event notification.

Parameters: listener The object that is to no longer receive drag source events

removeListener

public void removeListener(DragOriginListener listener)

removeListener

public void removeListener(ExposeListener listener)
Unregister an object that was receiving expose event notification.

Parameters: listener The object that is to no longer receive expose events.

removeListener

public void removeListener(MouseMotionListener listener)
Unregister an object that was receiving mouse motion event notification.

Parameters: 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.

Parameters: 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.

Note that some widgets draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. {@link Label}. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in an {@link EventBox} widget and setting the background color on that

Parameters: 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 background color used along with the text color for widgets such as Entry, TextView, etc.

Parameters: state The widget state to modify. color The color to set.

setCanFocus

public void setCanFocus(boolean canFocus)
Tell this Widget whether or not it is allowed to accept focus. Telling a widget that it is not to accept focus generally means that it will be skipped over when TABing around a Window. This can, however, have some unexpected side effects: if a Label, for example, is told that it can't have focus but it also told that its text is {@link Label#setSelectable(boolean) selectable}, then you won't be able to Copy and Paste any text you select from it.

Parameters: canFocus

Since: 2.8.5

setColormap

public void setColormap(Colormap colormap)
Set the Colormap that will be used to render this widget.

Parameters: 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.

Parameters: 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

Parameters: flags

setDragIcon

public void setDragIcon(Widget widget, Colormap cmap, Pixmap pixmap, Bitmap mask)

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.

Parameters: buttons Buttons which can start the drag targets 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.

setEvents

public void setEvents(EventMask events)
Sets the event mask for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget's functionality, so be careful. This function must be called while a widget is unrealized. Consider addEvents() for widgets that are already realized, or if you want to preserve the existing event mask. This function can't be used with NO_WINDOW widgets; to get events on those widgets, place them inside an EventBox and receive events on the event box.

Parameters: events

setExtensionEvents

public void setExtensionEvents(ExtensionMode mode)
Sets the extension events mask to mode.

Parameters: mode extension events to receive.

setFont

public void setFont(FontDescription fontDesc)
Sets the font to use for the widget.

Parameters: 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.

Parameters: 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.

Parameters: 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. Names are also useful in accessibility contexts (ie, using ATK) to dig into a runnnig Window and extract a specific Widget (the concept is analoguous to id attributes in XML)

Parameters: 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 a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can't interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits.

Parameters: sensitive true to make the widget sensitive.

setTextColor

public void setTextColor(StateType state, Color color)
Sets the text color for a widget in a particular 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.

Note that some widgets draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. {@link Label}. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in an {@link EventBox} widget and setting the background color on that

Parameters: 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.

Parameters: 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)

Deprecated: Use {@link #unHighlight()}.

unHighlight

public void unHighlight()