]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed layout analyzator messages
authorArtur Signell <artur.signell@itmill.com>
Mon, 22 Dec 2008 11:57:15 +0000 (11:57 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 22 Dec 2008 11:57:15 +0000 (11:57 +0000)
svn changeset:6327/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java
src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java

index cbef60c81964b6266016508fd1d2984a07468249..55a4526b3c60f647dd48e3715418e22eab3b558c 100755 (executable)
@@ -174,7 +174,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
         log("Application version: " + cnf.getApplicationVersion());
 
         if (!cnf.getSerletVersion().equals(VERSION)) {
-            error("Warning: your widget set seems to be built with different "
+            error("Warning: your widget set seems to be built with different "
                     + "version than the one used on server. Unexpected "
                     + "behavior may occur.");
         }
@@ -354,11 +354,11 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
             Set<Paintable> zeroWidthComponents) {
         int size = array.size();
         panel.add(new HTML("<div>************************</di>"
-                + "<h4>Layouts analyzed on server, total top level errors: "
+                + "<h4>Layouts analyzed on server, total top level problems: "
                 + size + " </h4>"));
         if (size > 0) {
             Tree tree = new Tree();
-            TreeItem root = new TreeItem("Root errors");
+            TreeItem root = new TreeItem("Root problems");
             for (int i = 0; i < size; i++) {
                 JSONObject error = array.get(i).isObject();
                 printLayoutError(error, root, ac);
@@ -396,7 +396,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
             errorDetails.add(new Label("" + Util.getSimpleName(paintable)
                     + " inside " + Util.getSimpleName(layout)));
             final CheckBox emphasisInUi = new CheckBox(
-                    "Emphasis components parent in UI (actual component not visible)");
+                    "Emphasis components parent in UI (actual component is not visible)");
             emphasisInUi.addClickListener(new ClickListener() {
                 public void onClick(Widget sender) {
                     if (paintable != null) {
@@ -418,15 +418,15 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
 
         TreeItem errorNode = new TreeItem();
         VerticalPanel errorDetails = new VerticalPanel();
-        errorDetails.add(new Label("Error in " + Util.getSimpleName(paintable)
-                + " id: " + pid));
+        errorDetails.add(new Label(Util.getSimpleName(paintable) + " id: "
+                + pid));
         if (error.containsKey("heightMsg")) {
-            errorDetails.add(new Label("Height error: "
+            errorDetails.add(new Label("Height problem: "
                     + error.get("heightMsg")));
         }
         if (error.containsKey("widthMsg")) {
-            errorDetails
-                    .add(new Label("Width error: " + error.get("widthMsg")));
+            errorDetails.add(new Label("Width problem: "
+                    + error.get("widthMsg")));
         }
         final CheckBox emphasisInUi = new CheckBox("Emphasis component in UI");
         emphasisInUi.addClickListener(new ClickListener() {
@@ -442,7 +442,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
         errorNode.setWidget(errorDetails);
         if (error.containsKey("subErrors")) {
             HTML l = new HTML(
-                    "<em>Expand this node to show errors that may be dependent on this error.</em>");
+                    "<em>Expand this node to show problems that may be dependent on this problem.</em>");
             errorDetails.add(l);
             JSONArray array = error.get("subErrors").isArray();
             for (int i = 0; i < array.size(); i++) {
index ebb868ead4acda0b32fd43050a81701811a46b63..78a0b85ef8a99b6c58135db90d8daadeccabd9d5 100644 (file)
@@ -77,7 +77,7 @@ public class ComponentSizeValidator {
             Stack<ComponentInfo> attributes, boolean widthError,
             PrintStream errorStream) {
         StringBuffer err = new StringBuffer();
-        err.append("IT MILL Toolkit DEBUG\n");
+        err.append("IT Mill Toolkit DEBUG\n");
 
         StringBuilder indent = new StringBuilder("");
         ComponentInfo ci;
@@ -91,11 +91,11 @@ public class ComponentSizeValidator {
             }
         }
 
-        err.append("Invalid layout detected. ");
+        err.append("Layout problem detected: ");
         err.append(msg);
         err.append("\n");
         err
-                .append("Components may be invisible or not render as expected. Relative sizes were replaced by undefined sizes.\n");
+                .append("Relative sizes were replaced by undefined sizes, components may not render as expected.\n");
         errorStream.println(err);
 
     }
@@ -184,18 +184,18 @@ public class ComponentSizeValidator {
                     }
 
                     if (vertical) {
-                        msg = "Relative height for component inside non sized vertical ordered layout.";
+                        msg = "Component with relative height inside a VerticalLayout with no height defined.";
                         attributes = getHeightAttributes(component);
                     } else {
-                        msg = "At least one of horizontal orderedlayout's components must have non relative height if layout has no height defined";
+                        msg = "At least one of a HorizontalLayout's components must have non relative height if the height of the layout is not defined";
                         attributes = getHeightAttributes(component);
                     }
                 } else if (parent instanceof GridLayout) {
-                    msg = "At least one component in each row should have non relative height in GridLayout with undefined height.";
+                    msg = "At least one of the GridLayout's components in each row should have non relative height if the height of the layout is not defined.";
                     attributes = getHeightAttributes(component);
                 } else {
                     // default error for non sized parent issue
-                    msg = "Relative height component's parent should not have undefined height.";
+                    msg = "A component with relative height needs a parent with defined height.";
                     attributes = getHeightAttributes(component);
                 }
                 printServerError(msg, attributes, false, serverErrorStream);
@@ -217,18 +217,18 @@ public class ComponentSizeValidator {
                     }
 
                     if (horizontal) {
-                        msg = "Relative width for component inside non sized horizontal ordered layout.";
+                        msg = "Component with relative width inside a HorizontalLayout with no width defined";
                         attributes = getWidthAttributes(component);
                     } else {
-                        msg = "At least one of vertical orderedlayout's components must have non relative width if layout has no width defined";
+                        msg = "At least one of a VerticalLayout's components must have non relative width if the width of the layout is not defined";
                         attributes = getWidthAttributes(component);
                     }
                 } else if (parent instanceof GridLayout) {
-                    msg = "At least one component in each column should have non relative width in GridLayout with undefined width.";
+                    msg = "At least one of the GridLayout's components in each column should have non relative width if the width of the layout is not defined.";
                     attributes = getWidthAttributes(component);
                 } else {
                     // default error for non sized parent issue
-                    msg = "Relative width component's parent should not have undefined width.";
+                    msg = "A component with relative width needs a parent with defined width.";
                     attributes = getWidthAttributes(component);
                 }
                 clientJSON.print(",\"widthMsg\":\"" + msg + "\"");