Draws the widget. It is called by the parent widget when it is time for the widget to draw itself. The graphics object is set up so that all drawing is relative to the widget, i.e coordinate (0,0) is the top left corner of the widget. It is not possible to draw outside of a widget's dimension.

Called when a widget is given a chance to draw a frame around itself. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.

The size of the frame is calculated using the widget's frame size. If a widget has a frame size of 10 pixels than the area the drawFrame function can draw to will be the size of the widget with an additional extension of 10 pixels in each direction.

An example when drawFrame is a useful function is if a widget needs a glow around itself.

Gets the area of the widget occupied by the widget's children. By default this method returns an empty rectangle as not all widgets are containers. If you want to make a container this method should return the area where the children resides. This method is used when drawing children of a widget when computing clip rectangles for the children.

An example of a widget that overloads this method is ScrollArea. A ScrollArea has a view of its contant and that view is the children area. The size of a ScrollArea's children area might vary depending on if the scroll bars of the ScrollArea is shown or not.

Gets the size of the widget's frame. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.

A frame size of 0 means that the widget has no frame. The default frame size is 0.

Checks if tab in is enabled. Tab in means that you can set focus to this widget by pressing the tab button. If tab in is disabled then the focus handler will skip this widget and focus the next in its focus order.

Checks if tab out is enabled. Tab out means that you can lose focus to this widget by pressing the tab button. If tab out is disabled then the FocusHandler ignores tabbing and focus will stay with this widget.

Requests modal mouse input focus. When a widget has modal input focus that widget will be the only widget receiving input even if the input occurs outside of the widget and no matter what the input is.

Sets the size of the widget's frame. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.

A frame size of 0 means that the widget has no frame. The default frame size is 0.

Sets an id of a widget. An id can be useful if a widget needs to be identified in a container. For example, if widgets are created by an XML document, a certain widget can be retrieved given that the widget has an id.

Sets tab in enabled, or not. Tab in means that you can set focus to this widget by pressing the tab button. If tab in is disabled then the FocusHandler will skip this widget and focus the next in its focus order.

Sets tab out enabled. Tab out means that you can lose focus to this widget by pressing the tab button. If tab out is disabled then the FocusHandler ignores tabbing and focus will stay with this widget.

Shows a certain part of a widget in the widget's parent. Used when widgets want a specific part to be visible in its parent. An example is a TextArea that wants a specific part of its text to be visible when a TextArea is a child of a ScrollArea.