You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/11/10 03:32:06 UTC
svn commit: r473174 - in /incubator/xap/trunk: WebContent/examples/widgets/
css/ src/xap/bridges/basic/ src/xap/bridges/dojo/ src/xap/bridges/xap/
src/xap/widgets/ src/xap/widgets/dojo/
Author: jmargaris
Date: Thu Nov 9 19:32:05 2006
New Revision: 473174
URL: http://svn.apache.org/viewvc?view=rev&rev=473174
Log:
stylesheet and cosmetic changes
Modified:
incubator/xap/trunk/WebContent/examples/widgets/button.xal
incubator/xap/trunk/WebContent/examples/widgets/checkBox.xal
incubator/xap/trunk/WebContent/examples/widgets/label.xal
incubator/xap/trunk/WebContent/examples/widgets/menu.xal
incubator/xap/trunk/WebContent/examples/widgets/radioButton.xal
incubator/xap/trunk/css/xapDefault.css
incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js
incubator/xap/trunk/src/xap/bridges/dojo/MenuBarBridge.js
incubator/xap/trunk/src/xap/bridges/dojo/MenuBarItemBridge.js
incubator/xap/trunk/src/xap/bridges/dojo/MenuItemBridge.js
incubator/xap/trunk/src/xap/bridges/xap/ButtonBridge.js
incubator/xap/trunk/src/xap/bridges/xap/LabelBridge.js
incubator/xap/trunk/src/xap/widgets/Button.js
incubator/xap/trunk/src/xap/widgets/Label.js
incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js
Modified: incubator/xap/trunk/WebContent/examples/widgets/button.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/button.xal?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/button.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/button.xal Thu Nov 9 19:32:05 2006
@@ -65,11 +65,11 @@
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set disabled image"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgDisabled', '../foreground_disabled.JPG')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set enabled = false"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'false')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set disabled = true"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set enabled = true"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'true')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set disabled = false"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'false')" />
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set image width = 50"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgWidth', '50')" />
Modified: incubator/xap/trunk/WebContent/examples/widgets/checkBox.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/checkBox.xal?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/checkBox.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/checkBox.xal Thu Nov 9 19:32:05 2006
@@ -84,11 +84,11 @@
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="richText = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'richText', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="enabled = true"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'true')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="disabled = false"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'false')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="enabled = false"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'false')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="disabled = true"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'true')" />
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="selected = true"
Modified: incubator/xap/trunk/WebContent/examples/widgets/label.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/label.xal?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/label.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/label.xal Thu Nov 9 19:32:05 2006
@@ -7,86 +7,86 @@
<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
<xm:append select="/xal">
- <label id="testComponent" width="400px" height="100px" alignHorizontal="center" alignVertical="top"
+ <label id="testComponent" width="400px" height="100px"
text="MY PRECIOUS LABEL" />
<horizontalFlowPane width="825px">
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="Hello World!"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'text', 'Hello World!!!')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="<b>Hear me roar!</b>"
+ <button width="200px" height="50px" text="<b>Hear me roar!</b>"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'text', '<b>Hear me roar!!!</b>')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="Very long text"
+ <button width="200px" height="50px" text="Very long text"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'text', 'XAP is an XML-based declarative framework for building, deploying and maintaining rich, interactive Ajax powered web applications. It aims to reduce the need for scripting and help solve the development and maintenance challenges associated with large scale JavaScript programming.')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="textPlacementVertical = top"
+ <button width="200px" height="50px" text="textPlacementVertical = top"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'textPlacementVertical', 'top')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="textPlacementVertical = bottom"
+ <button width="200px" height="50px" text="textPlacementVertical = bottom"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'textPlacementVertical', 'bottom')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="textPlacementHorizontal = left"
+ <button width="200px" height="50px" text="textPlacementHorizontal = left"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'textPlacementHorizontal', 'left')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="textPlacementHorizontal = right"
+ <button width="200px" height="50px" text="textPlacementHorizontal = right"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'textPlacementHorizontal', 'right')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignHorizontal = left"
+ <button width="200px" height="50px" text="alignHorizontal = left"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignHorizontal', 'left')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignHorizontal = center"
+ <button width="200px" height="50px" text="alignHorizontal = center"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignHorizontal', 'center')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignHorizontal = right"
+ <button width="200px" height="50px" text="alignHorizontal = right"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignHorizontal', 'right')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignVertical = top"
+ <button width="200px" height="50px" text="alignVertical = top"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignVertical', 'top')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignVertical = center"
+ <button width="200px" height="50px" text="alignVertical = center"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignVertical', 'center')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="alignVertical = bottom"
+ <button width="200px" height="50px" text="alignVertical = bottom"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'alignVertical', 'bottom')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="autoWrap = true"
+ <button width="200px" height="50px" text="autoWrap = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'autoWrap', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="autoWrap = false"
+ <button width="200px" height="50px" text="autoWrap = false"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'autoWrap', 'false')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set background image"
+ <button width="200px" height="50px" text="set background image"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgBackground', '../background.JPG')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set image"
+ <button width="200px" height="50px" text="set image"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'img', '../foreground.JPG')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set disabled image"
+ <button width="200px" height="50px" text="set disabled image"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgDisabled', '../foreground_disabled.JPG')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set enabled = false"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'false')" />
+ <button width="200px" height="50px" text="set disabled = true"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set enabled = true"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'true')" />
+ <button width="200px" height="50px" text="set disabled = false"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'false')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set image width = 50"
+ <button width="200px" height="50px" text="set image width = 50"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgWidth', '50')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="set image height = 20"
+ <button width="200px" height="50px" text="set image height = 20"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'imgHeight', '20')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="selectable = true"
+ <button width="200px" height="50px" text="selectable = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'selectable', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="selectable = false"
+ <button width="200px" height="50px" text="selectable = false"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'selectable', 'false')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="richText = true"
+ <button width="200px" height="50px" text="richText = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'richText', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="richText = false"
+ <button width="200px" height="50px" text="richText = false"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'richText', 'false')" />
<!-- button specific properties -->
@@ -98,65 +98,6 @@
<!--standard test things -->
</horizontalFlowPane>
<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
-
- <!--
- <label width="400px" height="100px" alignHorizontal="center" alignVertical="top" text="HCenterVTop" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="center" alignVertical="top" text="HCenterVTop" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="center" alignVertical="top" text="HCenterVTop" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
-
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="bottom" text="HCenter VBottom" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="bottom" text="HCenter VBottom" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="bottom" text="HCenter VBottom" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="bottom" text="HCenter VBottom" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="bottom" text="HCenter VBottom" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="center" text="HCenter VCenter" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="center" text="HCenter VCenter" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="center" text="HCenter VCenter" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="center" text="HCenter VCenter" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="700px" height="100px" alignHorizontal="center" alignVertical="center" text="HCenter VCenter" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="top" text="HRight VTop" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="top" text="HRight VTop" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="top" text="HRight VTop" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="top" text="HRight VTop" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="top" text="HRight VTop" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="bottom" text="HRight VBottom" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="bottom" text="HRight VBottom" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="bottom" text="HRight VBottom" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="bottom" text="HRight VBottom" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="bottom" text="HRight VBottom" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="center" text="HRight VCenter" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="center" text="HRight VCenter" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="center" text="HRight VCenter" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="center" text="HRight VCenter" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="right" alignVertical="center" text="HRight VCenter" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="top" text="HLeft VTop" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="top" text="HLeft VTop" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="top" text="HLeft VTop" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="top" text="HLeft VTop" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="top" text="HLeft VTop" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="bottom" text="HLeft VBottom" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="bottom" text="HLeft VBottom" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="bottom" text="HLeft VBottom" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="bottom" text="HLeft VBottom" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="bottom" text="HLeft VBottom" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter"/>
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="right" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="right" textPlacementVertical="bottom" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="left" textPlacementVertical="top" />
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="left" textPlacementVertical="bottom" />
-
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="right"/>
- <label width="400px" height="100px" alignHorizontal="left" alignVertical="center" text="HLeft VCenter" textPlacementHorizontal="left"/>
-
- -->
</xm:append>
</xm:modifications>
Modified: incubator/xap/trunk/WebContent/examples/widgets/menu.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/menu.xal?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/menu.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/menu.xal Thu Nov 9 19:32:05 2006
@@ -25,7 +25,7 @@
<xal:menuBarItem text="File">
<xal:menu>
- <xal:menuItem text="Open" enabled="false" onCommand="mco:attributeSetter.reportEvent(event)"/>
+ <xal:menuItem text="Open" disabled="true" onCommand="mco:attributeSetter.reportEvent(event)"/>
<xal:menuItem text="Close" onCommand="mco:attributeSetter.reportEvent(event)"/>
<xal:menuItem text="Preferences.">
<xal:menu>
@@ -36,7 +36,7 @@
</xal:menu>
</xal:menuBarItem>
- <xal:menuBarItem text="Format" enabled="false">
+ <xal:menuBarItem text="Format" disabled="true">
<xal:menu>
<xal:menuItem text="Cut"/>
<xal:menuItem text="Copy"/>
@@ -104,13 +104,13 @@
onCommand="mco:attributeSetter.setAttribute(testComponent,
'fontStyle' ,'italic')"/>
<button width="200px" height="25px"
- text="enabled -> 'false'"
+ text="disabled -> 'true'"
onCommand="mco:attributeSetter.setAttribute(testComponent,
- 'enabled' ,'false')"/>
+ 'disabled' ,'true')"/>
<button width="200px" height="25px"
- text="enabled -> 'true'"
+ text="disabled -> 'false'"
onCommand="mco:attributeSetter.setAttribute(testComponent,
- 'enabled' ,'true')"/>
+ 'disabled' ,'false')"/>
<button width="200px" height="25px"
text="pack -> 'true'"
onCommand="mco:attributeSetter.setAttribute(testComponent,
@@ -173,13 +173,13 @@
onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
'visible' ,'true')"/>
<button width="200px" height="25px"
- text="enabled -> 'false'"
+ text="disabled -> 'true'"
onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
- 'enabled' ,'false')"/>
+ 'disabled' ,'true')"/>
<button width="200px" height="25px"
- text="enabled -> 'true'"
+ text="disabled -> 'false'"
onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
- 'enabled' ,'true')"/>
+ 'disabled' ,'false')"/>
</horizontalFlowPane>
<horizontalFlowPane width="825px" xmlns="http://www.openxal.org/xal">
@@ -239,13 +239,13 @@
onCommand="mco:attributeSetter.setAttribute(testMenuItem,
'visible' ,'true')"/>
<button width="200px" height="25px"
- text="enabled -> 'false'"
+ text="disabled -> 'true'"
onCommand="mco:attributeSetter.setAttribute(testMenuItem,
- 'enabled' ,'false')"/>
+ 'disabled' ,'true')"/>
<button width="200px" height="25px"
- text="enabled -> 'true'"
+ text="disabled -> 'false'"
onCommand="mco:attributeSetter.setAttribute(testMenuItem,
- 'enabled' ,'true')"/>
+ 'disabled' ,'false')"/>
</horizontalFlowPane>
<!--standard test things -->
<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
Modified: incubator/xap/trunk/WebContent/examples/widgets/radioButton.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/radioButton.xal?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/radioButton.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/radioButton.xal Thu Nov 9 19:32:05 2006
@@ -89,11 +89,11 @@
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="richText = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'richText', 'true')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="enabled = true"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'true')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="disabled = false"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'false')" />
- <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="enabled = false"
- onCommand="mco:attributeSetter.setAttribute(testComponent, 'enabled', 'false')" />
+ <button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="disabled = true"
+ onCommand="mco:attributeSetter.setAttribute(testComponent, 'disabled', 'true')" />
<button width="200px" height="50px" alignHorizontal="center" alignVertical="center" text="selected = true"
onCommand="mco:attributeSetter.setAttribute(testComponent, 'selected', 'true')" />
Modified: incubator/xap/trunk/css/xapDefault.css
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/css/xapDefault.css?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/css/xapDefault.css (original)
+++ incubator/xap/trunk/css/xapDefault.css Thu Nov 9 19:32:05 2006
@@ -3,19 +3,147 @@
*/
-.buttonUp {
- border-top : 2px solid #ccc;
- border-right: 2px solid #555;
- border-bottom: 2px solid #555;
- border-left: 2px solid #ccc;
+/* BUTTON */
+
+.xapButton{
+ border-top : 2px outset #ccc;
+ border-right: 2px outset #ccc;
+ border-bottom: 2px outset #ccc;
+ border-left: 2px outset #ccc;
+ padding: 2px 2px 2px 2px;
+ cursor: pointer;
+
+}
+
+.xapButtonMouseOver{
+ background-color: #EEEEFF;
+ color:orange;
+}
+
+.xapButtonMouseDown{
+ border-top : 2px inset #ccc;
+ border-right: 2px inset #ccc;
+ border-bottom: 2px inset #ccc;
+ border-left: 2px inset #ccc;
+ padding: 4px 0px 0px 4px;
+ color : red;
+}
+
+.xapButtonDisabled{
+ color : gray;
+ border-top : 2px solid gray;
+ border-right: 2px solid gray;
+ border-bottom: 2px solid gray;
+ border-left: 2px solid gray;
+ cursor: default;
+}
+
+
+/* CHECKBOX */
+.xapCheckBox{
+ padding: 2px 2px 2px 2px;
+ cursor: pointer;
+
+}
+
+.xapCheckBoxMouseOver{
+ color:orange;
+}
+
+.xapCheckBoxMouseDown{
+ color : red;
+}
+
+.xapCheckBoxDisabled{
+ color : gray;
+ cursor: default;
+}
+
+/* RADIO BUTTON */
+.xapRadioButton{
+ padding: 2px 2px 2px 2px;
+ cursor: pointer;
+
+}
+
+.xapRadioButtonMouseOver{
+ color:orange;
+}
+
+.xapRadioButtonMouseDown{
+ color : red;
}
-.buttonDown {
- border-top : 2px solid #555;
- border-right: 2px solid #ccc;
- border-bottom: 2px solid #ccc;
- border-left: 2px solid #555;
+.xapRadioButtonDisabled{
+ color : gray;
+ cursor: default;
}
+
+
+/* HEADER (table) */
+
+.xapHeader{
+ border-top : 2px outset #ccc;
+ border-right: 2px outset #ccc;
+ border-bottom: 2px outset #ccc;
+ border-left: 2px outset #ccc;
+ padding: 2px 2px 2px 2px;
+ cursor: pointer;
+
+}
+
+.xapHeaderMouseOver{
+ background-color: #EEEEFF;
+ color:orange;
+}
+
+.xapHeaderMouseDown{
+ border-top : 2px inset #ccc;
+ border-right: 2px inset #ccc;
+ border-bottom: 2px inset #ccc;
+ border-left: 2px inset #ccc;
+ padding: 4px 0px 0px 4px;
+ color : red;
+}
+
+.xapHeaderDisabled{
+ color : gray;
+ border-top : 2px solid gray;
+ border-right: 2px solid gray;
+ border-bottom: 2px solid gray;
+ border-left: 2px solid gray;
+ cursor: default;
+}
+
+
+/* TABLE */
+
+.xapTable{
+ border-top : 1px solid black;
+ border-right: 1px solid black;
+ border-botom : 1px solid black;
+ border-left : 1px solid black;
+}
+
+/* TREE */
+
+.xapTree{
+ border-top : 1px solid black;
+ border-right: 1px solid black;
+ border-botom : 1px solid black;
+ border-left : 1px solid black;
+}
+
+/* TREETABLE */
+
+.xapTreeTable{
+ border-top : 1px solid black;
+ border-right: 1px solid black;
+ border-botom : 1px solid black;
+ border-left : 1px solid black;
+}
+
+
BODY {
Modified: incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js Thu Nov 9 19:32:05 2006
@@ -24,6 +24,7 @@
Xap.require("dojo.widget.Tooltip") ;
Xap.require("dojo.event.*") ;
Xap.require("xap.session.ClientEvent");
+Xap.require("dojo.html.*");
/**
* @fileoverview
@@ -66,6 +67,7 @@
* @see xap.bridges.dojo.DojoWidgetBridge
*/
xap.bridges.basic.AbstractWidgetBridge = function() {
+ this._disabled = false;
xap.taghandling.AbstractTagImpl.call( this );
}
@@ -92,6 +94,10 @@
**/
xap.bridges.basic.AbstractWidgetBridge.prototype.init = function() {
this.createPeer();
+
+ if (this.getRootDomNode() && this.getCssStyleName()){
+ dojo.html.addClass(this.getRootDomNode(),this.getCssStyleName());
+ }
this.parseInitialAttributes( this.getElement() );
this.parseInitialChildren( this.getElement() );
xap.taghandling.AbstractTagImpl.prototype.init.call( this );
@@ -215,6 +221,8 @@
dojo.event.connect(rootNode,"onkeypress", this, "onKeyPress");
dojo.event.connect(rootNode,"onmousedown", this, "onMouseDown");
dojo.event.connect(rootNode,"onmouseup", this, "onMouseUp");
+ dojo.event.connect(rootNode,"onmouseover", this, "onMouseOver");
+ dojo.event.connect(rootNode,"onmouseout", this, "onMouseOut");
}
}
@@ -235,8 +243,23 @@
return null;
}
+xap.bridges.basic.AbstractWidgetBridge.prototype.getCssStyleName = function(){
+ var nodeName = this.getElement().nodeName;
+ return "xap" + nodeName.substring(0,1).toUpperCase() + nodeName.substring(1);
+ //TODO cache this?
+}
+xap.bridges.basic.AbstractWidgetBridge.prototype.addStyleState = function( stateName ){
+ if (this.getRootDomNode() && this.getCssStyleName()){
+ dojo.html.addClass(this.getRootDomNode(),this.getCssStyleName() + stateName);
+ }
+}
+xap.bridges.basic.AbstractWidgetBridge.prototype.removeStyleState = function( stateName ){
+ if (this.getRootDomNode() && this.getCssStyleName()){
+ dojo.html.removeClass(this.getRootDomNode(),this.getCssStyleName() + stateName);
+ }
+}
/**
* @private
@@ -480,7 +503,7 @@
"borderWidth","borderColor","borderStyle","margin",
"padding","color","textDecoration","fontFamily",
"fontStyle","fontWeight", "fontSize", "textAlign",
- "popup","tooltip", "focused"];
+ "popup","tooltip", "focused", "disabled"];
}
@@ -579,6 +602,19 @@
this.getRootDomNode().style.textAlign = value ;
}
+/**
+ * Subclasses must override this to provide a real behavior here
+ */
+xap.bridges.basic.AbstractWidgetBridge.prototype.setDisabledAttribute = function(value){
+ this._disabled = value=='true'?true:false;
+ if (this._disabled){
+ this.addStyleState("Disabled");
+ }
+ else{
+ this.removeStyleState("Disabled");
+ }
+}
+
xap.bridges.basic.AbstractWidgetBridge.prototype.setPopupAttribute = function(popupId){
//TODO fire onContextMenu event and let them consume it?
//TODO if they have OLD popup need to unregister it!!!
@@ -644,6 +680,7 @@
*/
xap.bridges.basic.AbstractWidgetBridge.prototype.onFocus = function(e){
if (!this._settingFocus){
+ this.addStyleState("Focused");
this.fireEvent("onActiveGained");
}
else{
@@ -652,6 +689,7 @@
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onBlur = function(e){
+ this.removeStyleState("Focused");
this.fireEvent("onActiveLost");
}
@@ -660,23 +698,52 @@
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseDown = function(e){
- this.fireMouseEvent("onMouseDown",e);
+ if (!this._disabled){
+ this.addStyleState("MouseDown");
+ this.fireMouseEvent("onMouseDown",e);
+ }
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseUp = function(e){
- this.fireMouseEvent("onMouseUp",e);
+ //IMPORTANT if you drag something then release it doesn't
+ //get a mouse up, we deal with this in Button need to deal with it
+ //everywhere!
+ if (!this._disabled){
+ this.removeStyleState("MouseDown");
+ this.fireMouseEvent("onMouseUp",e);
+ }
+}
+
+xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseOver= function(e){
+ //TODO fire event?
+ if (!this._disabled){
+ this.addStyleState("MouseOver");
+ }
+}
+
+xap.bridges.basic.AbstractWidgetBridge.prototype.onMouseOut= function(e){
+ //TODO fire event?
+ if (!this._disabled){
+ this.removeStyleState("MouseOver");
+ }
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyDown = function(e){
- this.fireKeyEvent("onKeyDown",e);
+ if (!this._disabled){
+ this.fireKeyEvent("onKeyDown",e);
+ }
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyUp = function(e){
- this.fireKeyEvent("onKeyUp",e);
+ if (!this._disabled){
+ this.fireKeyEvent("onKeyUp",e);
+ }
}
xap.bridges.basic.AbstractWidgetBridge.prototype.onKeyPress = function(e){
- this.fireKeyEvent("onKeyPress",e);
+ if (!this._disabled){
+ this.fireKeyEvent("onKeyPress",e);
+ }
}
Modified: incubator/xap/trunk/src/xap/bridges/dojo/MenuBarBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/MenuBarBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/MenuBarBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/MenuBarBridge.js Thu Nov 9 19:32:05 2006
@@ -80,12 +80,12 @@
* No new dynamic attributes
*/
xap.bridges.dojo.MenuBarBridge.prototype.getNewAllowedAttributes = function(){
- return ["enabled", "pack"];
+ return ["pack"];
}
-xap.bridges.dojo.MenuBarBridge.prototype.setEnabledAttribute = function(value) {
+xap.bridges.dojo.MenuBarBridge.prototype.setDisabledAttribute = function(value) {
var peer = this.getPeer();
- peer.enabled = value == "true" ? true : false;
+ peer.enabled = value == "true" ? false : true;
var children = peer.children;
for (var i = 0; i < children.length; i++) {
Modified: incubator/xap/trunk/src/xap/bridges/dojo/MenuBarItemBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/MenuBarItemBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/MenuBarItemBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/MenuBarItemBridge.js Thu Nov 9 19:32:05 2006
@@ -84,7 +84,7 @@
xap.bridges.dojo.MenuBarItemBridge.prototype.getNewAllowedAttributes = function(){
- return ["text", "enabled", "visible"];
+ return ["text", "disabled", "visible"];
}
@@ -144,9 +144,9 @@
}
}
-xap.bridges.dojo.MenuBarItemBridge.prototype.setEnabledAttribute = function(value) {
+xap.bridges.dojo.MenuBarItemBridge.prototype.setDisabledAttribute = function(value) {
var peer = this.getPeer();
- peer.enabled = value == "true" ? true : false;
+ peer.enabled = value == "true" ? false : true;
this._enable();
}
Modified: incubator/xap/trunk/src/xap/bridges/dojo/MenuItemBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/MenuItemBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/MenuItemBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/MenuItemBridge.js Thu Nov 9 19:32:05 2006
@@ -66,7 +66,7 @@
xap.bridges.dojo.MenuItemBridge.prototype.getNewAllowedAttributes = function(){
- return ["text", "enabled", "visible"];
+ return ["text", "visible"];
}
@@ -112,12 +112,12 @@
}
}
-xap.bridges.dojo.MenuItemBridge.prototype.setEnabledAttribute = function(enabled) {
+xap.bridges.dojo.MenuItemBridge.prototype.setDisabledAttribute = function( disabled) {
var peer = this.getPeer();
- if (enabled == "true") {
- peer.setDisabled(false);
- } else {
+ if (disabled == "true") {
peer.setDisabled(true);
+ } else {
+ peer.setDisabled(false);
}
}
Modified: incubator/xap/trunk/src/xap/bridges/xap/ButtonBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/xap/ButtonBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/xap/ButtonBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/xap/ButtonBridge.js Thu Nov 9 19:32:05 2006
@@ -38,6 +38,7 @@
}
}
+
xap.bridges.xap.ButtonBridge.prototype.getNewAllowedAttributes = function() {
return ["imgOver", "imgPressed"];
}
Modified: incubator/xap/trunk/src/xap/bridges/xap/LabelBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/xap/LabelBridge.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/xap/LabelBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/xap/LabelBridge.js Thu Nov 9 19:32:05 2006
@@ -34,7 +34,7 @@
}
xap.bridges.xap.LabelBridge.prototype.getNewAllowedAttributes = function() {
- return ["alignHorizontal", "alignVertical", "autoWrap", "enabled", "img",
+ return ["alignHorizontal", "alignVertical", "autoWrap", "img",
"imgBackground", "imgDisabled", "imgHeight", "imgWidth", "richText",
"selectable", "text", "textPlacementHorizontal", "textPlacementVertical"];
}
@@ -51,8 +51,9 @@
this.getPeer().setAutoWrap(autoWrap);
}
-xap.bridges.xap.LabelBridge.prototype.setEnabledAttribute = function(enabled) {
- this.getPeer().setEnabled(enabled);
+xap.bridges.xap.LabelBridge.prototype.setDisabledAttribute = function(disabled) {
+ xap.bridges.basic.AbstractWidgetBridge.prototype.setDisabledAttribute.call(this,disabled);
+ this.getPeer().setEnabled(!disabled);
}
xap.bridges.xap.LabelBridge.prototype.setImgAttribute = function(imgURL) {
Modified: incubator/xap/trunk/src/xap/widgets/Button.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/Button.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/Button.js (original)
+++ incubator/xap/trunk/src/xap/widgets/Button.js Thu Nov 9 19:32:05 2006
@@ -27,6 +27,7 @@
this.mouseOver = false;
this.mousePressed = false;
+ this.setAlignHorizontal("center");
}
Xap.setupClassAsSubclassOf("xap.widgets.Button", "xap.widgets.Label");
@@ -34,12 +35,6 @@
xap.widgets.Button.prototype.init = function() {
dojo.event.connect(this._rootDomNode, "onmousedown", this, "_onmousedown");
dojo.event.connect(this._rootDomNode, "onmousedown", this, "_styleMousedown");
-
- this.buttonUpClassName = "buttonUp";
- this.buttonDownClassName = "buttonDown";
-
- this._rootDomNode.style.cursor = "default";
- this._rootDomNode.className = this.buttonUpClassName;
}
/**
@@ -77,10 +72,6 @@
xap.widgets.Button.prototype._onmousedown = function() {
if (this.enabled) {
- if (this.buttonDownClassName) {
- this._rootDomNode.className = this.buttonDownClassName;
- }
-
this.mousePressed = true;
this._showImg();
@@ -90,10 +81,6 @@
xap.widgets.Button.prototype._onmouseup = function() {
if (this.enabled) {
- if (this.buttonUpClassName) {
- this._rootDomNode.className = this.buttonUpClassName;
- }
-
this.mousePressed = false;
this._showImg();
Modified: incubator/xap/trunk/src/xap/widgets/Label.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/Label.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/Label.js (original)
+++ incubator/xap/trunk/src/xap/widgets/Label.js Thu Nov 9 19:32:05 2006
@@ -24,17 +24,24 @@
Xap.provide("xap.widgets.Label");
xap.widgets.Label = function() {
-
// create label structure
this.table = document.createElement("table");
this._rootDomNode = this.table;
this.table.cellPadding = "0px";
this.table.cellSpacing = "0px";
this.td = document.createElement("td");
+ this.td.style.textAlign="left";
+ this.td.style.width="100%";
+ this.td.style.height="100%";
this.br = document.createElement("br");
var tbody = document.createElement("tbody");
+ tbody.style.width = "100%";
+ tbody.style.height = "100%";
+ tbody.style.position = "relative";
var tr = document.createElement("tr");
+ tr.style.width = "100%";
+ tr.style.height = "100%";
this.table.appendChild(tbody);
tbody.appendChild(tr);
@@ -42,14 +49,12 @@
this.span = document.createElement("span");
this.img = document.createElement("img");
+ this.img.align="middle";
this.img.style.display = "none";
this.td.appendChild(this.img);
this.td.appendChild(this.span);
- this._rootDomNode.style.padding = "2px";
-
- xap.widgets.styleSet(this.table, {width:"100%", height: "100%"});
xap.widgets.styleSet(this.td, {width:"100%", height: "100%"});
xap.widgets.styleSet(this._rootDomNode, {overflow:"hidden", position:"relative"});
Modified: incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js?view=diff&rev=473174&r1=473173&r2=473174
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js (original)
+++ incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js Thu Nov 9 19:32:05 2006
@@ -199,6 +199,8 @@
this.headerTable.childNodes[i].style.width = width;
this.table.childNodes[i].style.width = width;
}
+
+ this.headerRow.childNodes[i].childNodes[0].style.width = "100%";
}
},