You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/09/27 16:23:18 UTC

svn commit: r1526911 - in /pivot/branches/2.0.x: tests/src/org/apache/pivot/tests/tooltip_test.bxml wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java

Author: smartini
Date: Fri Sep 27 14:23:18 2013
New Revision: 1526911

URL: http://svn.apache.org/r1526911
Log:
PIVOT-910, updated the test application to see the new (wrong) behaviour, to fix

Modified:
    pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/tooltip_test.bxml
    pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java

Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/tooltip_test.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/tooltip_test.bxml?rev=1526911&r1=1526910&r2=1526911&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/tooltip_test.bxml (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/tooltip_test.bxml Fri Sep 27 14:23:18 2013
@@ -18,17 +18,44 @@ limitations under the License.
 
 <Window title="Test BXML" maximized="true"
     xmlns:bxml="http://pivot.apache.org/bxml"
+    xmlns:collections="org.apache.pivot.collections"
+    xmlns:content="org.apache.pivot.wtk.content"
     xmlns="org.apache.pivot.wtk"
 >
 
-    <BoxPane styles="{padding:4, verticalAlignment:'center'}">
-        <Label text="Multi-line&#10;Label:"
-            tooltipText="multi-line&#10;tooltip for the Label"
-            styles="{wrapText:true}"
-        />
-        <PushButton bxml:id="pushButton" buttonData="Button with multi-line tooltip"
-            tooltipText="multi-line&#10;tooltip for the Button"
-        />
+    <BoxPane orientation="vertical" styles="{padding:4, verticalAlignment:'center'}">
+        <FlowPane>
+            <Label text="Multi-line&#10;Label:"
+                tooltipText="multi-line&#10;tooltip for the Label"
+                styles="{wrapText:true}"
+            />
+            <PushButton bxml:id="pushButton" buttonData="Button with multi-line tooltip"
+                tooltipText="multi-line&#10;tooltip for the Button"
+            />
+        </FlowPane>
+        <Separator/>
+        <FlowPane>
+            <Label text="Select one element:"/>
+            <ListButton bxml:id="listButton2" buttonData="Number"
+                listData="['One', 'Two', 'Three']"
+            />
+        </FlowPane>
+        <Separator/>
+        <FlowPane>
+           <Label text="TableView:"/>
+            <TableView bxml:id="tableView1" styles="{variableRowHeight:true, backgroundColor:'#ffeeee'}"
+                selectMode="multi" tableDataKey="tableDataKey"
+            >
+                <columns>
+                    <TableView.Column name="value" width="1*"/>
+                    <TableView.Column width="1*"/>
+                </columns>
+                <collections:HashMap value="Single Line"/>
+                <collections:HashMap value="Double&#xA;Line Line Line Line!"/>
+                <collections:HashMap value="Single Line"/>
+                <collections:HashMap value="Double&#xA;Line"/>
+            </TableView>
+        </FlowPane>
     </BoxPane>
 
 </Window>

Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java?rev=1526911&r1=1526910&r2=1526911&view=diff
==============================================================================
--- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java (original)
+++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java Fri Sep 27 14:23:18 2013
@@ -296,7 +296,8 @@ public abstract class ComponentSkin impl
 
         if (tooltipText != null) {
             Label tooltipLabel = new Label(tooltipText);
-            tooltipLabel.getStyles().put("wrapText", true);  // TODO: set wrapText style accordingly to what is set in the tooltip ...
+            tooltipLabel.getStyles().put("wrapText", true);  // by default here set wrapText style to true
+// TODO: set wrapText style to false only if specified ...
             Tooltip tooltip = new Tooltip(tooltipLabel);
 
             Display display = component.getDisplay();