Revision: 5878 Author: [email protected] Date: Tue Aug 4 15:41:45 2009 Log: Fixes Layout checkstyle errors
http://code.google.com/p/google-web-toolkit/source/detail?r=5878 Modified: /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java /trunk/user/src/com/google/gwt/user/client/ui/LayoutPanel.java ======================================= --- /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java Tue Aug 4 14:08:06 2009 +++ /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java Tue Aug 4 15:41:45 2009 @@ -60,6 +60,10 @@ protected DivElement relativeRuler; + public void attach(Element parent) { + // Do nothing. This exists only to help LayoutImplIE6 avoid memory leaks. + } + public Element attachChild(Element parent, Element child) { DivElement container = Document.get().createDivElement(); container.appendChild(child); @@ -76,6 +80,10 @@ parent.appendChild(container); return container; } + + public void detach(Element parent) { + // Do nothing. This exists only to help LayoutImplIE6 avoid memory leaks. + } public void fillParent(Element elem) { Style style = elem.getStyle(); @@ -95,9 +103,6 @@ } switch (unit) { - default: - case PX: - return 1; case PCT: return (vertical ? parent.getClientHeight() : parent.getClientWidth()) / 100.0; case EM: @@ -114,6 +119,9 @@ return fixedRuler.getOffsetWidth() / 28.4; case PC: return fixedRuler.getOffsetWidth() / 2.36; + default: + case PX: + return 1; } } @@ -156,12 +164,4 @@ style.clearWidth(); style.clearHeight(); } - - public void detach(Element parent) { - // Do nothing. This exists only to help LayoutImplIE6 avoid memory leaks. - } - - public void attach(Element parent) { - // Do nothing. This exists only to help LayoutImplIE6 avoid memory leaks. - } -} +} ======================================= --- /trunk/user/src/com/google/gwt/user/client/ui/LayoutPanel.java Tue Aug 4 14:08:06 2009 +++ /trunk/user/src/com/google/gwt/user/client/ui/LayoutPanel.java Tue Aug 4 15:41:45 2009 @@ -77,6 +77,24 @@ // Adopt. adopt(widget); } + + /** + * Gets the {...@link Layer} associated with the given widget. This layer may be + * used to manipulate the child widget's layout constraints. + * + * <p> + * After you have made changes to any of the child widgets' constraints, you + * must call one of the {...@link HasAnimatedLayout} methods for those changes to + * be reflected visually. + * </p> + * + * @param child the child widget whose layer is to be retrieved + * @return the associated layer + */ + public Layout.Layer getLayer(Widget child) { + assert child.getParent() == this : "The requested widget is not a child of this panel"; + return (Layout.Layer) child.getLayoutData(); + } /** * This method, or one of its overloads, must be called whenever any of the @@ -156,24 +174,6 @@ } } } - - /** - * Gets the {...@link Layer} associated with the given widget. This layer may be - * used to manipulate the child widget's layout constraints. - * - * <p> - * After you have made changes to any of the child widgets' constraints, you - * must call one of the {...@link HasAnimatedLayout} methods for those changes to - * be reflected visually. - * </p> - * - * @param child the child widget whose layer is to be retrieved - * @return the associated layer - */ - public Layout.Layer getLayer(Widget child) { - assert child.getParent() == this : "The requested widget is not a child of this panel"; - return (Layout.Layer) child.getLayoutData(); - } @Override public boolean remove(Widget w) { --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
