Author: [EMAIL PROTECTED]
Date: Thu Oct  2 13:07:24 2008
New Revision: 3699

Added:
     
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java
     
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java
Modified:
     
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
    trunk/user/src/com/google/gwt/user/client/ui/TreeItem.java

Log:
Fixes issue 2553, where leaf nodes were not lining up in IE.

Modified:  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
==============================================================================
---  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
    
(original)
+++  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
    
Thu Oct  2 13:07:24 2008
@@ -40,6 +40,9 @@
      addIssue(new Issue1169());
      addIssue(new Issue2392());
      addIssue(new Issue2443());
+    addIssue(new Issue2553());
+    addIssue(new TreeVisuals());
      addIssue(new TestFireEvents());
+
    }
  }

Added:  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java
==============================================================================
--- (empty file)
+++  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java
        
Thu Oct  2 13:07:24 2008
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under
+ * the License.
+ */
+
+package com.google.gwt.museum.client.defaultmuseum;
+
+import com.google.gwt.museum.client.common.AbstractIssue;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Test for  
http://code.google.com/p/google-web-toolkit/issues/detail?id=2553
+ */
+public class Issue2553 extends AbstractIssue {
+
+  @Override
+  public Widget createIssue() {
+    Tree tree = new Tree();
+    tree.addItem("This is a long text displayed in a tree item");
+    tree.addItem("This is a long text displayed in a tree item and it's  
longer than the others");
+    tree.addItem("This is a long text displayed in a tree item");
+    return tree;
+  }
+
+  @Override
+  public String getInstructions() {
+    return "resize the browser to a smaller width than the tree's width";
+  }
+
+  @Override
+  public String getSummary() {
+    return "Word wrap of treeitem's text when browser width is too small";
+  }
+
+  @Override
+  public boolean hasCSS() {
+    return false;
+  }
+
+}

Added:  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java
==============================================================================
--- (empty file)
+++  
trunk/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java
      
Thu Oct  2 13:07:24 2008
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under
+ * the License.
+ */
+
+package com.google.gwt.museum.client.defaultmuseum;
+
+import com.google.gwt.museum.client.common.AbstractIssue;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * A simple tree used to quickly exercise tree behavior.
+ */
+public class TreeVisuals extends AbstractIssue {
+
+  @Override
+  public Widget createIssue() {
+    VerticalPanel p = new VerticalPanel();
+    Tree t = new Tree();
+    TreeItem a = new TreeItem("a");
+    TreeItem b = new TreeItem(
+        "b, though this is a very, very long text field in order to  
trigger text wrapping bugs, if there are any such bugs currently in the  
tree.");
+    TreeItem ba = new TreeItem("b.a");
+    TreeItem bb = new TreeItem("b.b");
+    TreeItem bba = new TreeItem("b.b.a");
+    TreeItem bc = new TreeItem("b.c");
+    TreeItem c = new TreeItem("c");
+    t.setSelectedItem(b);
+    t.addItem(a);
+    t.addItem(b);
+    t.addItem(c);
+    b.addItem(ba);
+    b.addItem(bb);
+    bb.addItem(bba);
+    b.addItem(bc);
+    p.add(t);
+    return p;
+  }
+
+  @Override
+  public String getInstructions() {
+    return "Open each node, make sure everything looks right";
+  }
+
+  @Override
+  public String getSummary() {
+    return "simple tree, used for generic tree tests";
+  }
+
+  @Override
+  public boolean hasCSS() {
+    return false;
+  }
+
+}

Modified: trunk/user/src/com/google/gwt/user/client/ui/TreeItem.java
==============================================================================
--- trunk/user/src/com/google/gwt/user/client/ui/TreeItem.java  (original)
+++ trunk/user/src/com/google/gwt/user/client/ui/TreeItem.java  Thu Oct  2  
13:07:24 2008
@@ -107,11 +107,6 @@
      void initializeClonableElements() {
        super.initializeClonableElements();
        if (GWT.isClient()) {
-        // Remove the padding from the cells and re-add it to the table  
element
-        DOM.setElementPropertyInt(BASE_INTERNAL_ELEM, "cellPadding", 0);
-        DOM.setElementPropertyInt(BASE_INTERNAL_ELEM, "cellSpacing", 0);
-        BASE_INTERNAL_ELEM.getStyle().setPropertyPx("paddingBottom", 3);
-
          // We can't use a 3px padding all around because IE will wrap the
          // childSpan to the next line, so we need to add a 3px margin on  
the top
          // and bottom instead. However, margins overlap, so we need a 6px  
bottom

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to