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/27 19:03:38 UTC

svn commit: r830272 - in /incubator/pivot/trunk: demos/src/org/apache/pivot/demos/explorer/ demos/src/org/apache/pivot/demos/explorer/buttons/ demos/src/org/apache/pivot/demos/explorer/cardpane/ tools/src/org/apache/pivot/tools/wtk/

Author: tvolkert
Date: Tue Oct 27 18:03:37 2009
New Revision: 830272

URL: http://svn.apache.org/viewvc?rev=830272&view=rev
Log:
Updates to component explorer

Added:
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/checkbox.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/link_button.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/push_button.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/radio_button.wtkx
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/resultset_next.png   (with props)
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0725_2.jpg   (with props)
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0735_2.jpg   (with props)
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0767_2.jpg   (with props)
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/card_pane.wtkx
Modified:
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx
    incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/checkbox.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/checkbox.wtkx?rev=830272&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/checkbox.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/checkbox.wtkx Tue Oct 27 18:03:37 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.
+-->
+
+<Checkbox buttonData="Click Me!"
+    xmlns:wtkx="http://pivot.apache.org/wtkx"
+    xmlns="org.apache.pivot.wtk"/>

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/link_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/link_button.wtkx?rev=830272&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/link_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/link_button.wtkx Tue Oct 27 18:03:37 2009
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<LinkButton xmlns:wtkx="http://pivot.apache.org/wtkx"
+    xmlns:content="org.apache.pivot.wtk.content"
+    xmlns="org.apache.pivot.wtk">
+    <buttonData>
+        <content:ButtonData text="Click Me!" icon="@resultset_next.png"/>
+    </buttonData>
+</LinkButton>

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/push_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/push_button.wtkx?rev=830272&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/push_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/push_button.wtkx Tue Oct 27 18:03:37 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.
+-->
+
+<PushButton buttonData="Click Me!"
+    xmlns:wtkx="http://pivot.apache.org/wtkx"
+    xmlns="org.apache.pivot.wtk"/>

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/radio_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/radio_button.wtkx?rev=830272&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/radio_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/radio_button.wtkx Tue Oct 27 18:03:37 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.
+-->
+
+<RadioButton buttonData="Click Me!"
+    xmlns:wtkx="http://pivot.apache.org/wtkx"
+    xmlns="org.apache.pivot.wtk"/>

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/resultset_next.png
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/resultset_next.png?rev=830272&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/buttons/resultset_next.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0725_2.jpg
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0725_2.jpg?rev=830272&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0725_2.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0735_2.jpg
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0735_2.jpg?rev=830272&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0735_2.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0767_2.jpg
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0767_2.jpg?rev=830272&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/IMG_0767_2.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/card_pane.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/card_pane.wtkx?rev=830272&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/card_pane.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/cardpane/card_pane.wtkx Tue Oct 27 18:03:37 2009
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<CardPane xmlns:wtkx="http://pivot.apache.org/wtkx"
+    xmlns="org.apache.pivot.wtk">
+    <ImageView image="@IMG_0725_2.jpg"/>
+    <ImageView image="@IMG_0735_2.jpg"/>
+    <ImageView image="@IMG_0767_2.jpg"/>
+</CardPane>

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=830272&r1=830271&r2=830272&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 Oct 27 18:03:37 2009
@@ -37,6 +37,26 @@
                                         <content:TreeBranch>
                                             <content:TreeBranch text="Buttons"
                                                 icon="@folder.png">
+                                                <explorer:ComponentNode text="PushButton"
+                                                    icon="@magnifier.png"
+                                                    src="@buttons/push_button.wtkx"
+                                                    horizontalScrollBarPolicy="auto"
+                                                    verticalScrollBarPolicy="auto"/>
+                                                <explorer:ComponentNode text="RadioButton"
+                                                    icon="@magnifier.png"
+                                                    src="@buttons/radio_button.wtkx"
+                                                    horizontalScrollBarPolicy="auto"
+                                                    verticalScrollBarPolicy="auto"/>
+                                                <explorer:ComponentNode text="Checkbox"
+                                                    icon="@magnifier.png"
+                                                    src="@buttons/checkbox.wtkx"
+                                                    horizontalScrollBarPolicy="auto"
+                                                    verticalScrollBarPolicy="auto"/>
+                                                <explorer:ComponentNode text="LinkButton"
+                                                    icon="@magnifier.png"
+                                                    src="@buttons/link_button.wtkx"
+                                                    horizontalScrollBarPolicy="auto"
+                                                    verticalScrollBarPolicy="auto"/>
                                             </content:TreeBranch>
                                             <content:TreeBranch text="Lists"
                                                 icon="@folder.png">
@@ -74,6 +94,11 @@
                                             </content:TreeBranch>
                                             <content:TreeBranch text="Navigation Containers"
                                                 icon="@folder.png">
+                                                <explorer:ComponentNode text="CardPane"
+                                                    icon="@magnifier.png"
+                                                    src="@cardpane/card_pane.wtkx"
+                                                    horizontalScrollBarPolicy="fill"
+                                                    verticalScrollBarPolicy="fill"/>
                                             </content:TreeBranch>
                                             <content:TreeBranch text="Progress Indicators"
                                                 icon="@folder.png">

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=830272&r1=830271&r2=830272&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 Oct 27 18:03:37 2009
@@ -250,9 +250,20 @@
         Form.setLabel(checkbox, propertyName);
 
         checkbox.getButtonStateListeners().add(new ButtonStateListener() {
+            private boolean updating = false;
+
             @Override
             public void stateChanged(Button button, Button.State previousState) {
-                beanDictionary.put(propertyName, button.isSelected());
+                if (!updating) {
+                    updating = true;
+                    try {
+                        beanDictionary.put(propertyName, button.isSelected());
+                    } catch (Exception exception) {
+                        button.setState(previousState);
+                    } finally {
+                        updating = false;
+                    }
+                }
             }
         });
 
@@ -362,7 +373,6 @@
                     try {
                         beanDictionary.put(propertyName, textInput.getText());
                     } catch (Exception exception) {
-                        exception.printStackTrace();
                         String propertyValue = (String)beanDictionary.get(propertyName);
                         textInput.setText(propertyValue == null ? "" : propertyValue);
                     }
@@ -394,9 +404,20 @@
         Form.setLabel(listButton, propertyName);
 
         listButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener() {
+            private boolean updating = false;
+
             @Override
             public void selectedIndexChanged(ListButton listButton, int previousSelectedIndex) {
-                beanDictionary.put(propertyName, listButton.getSelectedItem());
+                if (!updating) {
+                    updating = true;
+                    try {
+                        beanDictionary.put(propertyName, listButton.getSelectedItem());
+                    } catch (Exception exception) {
+                        listButton.setSelectedIndex(previousSelectedIndex);
+                    } finally {
+                        updating = false;
+                    }
+                }
             }
         });