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 23:11:32 UTC
svn commit: r831470 - in /incubator/pivot/trunk:
demos/src/org/apache/pivot/demos/explorer/
demos/src/org/apache/pivot/demos/explorer/boundedrange/
demos/src/org/apache/pivot/demos/explorer/calendars/
demos/src/org/apache/pivot/demos/explorer/colorchoo...
Author: tvolkert
Date: Fri Oct 30 22:11:31 2009
New Revision: 831470
URL: http://svn.apache.org/viewvc?rev=831470&view=rev
Log:
Fixed small bugs in TerraScrollBarSkin, TerraSpinnerSkin, and TerraTreeViewSkin, added CalendarDate type support to ComponentInspector, added components to component explorer
Added:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/slider.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/spinner.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar_button.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser_button.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_bar.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_button.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/
- copied from r831449, incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/treeview/
Removed:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/folder.png
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/page_white.png
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/treeview/
Modified:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/component_explorer.wtkx
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/tree_view.wtkx
incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/ComponentInspectorSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/slider.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/slider.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/slider.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/slider.wtkx Fri Oct 30 22:11:31 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.
+-->
+
+<Slider range="{start:0, end:255}" value="0"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/spinner.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/spinner.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/spinner.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/boundedrange/spinner.wtkx Fri Oct 30 22:11:31 2009
@@ -0,0 +1,22 @@
+<?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.
+-->
+
+<Spinner spinnerData="['One', 'Two', 'Three', 'Four', 'Five']"
+ circular="true" selectedIndex="0"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar.wtkx Fri Oct 30 22:11:31 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.
+-->
+
+<Calendar xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar_button.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/calendars/calendar_button.wtkx Fri Oct 30 22:11:31 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.
+-->
+
+<CalendarButton xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser.wtkx Fri Oct 30 22:11:31 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.
+-->
+
+<ColorChooser selectedColor="#57cd83"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns="org.apache.pivot.wtk"/>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser_button.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/colorchoosers/color_chooser_button.wtkx Fri Oct 30 22:11:31 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.
+-->
+
+<ColorChooserButton selectedColor="#57cd83"
+ 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=831470&r1=831469&r2=831470&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 22:11:31 2009
@@ -188,21 +188,64 @@
src="@boundedrange/scroll_bar.wtkx"
horizontalScrollBarPolicy="auto"
verticalScrollBarPolicy="auto"/>
+ <explorer:ComponentNode text="Slider"
+ icon="@page_white.png"
+ src="@boundedrange/slider.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
+ <explorer:ComponentNode text="Spinner"
+ icon="@page_white.png"
+ src="@boundedrange/spinner.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
<content:TreeBranch text="Calendars"
icon="@folder.png">
+ <explorer:ComponentNode text="Calendar"
+ icon="@page_white.png"
+ src="@calendars/calendar.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
+ <explorer:ComponentNode text="CalendarButton"
+ icon="@page_white.png"
+ src="@calendars/calendar_button.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
+ </content:TreeBranch>
+ <content:TreeBranch text="Color Choosers"
+ icon="@folder.png">
+ <explorer:ComponentNode text="ColorChooser"
+ icon="@page_white.png"
+ src="@colorchoosers/color_chooser.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
+ <explorer:ComponentNode text="ColorChooserButton"
+ icon="@page_white.png"
+ src="@colorchoosers/color_chooser_button.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
<content:TreeBranch text="Menus"
icon="@folder.png">
+ <explorer:ComponentNode text="MenuBar"
+ icon="@page_white.png"
+ src="@menus/menu_bar.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
+ <explorer:ComponentNode text="MenuButton"
+ icon="@page_white.png"
+ src="@menus/menu_button.wtkx"
+ horizontalScrollBarPolicy="auto"
+ verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
- <content:TreeBranch text="Table Views"
+ <content:TreeBranch text="Tables"
icon="@folder.png">
</content:TreeBranch>
- <content:TreeBranch text="Tree Views"
+ <content:TreeBranch text="Trees"
icon="@folder.png">
<explorer:ComponentNode text="TreeView"
icon="@page_white.png"
- src="@treeview/tree_view.wtkx"
+ src="@trees/tree_view.wtkx"
horizontalScrollBarPolicy="fill_to_capacity"
verticalScrollBarPolicy="auto"/>
</content:TreeBranch>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_bar.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_bar.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_bar.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_bar.wtkx Fri Oct 30 22:11:31 2009
@@ -0,0 +1,74 @@
+<?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.
+-->
+
+<MenuBar styles="{backgroundColor:11}"
+ xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk">
+ <items>
+ <MenuBar.Item buttonData="File">
+ <menu>
+ <Menu>
+ <sections>
+ <Menu.Section>
+ <Menu.Item>
+ <buttonData>
+ <content:ButtonData text="New"/>
+ </buttonData>
+ </Menu.Item>
+ <Menu.Item>
+ <buttonData>
+ <content:ButtonData text="Open"/>
+ </buttonData>
+ </Menu.Item>
+ </Menu.Section>
+ </sections>
+ </Menu>
+ </menu>
+ </MenuBar.Item>
+
+ <MenuBar.Item buttonData="Edit">
+ <menu>
+ <Menu>
+ <sections>
+ <Menu.Section>
+ <Menu.Item>
+ <buttonData>
+ <content:MenuItemData text="Cut"
+ keyboardShortcut="CTRL-X"/>
+ </buttonData>
+ </Menu.Item>
+ <Menu.Item>
+ <buttonData>
+ <content:MenuItemData text="Copy"
+ keyboardShortcut="CTRL-C"/>
+ </buttonData>
+ </Menu.Item>
+ <Menu.Item>
+ <buttonData>
+ <content:MenuItemData text="Paste"
+ keyboardShortcut="CTRL-V"/>
+ </buttonData>
+ </Menu.Item>
+ </Menu.Section>
+ </sections>
+ </Menu>
+ </menu>
+ </MenuBar.Item>
+ </items>
+</MenuBar>
Added: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_button.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_button.wtkx?rev=831470&view=auto
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_button.wtkx (added)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/menus/menu_button.wtkx Fri Oct 30 22:11:31 2009
@@ -0,0 +1,49 @@
+<?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.
+-->
+
+<MenuButton xmlns:wtkx="http://pivot.apache.org/wtkx"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk">
+ <buttonData>
+ <content:ButtonData icon="@coins.png" text="Finances"/>
+ </buttonData>
+ <menu>
+ <Menu>
+ <sections>
+ <Menu.Section>
+ <Menu.Item buttonData="Earn Money"/>
+ <Menu.Item buttonData="Steal Money"/>
+ <Menu.Item buttonData="Borrow Money"/>
+ <Menu.Item buttonData="Gamble">
+ <menu>
+ <Menu>
+ <sections>
+ <Menu.Section>
+ <Menu.Item buttonData="Track"/>
+ <Menu.Item buttonData="Casino"/>
+ <Menu.Item buttonData="Stock Market"/>
+ </Menu.Section>
+ </sections>
+ </Menu>
+ </menu>
+ </Menu.Item>
+ </Menu.Section>
+ </sections>
+ </Menu>
+ </menu>
+</MenuButton>
Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/tree_view.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/tree_view.wtkx?rev=831470&r1=831449&r2=831470&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/tree_view.wtkx (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/explorer/trees/tree_view.wtkx Fri Oct 30 22:11:31 2009
@@ -26,48 +26,48 @@
</nodeRenderer>
<treeData>
<content:TreeBranch>
- <content:TreeBranch text="Activity" icon="@folder.png">
- <content:TreeBranch text="Games" icon="@folder.png">
- <content:TreeNode text="Foosball" icon="@page_white.png"/>
- <content:TreeNode text="A very long game name that just serves to show how a wide tree node behaves" icon="@page_white.png"/>
- <content:TreeNode text="Ping Pong" icon="@page_white.png"/>
- <content:TreeNode text="Air Hockey" icon="@page_white.png"/>
+ <content:TreeBranch text="Activity" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeBranch text="Games" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeNode text="Foosball" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="A very long game name that just serves to show how a wide tree node behaves" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Ping Pong" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Air Hockey" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
- <content:TreeBranch text="Sports" icon="@folder.png">
- <content:TreeNode text="Baseball" icon="@page_white.png"/>
- <content:TreeNode text="Basketball" icon="@page_white.png"/>
- <content:TreeNode text="Football" icon="@page_white.png"/>
- <content:TreeNode text="Ice Hockey" icon="@page_white.png"/>
- <content:TreeNode text="Soccer" icon="@page_white.png"/>
- <content:TreeNode text="Softball" icon="@page_white.png"/>
+ <content:TreeBranch text="Sports" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeNode text="Baseball" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Basketball" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Football" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Ice Hockey" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Soccer" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Softball" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
- <content:TreeNode text="Camping" icon="@page_white.png"/>
- <content:TreeNode text="Skiing" icon="@page_white.png"/>
+ <content:TreeNode text="Camping" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Skiing" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
- <content:TreeBranch text="Occasion" icon="@folder.png">
- <content:TreeBranch text="Holidays" icon="@folder.png">
- <content:TreeNode text="Christmas" icon="@page_white.png"/>
- <content:TreeNode text="Independence Day" icon="@page_white.png"/>
- <content:TreeNode text="Labor Day" icon="@page_white.png"/>
- <content:TreeNode text="New Year's Day" icon="@page_white.png"/>
- <content:TreeNode text="President's Day" icon="@page_white.png"/>
- <content:TreeNode text="Thanksgiving" icon="@page_white.png"/>
- <content:TreeNode text="Valentine's Day" icon="@page_white.png"/>
- <content:TreeNode text="Veteran's Day" icon="@page_white.png"/>
+ <content:TreeBranch text="Occasion" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeBranch text="Holidays" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeNode text="Christmas" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Independence Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Labor Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="New Year's Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="President's Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Thanksgiving" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Valentine's Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Veteran's Day" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
- <content:TreeNode text="Anniversary" icon="@page_white.png"/>
- <content:TreeNode text="Birthday" icon="@page_white.png"/>
- <content:TreeNode text="Wedding" icon="@page_white.png"/>
+ <content:TreeNode text="Anniversary" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Birthday" icon="org/apache/pivot/demos/explorer/page_white.png"/>
+ <content:TreeNode text="Wedding" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
- <content:TreeBranch text="Location" icon="@folder.png">
- <content:TreeNode text="Africa" icon="@folder.png"/>
- <content:TreeNode text="Antarctica" icon="@folder.png"/>
- <content:TreeNode text="Asia" icon="@folder.png"/>
- <content:TreeNode text="Australia" icon="@folder.png"/>
- <content:TreeNode text="Europe" icon="@folder.png"/>
- <content:TreeNode text="North America" icon="@folder.png"/>
- <content:TreeBranch text="South America" icon="@folder.png">
- <content:TreeNode text="Peru" icon="@page_white.png"/>
+ <content:TreeBranch text="Location" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeNode text="Africa" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeNode text="Antarctica" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeNode text="Asia" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeNode text="Australia" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeNode text="Europe" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeNode text="North America" icon="org/apache/pivot/demos/explorer/folder.png"/>
+ <content:TreeBranch text="South America" icon="org/apache/pivot/demos/explorer/folder.png">
+ <content:TreeNode text="Peru" icon="org/apache/pivot/demos/explorer/page_white.png"/>
</content:TreeBranch>
</content:TreeBranch>
</content:TreeBranch>
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=831470&r1=831469&r2=831470&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 Fri Oct 30 22:11:31 2009
@@ -21,9 +21,12 @@
import org.apache.pivot.collections.Dictionary;
import org.apache.pivot.collections.EnumList;
import org.apache.pivot.collections.HashMap;
+import org.apache.pivot.util.CalendarDate;
import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Button;
import org.apache.pivot.wtk.ButtonStateListener;
+import org.apache.pivot.wtk.CalendarButton;
+import org.apache.pivot.wtk.CalendarButtonSelectionListener;
import org.apache.pivot.wtk.Checkbox;
import org.apache.pivot.wtk.ColorChooserButton;
import org.apache.pivot.wtk.ColorChooserButtonSelectionListener;
@@ -156,6 +159,8 @@
control = addScopeControl(dictionary, key, section);
} else if (type == Color.class) {
control = addColorControl(dictionary, key, section);
+ } else if (type == CalendarDate.class) {
+ control = addCalendarDateControl(dictionary, key, section);
}
if (control != null) {
@@ -210,6 +215,10 @@
updateSpanControl(dictionary, key);
} else if (type == Scope.class) {
updateScopeControl(dictionary, key);
+ } else if (type == Color.class) {
+ updateColorControl(dictionary, key);
+ } else if (type == CalendarDate.class) {
+ updateCalendarDateControl(dictionary, key);
}
}
@@ -1286,6 +1295,51 @@
return colorChooserButton;
}
+ private void updateColorControl(Dictionary<String, Object> dictionary, String key) {
+ ColorChooserButton colorChooserButton = (ColorChooserButton)controls.get(key);
+
+ if (colorChooserButton != null) {
+ Color value = (Color)dictionary.get(key);
+ colorChooserButton.setSelectedColor(value);
+ }
+ }
+
+ private Component addCalendarDateControl(final Dictionary<String, Object> dictionary,
+ final String key, Form.Section section) {
+ CalendarDate calendarDate = (CalendarDate)dictionary.get(key);
+
+ CalendarButton calendarButton = new CalendarButton();
+ calendarButton.setMinimumPreferredWidth(75);
+ calendarButton.setSelectedDate(calendarDate);
+ section.add(calendarButton);
+ Form.setLabel(calendarButton, key);
+
+ calendarButton.getCalendarButtonSelectionListeners().add
+ (new CalendarButtonSelectionListener() {
+ @Override
+ public void selectedDateChanged(CalendarButton calendarButton,
+ CalendarDate previousSelectedDate) {
+ try {
+ dictionary.put(key, calendarButton.getSelectedDate());
+ } catch (Exception exception) {
+ displayErrorMessage(exception, calendarButton.getWindow());
+ dictionary.put(key, previousSelectedDate);
+ }
+ }
+ });
+
+ return calendarButton;
+ }
+
+ private void updateCalendarDateControl(Dictionary<String, Object> dictionary, String key) {
+ CalendarButton calendarButton = (CalendarButton)controls.get(key);
+
+ if (calendarButton != null) {
+ CalendarDate value = (CalendarDate)dictionary.get(key);
+ calendarButton.setSelectedDate(value);
+ }
+ }
+
private void displayErrorMessage(Exception exception, Window window) {
String message = exception.getLocalizedMessage();
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java?rev=831470&r1=831469&r2=831470&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java Fri Oct 30 22:11:31 2009
@@ -817,6 +817,10 @@
}
public void setMinimumHandleLength(int minimumHandleLength) {
+ if (minimumHandleLength <= 0) {
+ throw new IllegalArgumentException("minimumHandleLength must be positive.");
+ }
+
if (minimumHandleLength != this.minimumHandleLength) {
this.minimumHandleLength = minimumHandleLength;
invalidateComponent();
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java?rev=831470&r1=831469&r2=831470&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java Fri Oct 30 22:11:31 2009
@@ -796,7 +796,7 @@
public void setSizeToContent(boolean sizeToContent) {
this.sizeToContent = sizeToContent;
- invalidateComponent();
+ invalidateContent();
}
// Spinner.Skin methods
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java?rev=831470&r1=831469&r2=831470&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java Fri Oct 30 22:11:31 2009
@@ -16,6 +16,7 @@
*/
package org.apache.pivot.wtk.skin.terra;
+import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
@@ -435,7 +436,6 @@
private boolean showHighlight;
private boolean showBranchControls;
private Color branchControlColor;
- private Color branchControlDisabledColor;
private Color branchControlSelectionColor;
private Color branchControlInactiveSelectionColor;
private Color gridColor;
@@ -471,7 +471,6 @@
showHighlight = true;
showBranchControls = true;
branchControlColor = theme.getColor(18);
- branchControlDisabledColor = theme.getColor(19);
branchControlSelectionColor = theme.getColor(4);
branchControlInactiveSelectionColor = theme.getColor(19);
gridColor = theme.getColor(11);
@@ -607,19 +606,14 @@
Color branchControlColor;
- if (treeView.isEnabled()
- && !disabled) {
- if (selected) {
- if (treeView.isFocused()) {
- branchControlColor = branchControlSelectionColor;
- } else {
- branchControlColor = branchControlInactiveSelectionColor;
- }
+ if (selected) {
+ if (treeView.isFocused()) {
+ branchControlColor = branchControlSelectionColor;
} else {
- branchControlColor = this.branchControlColor;
+ branchControlColor = branchControlInactiveSelectionColor;
}
} else {
- branchControlColor = branchControlDisabledColor;
+ branchControlColor = this.branchControlColor;
}
GeneralPath shape = new GeneralPath();
@@ -639,11 +633,17 @@
shape.closePath();
- graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ Graphics2D branchControlGraphics = (Graphics2D)graphics.create();
+ branchControlGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
- graphics.setPaint(branchControlColor);
-
- graphics.fill(shape);
+ if (!treeView.isEnabled()
+ || disabled) {
+ branchControlGraphics.setComposite
+ (AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
+ }
+ branchControlGraphics.setPaint(branchControlColor);
+ branchControlGraphics.fill(shape);
+ branchControlGraphics.dispose();
}
nodeX += indent + spacing;
@@ -1051,32 +1051,6 @@
setBranchControlColor(theme.getColor(branchControlColor));
}
- public Color getBranchControlDisabledColor() {
- return branchControlDisabledColor;
- }
-
- public void setBranchControlDisabledColor(Color branchControlDisabledColor) {
- if (branchControlDisabledColor == null) {
- throw new IllegalArgumentException("branchControlDisabledColor is null.");
- }
-
- this.branchControlDisabledColor = branchControlDisabledColor;
- repaintComponent();
- }
-
- public void setBranchControlDisabledColor(String branchControlDisabledColor) {
- if (branchControlDisabledColor == null) {
- throw new IllegalArgumentException("branchControlDisabledColor is null.");
- }
-
- setBranchControlDisabledColor(GraphicsUtilities.decodeColor(branchControlDisabledColor));
- }
-
- public final void setBranchControlDisabledColor(int branchControlDisabledColor) {
- TerraTheme theme = (TerraTheme)Theme.getTheme();
- setBranchControlDisabledColor(theme.getColor(branchControlDisabledColor));
- }
-
public Color getBranchControlSelectionColor() {
return branchControlSelectionColor;
}