You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/11/19 19:43:14 UTC

svn commit: r882240 - in /incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer: ComponentExplorer.java component_explorer.wtkx

Author: tvolkert
Date: Thu Nov 19 18:43:14 2009
New Revision: 882240

URL: http://svn.apache.org/viewvc?rev=882240&view=rev
Log:
Minor update to component explorer

Modified:
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/ComponentExplorer.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/component_explorer.wtkx

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/ComponentExplorer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/ComponentExplorer.java?rev=882240&r1=882239&r2=882240&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/ComponentExplorer.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/ComponentExplorer.java Thu Nov 19 18:43:14 2009
@@ -44,6 +44,7 @@
 import org.apache.pivot.wtk.Mouse;
 import org.apache.pivot.wtk.ScrollPane;
 import org.apache.pivot.wtk.ScrollPane.ScrollBarPolicy;
+import org.apache.pivot.wtk.SplitPane;
 import org.apache.pivot.wtk.TextArea;
 import org.apache.pivot.wtk.TreeView;
 import org.apache.pivot.wtk.TreeViewSelectionListener;
@@ -54,6 +55,7 @@
 
 public class ComponentExplorer implements Application {
     private Window window = null;
+    private SplitPane splitPane = null;
     private TreeView treeView = null;
     private ScrollPane contentScrollPane = null;
     private Border contentPane = null;
@@ -84,6 +86,7 @@
         WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
         window = (Window)wtkxSerializer.readObject(this, "component_explorer.wtkx");
 
+        splitPane = wtkxSerializer.getValue("splitPane");
         treeView = wtkxSerializer.getValue("treeView");
         contentScrollPane = wtkxSerializer.getValue("contentScrollPane");
         contentPane = wtkxSerializer.getValue("contentPane");
@@ -285,6 +288,9 @@
                     // class property was set; open the corresponding
                     // component node
                     if (componentNode.getText().equals(classProperty)) {
+                        splitPane.setSplitRatio(0);
+                        splitPane.setLocked(true);
+
                         initialSelectedPath = path;
                         break;
                     }

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/component_explorer.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/component_explorer.wtkx?rev=882240&r1=882239&r2=882240&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/component_explorer.wtkx (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/component_explorer.wtkx Thu Nov 19 18:43:14 2009
@@ -24,7 +24,7 @@
     xmlns="org.apache.pivot.wtk">
     <content>
         <CardPane styles="{padding:3}">
-            <SplitPane orientation="horizontal" splitRatio="0.25">
+            <SplitPane wtkx:id="splitPane" orientation="horizontal" splitRatio="0.25">
                 <left>
                     <TabPane>
                         <tabs>