You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/01/25 19:37:35 UTC

svn commit: r902918 - in /pivot/trunk: demos/src/org/apache/pivot/demos/decorator/ tools/src/org/apache/pivot/tools/wtk/ tutorials/src/org/apache/pivot/tutorials/ wtk/src/org/apache/pivot/wtkx/

Author: gbrown
Date: Mon Jan 25 18:37:35 2010
New Revision: 902918

URL: http://svn.apache.org/viewvc?rev=902918&view=rev
Log:
Eliminate reset() method in WTKXSerializer.

Modified:
    pivot/trunk/demos/src/org/apache/pivot/demos/decorator/DecoratorDemo.java
    pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
    pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java

Modified: pivot/trunk/demos/src/org/apache/pivot/demos/decorator/DecoratorDemo.java
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/decorator/DecoratorDemo.java?rev=902918&r1=902917&r2=902918&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/decorator/DecoratorDemo.java (original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/decorator/DecoratorDemo.java Mon Jan 25 18:37:35 2010
@@ -44,8 +44,6 @@
 
         WTKXSerializer wtkxSerializer = new WTKXSerializer();
         reflectionWindow = (Window)wtkxSerializer.readObject(this, "reflection.wtkx");
-        wtkxSerializer.reset();
-
         translucentFrame = (Frame)wtkxSerializer.readObject(this, "translucent.wtkx");
 
         final FadeDecorator fadeDecorator = new FadeDecorator();

Modified: pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java?rev=902918&r1=902917&r2=902918&view=diff
==============================================================================
--- pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java (original)
+++ pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java Mon Jan 25 18:37:35 2010
@@ -61,10 +61,6 @@
     // Maps key to corresponding control component
     private HashMap<String, Component> controls = new HashMap<String, Component>();
 
-    public ComponentInspectorSkin() {
-        form.getStyles().put("rightAlignLabels", true);
-    }
-
     @Override
     public void install(Component component) {
         super.install(component);

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java?rev=902918&r1=902917&r2=902918&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java Mon Jan 25 18:37:35 2010
@@ -341,8 +341,6 @@
 
                 rollup.setContent(component);
 
-                wtkxSerializer.reset();
-
                 try {
                     menuSection = (Menu.Section)wtkxSerializer.readObject(this, "menu_section.wtkx");
                     imageMenuGroup = (ButtonGroup)wtkxSerializer.get("imageMenuGroup");

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java?rev=902918&r1=902917&r2=902918&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java Mon Jan 25 18:37:35 2010
@@ -398,9 +398,11 @@
             throw new IllegalArgumentException("inputStream is null.");
         }
 
-        if (root != null) {
-            throw new IllegalStateException("Serializer must be reset.");
-        }
+        // Reset the serializer
+        namedObjects.clear();
+        namedSerializers.clear();
+        root = null;
+        language = DEFAULT_LANGUAGE;
 
         // Parse the XML stream
         element = null;
@@ -455,6 +457,9 @@
             bindable.initialize();
         }
 
+        // Clear the location
+        location = null;
+
         return root;
     }
 
@@ -1172,16 +1177,6 @@
             && namedSerializers.isEmpty();
     }
 
-    public void reset() {
-        location = null;
-
-        namedObjects.clear();
-        namedSerializers.clear();
-
-        root = null;
-        language = DEFAULT_LANGUAGE;
-    }
-
     /**
      * Retrieves the root of the object hierarchy most recently processed by
      * this serializer.