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/03 15:18:13 UTC
svn commit: r832425 - in /incubator/pivot/trunk:
demos/src/org/apache/pivot/demos/explorer/
demos/src/org/apache/pivot/demos/explorer/basic/
demos/src/org/apache/pivot/demos/explorer/filebrowsing/
demos/src/org/apache/pivot/demos/explorer/separators/ d...
Author: tvolkert
Date: Tue Nov 3 14:18:12 2009
New Revision: 832425
URL: http://svn.apache.org/viewvc?rev=832425&view=rev
Log:
Updates to component explorer; minor fixes to component inspector and color chooser skin
Added:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/image_view.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/label.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/file_browser.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/separator.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/table_view.wtkx
Modified:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/text/text_area.wtkx
incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserSkin.java
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/image_view.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/image_view.wtkx?rev=832425&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/image_view.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/image_view.wtkx Tue Nov 3 14:18:12 2009
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<ImageView image="org/apache/pivot/demos/explorer/IMG_0725_2.jpg"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/label.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/label.wtkx?rev=832425&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/label.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/basic/label.wtkx Tue Nov 3 14:18:12 2009
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<Label text="Hello World!"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
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=832425&r1=832424&r2=832425&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 Tue Nov 3 14:18:12 2009
@@ -39,6 +39,22 @@
</nodeRenderer>
<treeData>
<content:TreeBranch>
+ <content:TreeBranch
+ text="Labels & Image Views"
+ icon="@folder.png">
+ <explorer:ComponentNode
+ text="Label"
+ icon="@page_white.png"
+ src="@basic/label.wtkx"
+ horizontalScrollBarPolicy="fill"
+ verticalScrollBarPolicy="fill"/>
+ <explorer:ComponentNode
+ text="ImageView"
+ icon="@page_white.png"
+ src="@basic/image_view.wtkx"
+ horizontalScrollBarPolicy="fill"
+ verticalScrollBarPolicy="fill"/>
+ </content:TreeBranch>
<content:TreeBranch text="Buttons"
icon="@folder.png">
<explorer:ComponentNode
@@ -96,6 +112,15 @@
horizontalScrollBarPolicy="fill"
verticalScrollBarPolicy="fill_to_capacity"/>
</content:TreeBranch>
+ <content:TreeBranch text="Separators"
+ icon="@folder.png">
+ <explorer:ComponentNode
+ text="Separator"
+ icon="@page_white.png"
+ src="@separators/separator.wtkx"
+ horizontalScrollBarPolicy="fill"
+ verticalScrollBarPolicy="auto"/>
+ </content:TreeBranch>
<content:TreeBranch text="Layout Containers"
icon="@folder.png">
<explorer:ComponentNode
@@ -286,6 +311,12 @@
<content:TreeBranch
text="Tables"
icon="@folder.png">
+ <explorer:ComponentNode
+ text="TableView"
+ icon="@page_white.png"
+ src="@tables/table_view.wtkx"
+ horizontalScrollBarPolicy="fill_to_capacity"
+ verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
<content:TreeBranch
text="Trees"
@@ -297,6 +328,16 @@
horizontalScrollBarPolicy="fill_to_capacity"
verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
+ <content:TreeBranch
+ text="File Browsing"
+ icon="@folder.png">
+ <explorer:ComponentNode
+ text="FileBrowser"
+ icon="@page_white.png"
+ src="@filebrowsing/file_browser.wtkx"
+ horizontalScrollBarPolicy="fill"
+ verticalScrollBarPolicy="auto"/>
+ </content:TreeBranch>
</content:TreeBranch>
</treeData>
</TreeView>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/file_browser.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/file_browser.wtkx?rev=832425&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/file_browser.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/filebrowsing/file_browser.wtkx Tue Nov 3 14:18:12 2009
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<FileBrowser
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/separator.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/separator.wtkx?rev=832425&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/separator.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/separators/separator.wtkx Tue Nov 3 14:18:12 2009
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<Separator xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/table_view.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/table_view.wtkx?rev=832425&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/table_view.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/tables/table_view.wtkx Tue Nov 3 14:18:12 2009
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<TableView xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk">
+ <columns>
+ <TableView.Column name="i" width="75"/>
+ <TableView.Column name="a" width="75"/>
+ <TableView.Column name="b" width="75"/>
+ <TableView.Column name="c" width="75"/>
+ <TableView.Column name="d" width="1*"/>
+ </columns>
+ <componentListeners>
+ <wtkx:script>
+ <![CDATA[
+ importClass(org.apache.pivot.collections.ArrayList);
+ importClass(org.apache.pivot.collections.HashMap);
+
+ function parentChanged(component, previousParent) {
+ if (component.getParent() != null) {
+ var tableData = new ArrayList();
+
+ for (var i = 0; i < 500; i++) {
+ var row = new HashMap();
+ row.put("i", new String(i));
+ row.put("a", new String(Math.floor(Math.random() * 100)));
+ row.put("b", new String(Math.floor(Math.random() * 1000)));
+ row.put("c", new String(Math.floor(Math.random() * 10000)));
+ tableData.add(row);
+ }
+
+ component.setTableData(tableData);
+ }
+ }
+ ]]>
+ </wtkx:script>
+ </componentListeners>
+</TableView>
Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/text/text_area.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/text/text_area.wtkx?rev=832425&r1=832424&r2=832425&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/text/text_area.wtkx (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/text/text_area.wtkx Tue Nov 3 14:18:12 2009
@@ -16,6 +16,27 @@
limitations under the License.
-->
-<TextArea
- xmlns:validation="org.apache.pivot.wtk.text.validation"
- xmlns="org.apache.pivot.wtk"/>
+<TextArea xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk">
+ <componentListeners>
+ <wtkx:script>
+ <![CDATA[
+ function parentChanged(component, previousParent) {
+ if (component.getParent() != null) {
+ component.setText("Lorem ipsum dolor sit amet, consetetur\n" +
+ "sadipscing elitr, sed diam nonumy eirmod\n" +
+ "tempor invidunt ut labore et dolore magna\n" +
+ "aliquyam erat, sed diam voluptua. At vero\n" +
+ "eos et accusam et justo duo dolores et ea\n" +
+ "rebum. Stet clita kasd gubergren, no sea\n" +
+ "takimata sanctus est Lorem ipsum dolor sit\n" +
+ "amet.\n" +
+ "\n" +
+ "Stet clita kasd gubergren, no sea takimata\n" +
+ "sanctus est Lorem ipsum dolor sit amet.");
+ }
+ }
+ ]]>
+ </wtkx:script>
+ </componentListeners>
+</TextArea>
Modified: incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java?rev=832425&r1=832424&r2=832425&view=diff
==============================================================================
--- incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java (original)
+++ incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java Tue Nov 3 14:18:12 2009
@@ -570,8 +570,8 @@
boxPane.add(flowPane);
TextInput textInput = new TextInput();
- textInput.setTextSize(3);
- textInput.setMaximumLength(4);
+ textInput.setTextSize(4);
+ textInput.setMaximumLength(5);
textInput.setValidator(new IntValidator());
textInput.setText(String.valueOf(dimensions.width));
flowPane.add(textInput);
@@ -604,8 +604,8 @@
boxPane.add(flowPane);
textInput = new TextInput();
- textInput.setTextSize(3);
- textInput.setMaximumLength(4);
+ textInput.setTextSize(4);
+ textInput.setMaximumLength(5);
textInput.setValidator(new IntValidator());
textInput.setText(String.valueOf(dimensions.height));
flowPane.add(textInput);
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserSkin.java?rev=832425&r1=832424&r2=832425&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserSkin.java Tue Nov 3 14:18:12 2009
@@ -106,6 +106,15 @@
}
@Override
+ public void mouseOut(Component component) {
+ super.mouseOut(component);
+
+ if (Mouse.getCapturer() != component) {
+ capture = false;
+ }
+ }
+
+ @Override
public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
boolean consumed = super.mouseDown(component, button, x, y);
@@ -243,6 +252,15 @@
}
@Override
+ public void mouseOut(Component component) {
+ super.mouseOut(component);
+
+ if (Mouse.getCapturer() != component) {
+ capture = false;
+ }
+ }
+
+ @Override
public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
boolean consumed = super.mouseDown(component, button, x, y);