https://wiki.zimbra.com/api.php?action=feedcontributions&user=IamPersistent&feedformat=atomZimbra :: Tech Center - User contributions [en]2024-03-19T09:03:46ZUser contributionsMediaWiki 1.39.0https://wiki.zimbra.com/index.php?title=DwtButton&diff=2047DwtButton2006-04-24T21:12:30Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
=== <code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code> ===<br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
=== <code>addSelectionListener(listener)</code> ===<br />
<br />
=== <code>removeSelectionListener(listener)</code> ===<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
=== <code>removeSelectionListeners()</code> ===<br />
Removes all the selection listeners.<br />
<br />
<br />
=== <code>addDropDownSelectionListener(listener)</code> ===<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
=== <code>removeDropDownSelectionListener(listener)</code> ===<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
=== <code>setDropDownImages(enabledImg, disImg, hovImg, depImg)</code> ===<br />
<br />
<br />
=== <code>setEnabled(enabled)</code> ===<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
=== <code>setHoverImage(hoverImageInfo)</code> ===<br />
;<code>hoverImageInfo</code> :<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
=== <code>setEnabledImage(imageInfo)</code> ===<br />
;<code>imageInfo</code> : <br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=2046DwtButton2006-04-24T21:06:14Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
=== <code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code> ===<br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
=== <code>addSelectionListener(listener)</code> ===<br />
<br />
removeSelectionListener(listener)<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
removeSelectionListeners()<br />
Removes all the selection listeners.<br />
<br />
<br />
addDropDownSelectionListener(listener)<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
removeDropDownSelectionListener(listener)<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
setDropDownImages(enabledImg, disImg, hovImg, depImg)<br />
<br />
<br />
setEnabled(enabled)<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
=== <code>setHoverImage(hoverImageInfo)</code> ===<br />
;<code>hoverImageInfo</code> :<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
=== <code>setEnabledImage(imageInfo)</code> ===<br />
;<code>imageInfo</code> : <br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=2045DwtButton2006-04-24T21:05:15Z<p>IamPersistent: /* = */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
=== <code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code> ===<br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener(listener)<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
removeSelectionListeners()<br />
Removes all the selection listeners.<br />
<br />
<br />
addDropDownSelectionListener(listener)<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
removeDropDownSelectionListener(listener)<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
setDropDownImages(enabledImg, disImg, hovImg, depImg)<br />
<br />
<br />
setEnabled(enabled)<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
=== <code>setHoverImage(hoverImageInfo)</code> ===<br />
;<code>hoverImageInfo</code> :<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
=== <code>setEnabledImage(imageInfo)</code> ===<br />
;<code>imageInfo</code> : <br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=2044DwtButton2006-04-24T21:04:02Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
=== <code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code> ===<br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener(listener)<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
removeSelectionListeners()<br />
Removes all the selection listeners.<br />
<br />
<br />
addDropDownSelectionListener(listener)<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
removeDropDownSelectionListener(listener)<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
setDropDownImages(enabledImg, disImg, hovImg, depImg)<br />
<br />
<br />
setEnabled(enabled)<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
=== <code>setHoverImage(hoverImageInfo)</code> ---<br />
;<code>hoverImageInfo</code> :<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
=== <code>setEnabledImage(imageInfo)</code> ===<br />
;<code>imageInfo</code> : <br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=2043DwtButton2006-04-24T21:02:41Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
<code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code><br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener(listener)<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
removeSelectionListeners()<br />
Removes all the selection listeners.<br />
<br />
<br />
addDropDownSelectionListener(listener)<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
removeDropDownSelectionListener(listener)<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
setDropDownImages(enabledImg, disImg, hovImg, depImg)<br />
<br />
<br />
setEnabled(enabled)<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
setHoverImage(hoverImageInfo)<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
<code>setEnabledImage(imageInfo)</code><br />
;<code>imageInfo</code> : <br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=2042DwtButton2006-04-24T21:00:13Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
<code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code><br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener(listener)<br />
Removes a selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
removeSelectionListeners()<br />
Removes all the selection listeners.<br />
<br />
<br />
addDropDownSelectionListener(listener)<br />
Adds a listener to be notified when the dropdown arrow is pressed.<br />
;<code>listener</code> : a listener<br />
<br />
removeDropDownSelectionListener(listener)<br />
Removes a dropdown selection listener.<br />
;<code>listener</code> : the listener to remove<br />
<br />
setDropDownImages(enabledImg, disImg, hovImg, depImg)<br />
<br />
<br />
DwtButton.prototype.setEnabled(enabled)<br />
Sets the enabled/disabled state of the button. A disabled button may have a different image, and greyed out text. The button (and its menu) will only have listeners if it is enabled.<br />
;<code>enabled</code> : whether to enable the button<br />
<br />
setHoverImage(hoverImageInfo)<br />
<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon<br />
<br />
<br />
getMenu()<br />
Returns the button's menu<br />
<br />
resetClassName()<br />
Returns the button display to normal (not activated or triggered).<br />
<br />
setActionTiming(actionTiming)<br />
Sets whether actions for this button should occur on mouse up or mouse down.<br />
;<code>actionTiming</code> : Currently supports DwtButton.ACTION_MOUSEDOWN and DwtButton.ACTION_MOUSEUP<br />
<br />
setActivated(activated)<br />
Activates/inactivates the button. A button is activated when the mouse is over it.<br />
;<code>activated</code> : whether the button is activated<br />
<br />
setEnabledImage<br />
<br />
setDepressedImage(imageInfo)<br />
<br />
setToggled(toggled)<br />
<br />
isToggled()<br />
<br />
popup()<br />
<br />
<br />
trigger()<br />
deactivate()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Mixing_Widgets_into_an_HTML_Page&diff=2001Mixing Widgets into an HTML Page2006-04-20T01:47:58Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
<br />
== HTML ==<br />
<pre><nowiki><br />
<h1>Menu Test</h1><br />
<br />
<div id="menu_bar"><br />
& nbsp;<br />
</div> <!-- menu_bar --><br />
<br />
</nowiki></pre><br />
<br />
<br />
== Set up the Shell ==<br />
<br />
Must set to virtual<br />
<br />
<code><br />
var shell = new DwtShell("MainShell", true, null, null, true);<br />
shell.setVirtual();<br />
</code><br />
<br />
== Putting a Widget in a <code> <nowiki><div></nowiki> </code> ==<br />
To put a Dwt widget in a <code> <nowiki><div></nowiki> </code>, you need to get the document element of the <code> <nowiki><div></nowiki> </code>, clear the contents and then reparent the Dwt widget in the element. Here is an example of how to do that.<br />
<br />
<pre><br />
// create a toolbar<br />
var toolbar = new DwtToolBar(parent, "mainMenu", DwtControl.ABSOLUTE_STYLE, 2);<br />
<br />
/*<br />
... Here we would have the code to add buttons to the toolbar <br />
*/<br />
<br />
// Get the div into which we want to place the toolbar<br />
var div = document.getElementById("menu_bar");<br />
<br />
// Clean out any content<br />
div.innerHTML = "";<br />
<br />
// Reparent the toolbar's HTML element to the div<br />
toolbar.reparentHtmlElement(div);<br />
</pre></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Mixing_Widgets_into_an_HTML_Page&diff=2000Mixing Widgets into an HTML Page2006-04-20T01:47:25Z<p>IamPersistent: </p>
<hr />
<div>== HTML ==<br />
<pre><nowiki><br />
<h1>Menu Test</h1><br />
<br />
<div id="menu_bar"><br />
& nbsp;<br />
</div> <!-- menu_bar --><br />
<br />
</nowiki></pre><br />
<br />
<br />
== Set up the Shell ==<br />
<br />
Must set to virtual<br />
<br />
<code><br />
var shell = new DwtShell("MainShell", true, null, null, true);<br />
shell.setVirtual();<br />
</code><br />
<br />
== Putting a Widget in a <code> <nowiki><div></nowiki> </code> ==<br />
To put a Dwt widget in a <code> <nowiki><div></nowiki> </code>, you need to get the document element of the <code> <nowiki><div></nowiki> </code>, clear the contents and then reparent the Dwt widget in the element. Here is an example of how to do that.<br />
<br />
<pre><br />
// create a toolbar<br />
var toolbar = new DwtToolBar(parent, "mainMenu", DwtControl.ABSOLUTE_STYLE, 2);<br />
<br />
/*<br />
... Here we would have the code to add buttons to the toolbar <br />
*/<br />
<br />
// Get the div into which we want to place the toolbar<br />
var div = document.getElementById("menu_bar");<br />
<br />
// Clean out any content<br />
div.innerHTML = "";<br />
<br />
// Reparent the toolbar's HTML element to the div<br />
toolbar.reparentHtmlElement(div);<br />
</pre></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1999Widgets2006-04-20T01:28:17Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
<br />
[[Creating a Menu Bar]]<br />
<br />
[[Mixing Widgets into an HTML Page]]<br />
<br />
== Widgets ==<br />
<br />
[[DwtButton]]<br />
<br />
[[DwtCalendar]]<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
[[DwtToolBar]]<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenuItem&diff=1967DwtMenuItem2006-04-18T16:12:31Z<p>IamPersistent: </p>
<hr />
<div>Parent must be a DwtMenu object<br />
<br />
== Methods ==<br />
<br />
<code>DwtMenuItem(parent, style, radioGroupId, index, className, posStyle)</code><br />
;<code>parent</code> : the parent widget, must be a <code>DwtMenu</code> object<br />
* style menu item's style<br />
* radioGroupId radio group that the menu item is part of<br />
* index position in menu<br />
* className a CSS class<br />
* posStyle positioning style<br />
<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener()<br />
<br />
getChecked()<br />
<br />
setChecked(checked, skipNotify)<br />
<br />
setEnabled(enabled)<br />
<br />
getDisabledImage()<br />
<br />
setDisabledImage(imageInfo)<br />
<br />
getImage()<br />
<br />
setImage(imageInfo)<br />
<br />
getMenu()<br />
<br />
<br />
<code>setMenu(menuOrCallback)</code><br />
<br />
Adds a sub-menu to this menu item.<br />
<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
<br />
setSize(width, height)<br />
<br />
getText()<br />
<br />
setText(text)<br />
<br />
setSelectedStyle()<br />
<br />
setTriggeredStyle()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenuItem&diff=1966DwtMenuItem2006-04-18T16:12:16Z<p>IamPersistent: </p>
<hr />
<div>Parent must be a DwtMenu object<br />
<br />
== Methods ==<br />
<br />
<code>DwtMenuItem(parent, style, radioGroupId, index, className, posStyle)</coce><br />
;<code>parent</code> : the parent widget, must be a <code>DwtMenu</code> object<br />
* style menu item's style<br />
* radioGroupId radio group that the menu item is part of<br />
* index position in menu<br />
* className a CSS class<br />
* posStyle positioning style<br />
<br />
<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener()<br />
<br />
getChecked()<br />
<br />
setChecked(checked, skipNotify)<br />
<br />
setEnabled(enabled)<br />
<br />
getDisabledImage()<br />
<br />
setDisabledImage(imageInfo)<br />
<br />
getImage()<br />
<br />
setImage(imageInfo)<br />
<br />
getMenu()<br />
<br />
<br />
<code>setMenu(menuOrCallback)</code><br />
<br />
Adds a sub-menu to this menu item.<br />
<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
<br />
setSize(width, height)<br />
<br />
getText()<br />
<br />
setText(text)<br />
<br />
setSelectedStyle()<br />
<br />
setTriggeredStyle()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenu&diff=1965DwtMenu2006-04-18T15:41:22Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
== Methods ==<br />
<br />
DwtMenu(parent, style, className, posStyle, dialog)<br />
* parent the parent widget<br />
* style menu's style<br />
* className a CSS class<br />
* posStyle positioning style<br />
* dialog Dialog that this menu is a part of (if any)<br />
<br />
style<br />
* DwtMenu.BAR_STYLE - Traditional menu bar.<br />
* DwtMenu.POPUP_STYLE - Popup menu<br />
* DwtMenu.DROPDOWN_STYLE - Used when a menu is a drop down (e.g. parent is a button or another menu item);<br />
* DwtMenu.COLOR_PICKER_STYLE - Menu is hosting a single color picker;<br />
* DwtMenu.CALENDAR_PICKER_STYLE - Menu is hostng a single calendar;</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenuItem&diff=1961DwtMenuItem2006-04-16T11:51:30Z<p>IamPersistent: </p>
<hr />
<div><br />
== Methods ==<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener()<br />
<br />
getChecked()<br />
<br />
setChecked(checked, skipNotify)<br />
<br />
setEnabled(enabled)<br />
<br />
getDisabledImage()<br />
<br />
setDisabledImage(imageInfo)<br />
<br />
getImage()<br />
<br />
setImage(imageInfo)<br />
<br />
getMenu()<br />
<br />
<br />
<code>setMenu(menuOrCallback)</code><br />
<br />
Adds a sub-menu to this menu item.<br />
<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
<br />
setSize(width, height)<br />
<br />
getText()<br />
<br />
setText(text)<br />
<br />
setSelectedStyle()<br />
<br />
setTriggeredStyle()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenuItem&diff=1960DwtMenuItem2006-04-16T11:50:50Z<p>IamPersistent: </p>
<hr />
<div><br />
<br />
<br />
== Methods ==<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener()<br />
<br />
getChecked()<br />
<br />
setChecked(checked, skipNotify)<br />
<br />
setEnabled(enabled)<br />
<br />
getDisabledImage()<br />
<br />
setDisabledImage(imageInfo)<br />
<br />
getImage()<br />
<br />
setImage(imageInfo)<br />
<br />
getMenu()<br />
<br />
<br />
<code> ===setMenu(menuOrCallback)=== </code><br />
Adds a sub-menu to this menu item.<br />
<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
<br />
setSize(width, height)<br />
<br />
getText()<br />
<br />
setText(text)<br />
<br />
setSelectedStyle()<br />
<br />
setTriggeredStyle()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenuItem&diff=1959DwtMenuItem2006-04-16T11:38:54Z<p>IamPersistent: </p>
<hr />
<div><br />
<br />
== Methods ==<br />
addSelectionListener(listener)<br />
<br />
removeSelectionListener()<br />
<br />
getChecked()<br />
<br />
setChecked(checked, skipNotify)<br />
<br />
setEnabled(enabled)<br />
<br />
getDisabledImage()<br />
<br />
setDisabledImage(imageInfo)<br />
<br />
getImage()<br />
<br />
setImage(imageInfo)<br />
<br />
getMenu()<br />
<br />
<code>setMenu(menuOrCallback)</code><br />
Adds a sub-menu to this menu item.<br />
<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
<br />
setSize(width, height)<br />
<br />
getText()<br />
<br />
setText(text)<br />
<br />
setSelectedStyle()<br />
<br />
setTriggeredStyle()</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1952DwtButton2006-04-15T21:24:02Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
<code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code><br />
<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1951DwtButton2006-04-15T21:23:46Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
<code>setMenu(menuOrCallback, shouldToggle, followIconStyle)</code><br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> : The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code> : <br />
;<code>followIconStyle</code> : style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1950DwtButton2006-04-15T21:22:43Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
==Methods==<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
;<code>menuOrCallback</code> The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
;<code>shouldToggle</code><br />
;<code>followIconStyle</code> style of menu item (should be checked or radio style) for which the button icon should reflect the menu item icon</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1949DwtButton2006-04-15T21:21:14Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
Methods<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
* menuOrCallback The dropdown menu or an AjxCallback object. If a callback is given, it is called the first time the menu is requested. The callback must return a valid DwtMenu object.<br />
* shouldToggle<br />
* followIconStyle style of menu item (should be checked or radio style) for<br />
which the button icon should reflect the menu item icon</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1948DwtButton2006-04-15T21:20:17Z<p>IamPersistent: </p>
<hr />
<div><br />
[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
Methods<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
* menuOrCallback The dropdown menu or an AjxCallback object. If a<br />
callback is given, it is called the first time the<br />
menu is requested. The callback must return a valid <br />
DwtMenu object.<br />
* shouldToggle<br />
* followIconStyle style of menu item (should be checked or radio style) for<br />
which the button icon should reflect the menu item icon</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtButton&diff=1947DwtButton2006-04-15T21:19:12Z<p>IamPersistent: </p>
<hr />
<div><br />
Methods<br />
setMenu(menuOrCallback, shouldToggle, followIconStyle)<br />
Adds a dropdown menu to the button, available through a small down-arrow.<br />
* @param menuOrCallback The dropdown menu or an AjxCallback object. If a<br />
callback is given, it is called the first time the<br />
menu is requested. The callback must return a valid <br />
DwtMenu object.<br />
* @param shouldToggle<br />
* @param followIconStyle style of menu item (should be checked or radio style) for<br />
* which the button icon should reflect the menu item icon<br />
*/<br />
DwtButton.prototype.setMenu =<br />
function(menuOrCallback, shouldToggle, followIconStyle)</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1946Widgets2006-04-15T21:14:49Z<p>IamPersistent: /* Widgets */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
<br />
[[Creating a Menu Bar]]<br />
<br />
== Widgets ==<br />
<br />
[[DwtButton]]<br />
<br />
[[DwtCalendar]]<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
[[DwtToolBar]]<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenu&diff=1945DwtMenu2006-04-15T21:07:24Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
* DwtMenu.BAR_STYLE - Traditional menu bar.<br />
* DwtMenu.POPUP_STYLE - Popup menu<br />
* DwtMenu.DROPDOWN_STYLE - Used when a menu is a drop down (e.g. parent is a button or another menu item);<br />
* DwtMenu.COLOR_PICKER_STYLE - Menu is hosting a single color picker;<br />
* DwtMenu.CALENDAR_PICKER_STYLE - Menu is hostng a single calendar;</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtToolBar&diff=1944DwtToolBar2006-04-15T21:06:07Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
Methods<br />
<code>getItem(index)</code><br />
<br />
<code>getItemCount()</code><br />
<br />
<code>getItems()</code><br />
<br />
<code>addSpacer(size, index)</code><br />
<br />
<code>addSeparator(className, index)</code><br />
<br />
<code>addFiller(className, index)</code><br />
<br />
<code>addChild(child, index)</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1943Widgets2006-04-15T21:03:42Z<p>IamPersistent: /* Widgets */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
<br />
[[Creating a Menu Bar]]<br />
<br />
== Widgets ==<br />
<br />
DwtButton<br />
<br />
DwtCalendar<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
[[DwtToolBar]]<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Creating_a_Menu_Bar&diff=1942Creating a Menu Bar2006-04-15T15:16:24Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
<br />
<br />
An overview on how to create a menu bar<br />
<br />
* Create toolbar<br />
<br />
* Add buttons<br />
<br />
* Add menu items to buttons</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Creating_a_Menu_Bar&diff=1941Creating a Menu Bar2006-04-15T15:16:03Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
<br />
<br />
An overview on how to create a menu bar<br />
<br />
Create toolbar<br />
Add buttons<br />
Add menu items to buttons</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Creating_a_Menu_Bar&diff=1940Creating a Menu Bar2006-04-15T15:15:23Z<p>IamPersistent: </p>
<hr />
<div>An overview on how to create a menu bar<br />
<br />
Create toolbar<br />
Add buttons<br />
Add menu items to buttons</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1939Widgets2006-04-15T15:14:04Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
<br />
[[Creating a Menu Bar]]<br />
<br />
== Widgets ==<br />
<br />
DwtButton<br />
<br />
DwtCalendar<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
DwtToolBar<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1938Widgets2006-04-15T15:13:48Z<p>IamPersistent: /* Overview */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
[[Creating a Menu Bar]]<br />
<br />
== Widgets ==<br />
<br />
DwtButton<br />
<br />
DwtCalendar<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
DwtToolBar<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1937DwtColorPicker2006-04-15T14:24:44Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a <code>DwtShell</code> or <code>DwtMenu</code><br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
Generates <code>DwtSelectionEvent()</code> on seletion. The hex RGB of the color seleted is found in the <code>detail</code> variable.<br />
<br />
<code>var colorCode = event.detail;</code><br />
<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1936DwtColorPicker2006-04-15T14:24:07Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a <code>DwtShell</code>, <code>DwtMenu</code>, <code>DwtButton</code><br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
Generates <code>DwtSelectionEvent()</code> on seletion. The hex RGB of the color seleted is found in the <code>detail</code> variable.<br />
<br />
<code>var colorCode = event.detail;</code><br />
<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1935DwtColorPicker2006-04-15T14:14:59Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a <code>DwtShell</code> or a <code>DwtMenu</code><br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
Generates <code>DwtSelectionEvent()</code> on seletion. The hex RGB of the color seleted is found in the <code>detail</code> variable.<br />
<br />
<code>var colorCode = event.detail;</code><br />
<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtMenu&diff=1892DwtMenu2006-04-08T20:26:32Z<p>IamPersistent: </p>
<hr />
<div>* DwtMenu.BAR_STYLE - Traditional menu bar.<br />
* DwtMenu.POPUP_STYLE - Popup menu<br />
* DwtMenu.DROPDOWN_STYLE - Used when a menu is a drop down (e.g. parent is a button or another menu item);<br />
* DwtMenu.COLOR_PICKER_STYLE - Menu is hosting a single color picker;<br />
* DwtMenu.CALENDAR_PICKER_STYLE - Menu is hostng a single calendar;</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Widgets&diff=1891Widgets2006-04-08T20:18:52Z<p>IamPersistent: /* Widgets */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
== Overview ==<br />
There are a number of out of the box widgets provided with DWT. These are reusabel components to accomplish a number of DHTML tasks.<br />
<br />
[[Using a Widget]]<br />
<br />
== Widgets ==<br />
<br />
DwtButton<br />
<br />
DwtCalendar<br />
<br />
[[DwtColorPicker]]<br />
<br />
DwtDialog<br />
<br />
DwtHtmlEditor<br />
<br />
DwtLabel<br />
<br />
DwtListView<br />
<br />
[[DwtMenu]]<br />
<br />
[[DwtMenuItem]]<br />
<br />
DwtMessageDialog<br />
<br />
DwtPropertyPage<br />
<br />
DwtSash<br />
<br />
DwtSelect<br />
<br />
DwtTabView<br />
<br />
DwtTabViewPage<br />
<br />
DwtText<br />
<br />
DwtToolBar<br />
<br />
DwtToolTip<br />
<br />
DwtTree<br />
<br />
DwtTreeItem<br />
<br />
DwtWizardDialog<br />
<br />
DwtWizardPage<br />
<br />
DwtWizProgressBar<br />
<br />
DwtStepLabel</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DHTML_Widget_Toolkit&diff=1866DHTML Widget Toolkit2006-04-05T07:38:45Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]<br />
----<br />
<br />
==Overview==<br />
<br />
DWT is a JavaScript-based UI Toolkit that is modeled after traditional UI toolkit paradigms such<br />
as Java AWT/Swing and SWT. It provides for and supports a number of the same components<br />
that UI developers are familiar with when developing traditional UI applications, such as buttons<br />
and menus.<br />
<br />
==Components==<br />
[[Components]]<br />
<br />
[[Widgets]]<br />
<br />
[[Events]]</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1865DwtColorPicker2006-04-05T07:38:29Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
Generates <code>DwtSelectionEvent()</code> on seletion. The hex RGB of the color seleted is found in the <code>detail</code> variable.<br />
<br />
<code>var colorCode = event.detail;</code><br />
<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1864DwtColorPicker2006-04-05T07:37:54Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
Generates <code>DwtSelectionEvent()</code>. The hex RGB of the color seleted is found in the <code>detail</code> variable.<br />
<br />
<code>var colorCode = event.detail;</code><br />
<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtSelectionEvent&diff=1863DwtSelectionEvent2006-04-05T07:31:43Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Events]]<br />
<br />
----<br />
<br />
== Overview ==<br />
A selection event generally occurs when an item (or in certain<br />
cases multiple items) are “selected”. The semantics of selection can be different things in<br />
different contexts. For example, in the case of DwtButton, selection represents the<br />
pressing and releasing of the mouse action button (generally the left button). In the case<br />
of a list item it represents the selection, or multiple selection, of an item(s) in the list.<br />
<br />
== Methods and Variables ==<br />
'''Methods'''<br />
<br />
'''Variables'''<br />
;<code>detail</code> :<br />
<br />
== Widgets Generating DwtSelectionEvent ==<br />
<br />
[[DwtColorPicker]]</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtSelectionEvent&diff=1862DwtSelectionEvent2006-04-05T07:30:46Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Events]]<br />
<br />
----<br />
<br />
== Overview ==<br />
A selection event generally occurs when an item (or in certain<br />
cases multiple items) are “selected”. The semantics of selection can be different things in<br />
different contexts. For example, in the case of DwtButton, selection represents the<br />
pressing and releasing of the mouse action button (generally the left button). In the case<br />
of a list item it represents the selection, or multiple selection, of an item(s) in the list.<br />
<br />
== Methods and Variables ==<br />
;<code>detail</code> :<br />
<br />
== Widgets Generating DwtSelectionEvent ==<br />
<br />
[[DwtColorPicker]]</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtSelectionEvent&diff=1861DwtSelectionEvent2006-04-05T07:30:32Z<p>IamPersistent: /* Methods and Variables */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Events]]<br />
<br />
----<br />
<br />
== Overview ==<br />
A selection event generally occurs when an item (or in certain<br />
cases multiple items) are “selected”. The semantics of selection can be different things in<br />
different contexts. For example, in the case of DwtButton, selection represents the<br />
pressing and releasing of the mouse action button (generally the left button). In the case<br />
of a list item it represents the selection, or multiple selection, of an item(s) in the list.<br />
<br />
== Methods and Variables ==<br />
;<code>detail<code> :<br />
<br />
== Widgets Generating DwtSelectionEvent ==<br />
<br />
[[DwtColorPicker]]</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtSelectionEvent&diff=1860DwtSelectionEvent2006-04-05T07:29:59Z<p>IamPersistent: /* Overview */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Events]]<br />
<br />
----<br />
<br />
== Overview ==<br />
A selection event generally occurs when an item (or in certain<br />
cases multiple items) are “selected”. The semantics of selection can be different things in<br />
different contexts. For example, in the case of DwtButton, selection represents the<br />
pressing and releasing of the mouse action button (generally the left button). In the case<br />
of a list item it represents the selection, or multiple selection, of an item(s) in the list.<br />
<br />
== Methods and Variables ==<br />
details<br />
<br />
== Widgets Generating DwtSelectionEvent ==<br />
<br />
[[DwtColorPicker]]</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtSelectionEvent&diff=1859DwtSelectionEvent2006-04-05T07:26:59Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Events]]<br />
<br />
----<br />
<br />
== Overview ==<br />
A selection event generally occurs when an item (or in certain<br />
cases multiple items) are “selected”. The semantics of selection can be different things in<br />
different contexts. For example, in the case of DwtButton, selection represents the<br />
pressing and releasing of the mouse action button (generally the left button). In the case<br />
of a list item it represents the selection, or multiple selection, of an item(s) in the list.</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Events&diff=1858Events2006-04-05T07:25:55Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
<br />
---<br />
<br />
== Overview ==<br />
<br />
The DWT event model extends the AjaxTK event model. DWT events should not be confused<br />
with the events generated by the browser (e.g. mouse, keyboard, and resize events). While these<br />
events are trapped by DWT and mapped to a canonical form, they are just a subset of the events<br />
that the toolkit generates. With the exception of DwtMouseEventCapture, the rest of the classes<br />
in the DWT events package are the different event classes exposed by the toolkit. We will discuss<br />
DwtMouseEventCapture before introducing the event classes.<br />
<br />
<br />
== Events ==<br />
<br />
DwtControlEvent<br />
<br />
DwtDateRangeEvent<br />
<br />
DwtDisposeEvent<br />
<br />
DwtEvent<br />
<br />
DwtHtmlEditorStateEvent<br />
<br />
DwtKeyEvent<br />
<br />
DwtListViewActionEvent<br />
<br />
DwtMouseEvent<br />
<br />
[[DwtSelectionEvent]]<br />
<br />
DwtTreeEvent<br />
<br />
DwtUiEvent</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=Events&diff=1857Events2006-04-05T07:25:34Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]<br />
---<br />
<br />
== Overview ==<br />
<br />
The DWT event model extends the AjaxTK event model. DWT events should not be confused<br />
with the events generated by the browser (e.g. mouse, keyboard, and resize events). While these<br />
events are trapped by DWT and mapped to a canonical form, they are just a subset of the events<br />
that the toolkit generates. With the exception of DwtMouseEventCapture, the rest of the classes<br />
in the DWT events package are the different event classes exposed by the toolkit. We will discuss<br />
DwtMouseEventCapture before introducing the event classes.<br />
<br />
<br />
== Events ==<br />
<br />
DwtControlEvent<br />
<br />
DwtDateRangeEvent<br />
<br />
DwtDisposeEvent<br />
<br />
DwtEvent<br />
<br />
DwtHtmlEditorStateEvent<br />
<br />
DwtKeyEvent<br />
<br />
DwtListViewActionEvent<br />
<br />
DwtMouseEvent<br />
<br />
[[DwtSelectionEvent]]<br />
<br />
DwtTreeEvent<br />
<br />
DwtUiEvent</div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1856DwtColorPicker2006-04-05T07:16:44Z<p>IamPersistent: /* Example */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br><br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br><br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br><br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br><br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br><br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br><br />
// Clean out any content<br />
div.innerHTML = "";<br><br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1855DwtColorPicker2006-04-05T07:15:30Z<p>IamPersistent: /* Example */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br />
// Clean out any content<br />
div.innerHTML = "";<br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event) {<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1854DwtColorPicker2006-04-05T07:14:26Z<p>IamPersistent: /* Example */</p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br />
<br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br />
<br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br />
<br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br />
<br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br />
<br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br />
<br />
// Clean out any content<br />
div.innerHTML = "";<br />
<br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event)<br />
{<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1853DwtColorPicker2006-04-05T07:13:59Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function launch() {<br />
var DBG = new AjxDebug(AjxDebug.NONE, null, false);<br />
<br />
/* We always have to create a DwtShell as the root of our component<br />
* hierarchy and does some handy things for us.<br />
*/<br />
var shell = new DwtShell("MainShell", false, null, null, true);<br />
<br />
/* Setting the shell to be virtual tells it that it should remain hidden.<br />
* Direct children of the shell will actually have their HTML elements<br />
* reparented to the body element. This is handy when we want to mix<br />
* components in with existing HTML content<br />
*/ <br />
shell.setVirtual();<br />
<br />
/* <br />
* Now we will create a listener to handle the selection and the picker widget<br />
*/<br />
var listener = new AjxListener(null, colorListener);<br />
var colorPicker = new DwtColorPicker(shell);<br />
<br />
// add the listener to the widget<br />
colorPicker.addSelectionListener(listener);<br />
<br />
// Get the div into which we want to place the picker<br />
var div = document.getElementById('primary_color_picker');<br />
<br />
// Clean out any content<br />
div.innerHTML = "";<br />
<br />
// Reparent the picker's HTML element to the div<br />
colorPicker.reparentHtmlElement(div);<br />
}<br />
<br />
function colorListener(event)<br />
{<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
<br />
// Make it happen<br />
AjxCore.addOnloadListener(launch);<br />
<br />
</code></div>IamPersistenthttps://wiki.zimbra.com/index.php?title=DwtColorPicker&diff=1852DwtColorPicker2006-04-05T07:08:24Z<p>IamPersistent: </p>
<hr />
<div>[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]<br />
----<br />
<br />
<code>DwtColorPicker(parent, className, posStyle)</code><br />
;<code>parent</code> : the widget parent, can be a DwtShell (or a DwtMenu????)<br />
;<code>className</code> : the name of a css style class to be assigned to the widget<br />
;<code>posStyle</code> :<br />
<br />
== Overview ==<br />
Creates a color picker displaying "Web safe" colours. Instances of this class may be used with DwtMenu to create a ColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked<br />
<br />
<br />
== Example ==<br />
<code><br />
function colorListener(event)<br />
{<br />
// just an alert box with the selected color number<br />
alert(event.detail);<br />
}<br />
</code></div>IamPersistent