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/10/30 17:49:37 UTC
svn commit: r831382 - in
/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer:
ComponentExplorer.java component_explorer.wtkx
Author: tvolkert
Date: Fri Oct 30 16:49:36 2009
New Revision: 831382
URL: http://svn.apache.org/viewvc?rev=831382&view=rev
Log:
Updated UE of component explorer
Modified:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/ComponentExplorer.java
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx
Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/ComponentExplorer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/ComponentExplorer.java?rev=831382&r1=831381&r2=831382&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/ComponentExplorer.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/ComponentExplorer.java Fri Oct 30 16:49:36 2009
@@ -21,6 +21,7 @@
import org.apache.pivot.collections.List;
import org.apache.pivot.collections.Map;
import org.apache.pivot.collections.Sequence;
+import org.apache.pivot.collections.Sequence.Tree;
import org.apache.pivot.collections.Sequence.Tree.Path;
import org.apache.pivot.serialization.SerializationException;
import org.apache.pivot.tools.wtk.ComponentPropertyInspector;
@@ -104,7 +105,7 @@
if (path != null) {
List<?> treeData = treeView.getTreeData();
- Object treeNode = Sequence.Tree.get(treeData, path);
+ Object treeNode = Tree.get(treeData, path);
if (treeNode instanceof List<?>) {
treeView.setBranchExpanded(path, !treeView.isBranchExpanded(path));
@@ -118,7 +119,18 @@
treeView.expandAll();
+ Tree.ItemIterator<?> itemIterator = Tree.depthFirstIterator(treeView.getTreeData());
+ while (itemIterator.hasNext()) {
+ Object node = itemIterator.next();
+ if (node instanceof ComponentNode) {
+ treeView.setSelectedPath(itemIterator.getPath());
+ break;
+ }
+ }
+
window.open(display);
+
+ treeView.requestFocus();
}
@Override
Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx?rev=831382&r1=831381&r2=831382&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx Fri Oct 30 16:49:36 2009
@@ -185,67 +185,73 @@
</Border>
</left>
<right>
- <TablePane styles="{verticalSpacing:6}">
- <columns>
- <TablePane.Column width="1*"/>
- </columns>
- <rows>
- <TablePane.Row height="1*">
- <Border>
- <content>
- <ScrollPane wtkx:id="scrollPane">
- <view>
- <Border wtkx:id="contentPane"
- styles="{thickness:0, padding:6}"/>
- </view>
- </ScrollPane>
- </content>
- </Border>
- </TablePane.Row>
- <TablePane.Row>
- <TabPane styles="{collapsible:true}">
- <tabs>
- <Border TabPane.label="%properties" preferredHeight="250">
+ <SplitPane orientation="vertical" splitRatio="0.6">
+ <top>
+ <TablePane styles="{horizontalSpacing:6}">
+ <columns>
+ <TablePane.Column width="1*"/>
+ <TablePane.Column/>
+ </columns>
+ <rows>
+ <TablePane.Row height="1*">
+ <Border>
<content>
- <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
+ <ScrollPane wtkx:id="scrollPane">
<view>
- <CardPane styles="{padding:10}">
- <tools:ComponentPropertyInspector
- wtkx:id="componentPropertyInspector"/>
- </CardPane>
+ <Border wtkx:id="contentPane"
+ styles="{thickness:0, padding:6}"/>
</view>
</ScrollPane>
</content>
</Border>
- <Border TabPane.label="%styles" preferredHeight="250">
- <content>
- <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
- <view>
- <CardPane styles="{padding:10}">
- <tools:ComponentStyleInspector
- wtkx:id="componentStyleInspector"/>
- </CardPane>
- </view>
- </ScrollPane>
- </content>
- </Border>
- <Border TabPane.label="%events" preferredHeight="250">
- <content>
- <ScrollPane horizontalScrollBarPolicy="fill"
- verticalScrollBarPolicy="fill">
- <view>
- <CardPane styles="{padding:10}">
- <tools:EventLogger wtkx:id="eventLogger"/>
- </CardPane>
- </view>
- </ScrollPane>
- </content>
- </Border>
- </tabs>
- </TabPane>
- </TablePane.Row>
- </rows>
- </TablePane>
+ <TabPane selectedIndex="-1"
+ styles="{collapsible:true, tabOrientation:'vertical'}">
+ <tabs>
+ <Border TabPane.label="%properties">
+ <content>
+ <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
+ <view>
+ <CardPane styles="{padding:10}">
+ <tools:ComponentPropertyInspector
+ wtkx:id="componentPropertyInspector"/>
+ </CardPane>
+ </view>
+ </ScrollPane>
+ </content>
+ </Border>
+ <Border TabPane.label="%styles">
+ <content>
+ <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
+ <view>
+ <CardPane styles="{padding:10}">
+ <tools:ComponentStyleInspector
+ wtkx:id="componentStyleInspector"/>
+ </CardPane>
+ </view>
+ </ScrollPane>
+ </content>
+ </Border>
+ </tabs>
+ </TabPane>
+ </TablePane.Row>
+ </rows>
+ </TablePane>
+ </top>
+ <bottom>
+ <Border>
+ <content>
+ <ScrollPane horizontalScrollBarPolicy="fill"
+ verticalScrollBarPolicy="fill">
+ <view>
+ <CardPane styles="{padding:10}">
+ <tools:EventLogger wtkx:id="eventLogger"/>
+ </CardPane>
+ </view>
+ </ScrollPane>
+ </content>
+ </Border>
+ </bottom>
+ </SplitPane>
</right>
</SplitPane>
</content>