From 32a0fb44b17b8e30b33ed01dfdda5f3ec95bbbcb Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Dec 2008 11:57:15 +0000 Subject: [PATCH] Fixed layout analyzator messages svn changeset:6327/svn branch:trunk --- .../terminal/gwt/client/IDebugConsole.java | 20 ++++++++--------- .../gwt/server/ComponentSizeValidator.java | 22 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java b/src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java index cbef60c819..55a4526b3c 100755 --- a/src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java @@ -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 a 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 zeroWidthComponents) { int size = array.size(); panel.add(new HTML("
************************" - + "

Layouts analyzed on server, total top level errors: " + + "

Layouts analyzed on server, total top level problems: " + size + "

")); 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( - "Expand this node to show errors that may be dependent on this error."); + "Expand this node to show problems that may be dependent on this problem."); errorDetails.add(l); JSONArray array = error.get("subErrors").isArray(); for (int i = 0; i < array.size(); i++) { diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java b/src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java index ebb868ead4..78a0b85ef8 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ComponentSizeValidator.java @@ -77,7 +77,7 @@ public class ComponentSizeValidator { Stack 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 + "\""); -- 2.39.5