Components: Difference between revisions

No edit summary
 
No edit summary
Line 2: Line 2:


'''DwtControl'''
'''DwtControl'''
DwtControl is the root of the component hierarchy. All components are directly or indirectly
DwtControl is the root of the component hierarchy. All components are directly or indirectly
derived from it. DwtControl provides the following key capabilities:
derived from it. DwtControl provides the following key capabilities:
 Component lifecycle management within the UI framework
 
 Dispatch of mouse and keyboard events to derived classes. By leveraging the DWT
* Component lifecycle management within the UI framework
 
* Dispatch of mouse and keyboard events to derived classes. By leveraging the DWT
event framework, DwtControl provides a canonical publish/subscribe event model that fits
event framework, DwtControl provides a canonical publish/subscribe event model that fits
in with the AjaxTK event model, thus eliminating the impedance mismatch between the
in with the AjaxTK event model, thus eliminating the impedance mismatch between the
different browser event models.
different browser event models.
 A framework for drag-and-drop operations. Specifically, DwtControl minimizes the work
 
* A framework for drag-and-drop operations. Specifically, DwtControl minimizes the work
that subclasses have to perform in order to support drag-and-drop operations.
that subclasses have to perform in order to support drag-and-drop operations.
 Supports APIs for setting bounds, cursor, visibility, z-index layering, tool tips, and more.
 
* Supports APIs for setting bounds, cursor, visibility, z-index layering, tool tips, and more.
These APIs are built on top of the methods provided by the Dwt class that is part of the
These APIs are built on top of the methods provided by the Dwt class that is part of the
core DWT package.
core DWT package.


'''DwtComposite'''
'''DwtComposite'''
If a component is not a container (for example a button widget), then it directly extends
If a component is not a container (for example a button widget), then it directly extends
DwtControl; however, if it is a container (for example a menu contains menu items), then it will
DwtControl; however, if it is a container (for example a menu contains menu items), then it will
Line 24: Line 30:


'''DwtShell'''
'''DwtShell'''
When instantiated, DwtShell will occupy the whole window of the current browser (in the next
When instantiated, DwtShell will occupy the whole window of the current browser (in the next
version of the toolkit DwtShell will be able to be instantiated in the context of an iframe or other
version of the toolkit DwtShell will be able to be instantiated in the context of an iframe or other

Revision as of 18:00, 4 April 2006

DHTML Widget Toolkit

DwtControl

DwtControl is the root of the component hierarchy. All components are directly or indirectly derived from it. DwtControl provides the following key capabilities:

  • Component lifecycle management within the UI framework
  • Dispatch of mouse and keyboard events to derived classes. By leveraging the DWT

event framework, DwtControl provides a canonical publish/subscribe event model that fits in with the AjaxTK event model, thus eliminating the impedance mismatch between the different browser event models.

  • A framework for drag-and-drop operations. Specifically, DwtControl minimizes the work

that subclasses have to perform in order to support drag-and-drop operations.

  • Supports APIs for setting bounds, cursor, visibility, z-index layering, tool tips, and more.

These APIs are built on top of the methods provided by the Dwt class that is part of the core DWT package.

DwtComposite

If a component is not a container (for example a button widget), then it directly extends DwtControl; however, if it is a container (for example a menu contains menu items), then it will derive from DwtComposite. This class provides a framework and methods for managing child components (a DwtTree widget may have an arbitrary number of DwtTreeItems). Examples of methods provided by DwtComposite are: getChildren, getNumChildren, and removeChildren.

DwtShell

When instantiated, DwtShell will occupy the whole window of the current browser (in the next version of the toolkit DwtShell will be able to be instantiated in the context of an iframe or other HTML element). It essentially provides an application’s top level graphical context and handles such tasks as browser window resizing, blocking the browser context menu as appropriate, providing overlays for blocking user input, and keyboard event dispatching. DwtShell is the only component that does not require another DWT component as its parent, thus one must always be instantiated to provide the context under which other components may be instantiated.

Jump to: navigation, search