Components: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[DHTML Widget Toolkit]] | {{Archive}}[[DHTML Widget Toolkit]] | ||
'''DwtControl''' | '''DwtControl''' | ||
Line 8: | Line 8: | ||
* Component lifecycle management within the UI framework | * Component lifecycle management within the UI framework | ||
* Dispatch of mouse and keyboard events to derived classes. By leveraging the DWT | * 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. | ||
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 | * 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 core DWT package. | ||
These APIs are built on top of the methods provided by the Dwt class that is part of the | |||
core DWT package. | |||
'''DwtComposite''' | '''DwtComposite''' | ||
Line 31: | Line 25: | ||
'''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 | ||
HTML element). It essentially provides an application’s top level graphical context and handles | HTML element). It essentially provides an application’s top level graphical context and handles | ||
Line 38: | Line 32: | ||
component that does not require another DWT component as its parent, thus one must always be | 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. | instantiated to provide the context under which other components may be instantiated. | ||
{{Article Footer|unknown|4/4/2006}} | |||
[[Category:Zimbra AjaxTk]] |
Latest revision as of 12:27, 24 March 2015
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.