Class Widget
public
class
Widget
extends
UIObject
implements
EventListener
// Superclass of
Composite
,
FileUpload
,
FocusWidget
,
Frame
,
Hidden
,
Hyperlink
,
Image
,
Label
,
MenuBar
,
Panel
,
Tree
The base class for the majority of user-interface objects. Widget adds
support for receiving events from the browser and being added directly to
panels.
Methods
getParent() | Gets this widget's parent panel. |
isAttached() | Determines whether this widget is currently attached to the browser's
document (i.e., there is an unbroken chain of widgets between this widget
and the underlying browser document). |
onAttach() | This method is called when a widget is attached to the browser's document. |
onBrowserEvent(Event) | Fired whenever a browser event is received. |
onDetach() | This method is called when a widget is detached from the browser's
document. |
onLoad() | This method is called when the widget becomes attached to the browser's
document. |
removeFromParent() | Removes this widget from its parent widget. |
Method Detail
getParent
Gets this widget's parent panel.
Return Value
the widget's parent panel
isAttached
public boolean isAttached()
Determines whether this widget is currently attached to the browser's
document (i.e., there is an unbroken chain of widgets between this widget
and the underlying browser document).
Return Value
true
if the widget is attached
onAttach
protected void onAttach()
This method is called when a widget is attached to the browser's document.
It must not be overridden, except by
Panel. To receive
notification when a widget is attached to the document, override the
onLoad method.
onBrowserEvent
public void
onBrowserEvent(
Event event)
Fired whenever a browser event is received.
Parameters
- event
- the event received
onDetach
protected void onDetach()
This method is called when a widget is detached from the browser's
document. It must not be overridden, except by
Panel.
onLoad
protected void onLoad()
This method is called when the widget becomes attached to the browser's
document.
removeFromParent
public void removeFromParent()
Removes this widget from its parent widget. If it has no parent, this
method does nothing.