You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2012/01/26 17:57:03 UTC

svn commit: r1236286 - in /pivot/trunk/tests/src/org/apache/pivot/tests/issues: Pivot837.java pivot_837.bxml

Author: smartini
Date: Thu Jan 26 16:57:02 2012
New Revision: 1236286

URL: http://svn.apache.org/viewvc?rev=1236286&view=rev
Log:
PIVOT-837, add test case

Added:
    pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot837.java
    pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_837.bxml

Added: pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot837.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot837.java?rev=1236286&view=auto
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot837.java (added)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot837.java Thu Jan 26 16:57:02 2012
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.pivot.tests.issues;
+
+import org.apache.pivot.beans.BXMLSerializer;
+import org.apache.pivot.collections.Map;
+import org.apache.pivot.wtk.Application;
+import org.apache.pivot.wtk.DesktopApplicationContext;
+import org.apache.pivot.wtk.Display;
+import org.apache.pivot.wtk.Window;
+
+public class Pivot837 implements Application 
+{
+
+    public void startup(Display display, Map<String, String> properties) throws Exception {
+		BXMLSerializer bxmlSerializer = new BXMLSerializer();
+		Window window = (Window) bxmlSerializer.readObject(getClass().getResource("pivot_837.bxml"));
+		window.open(display);
+	}
+
+	public boolean shutdown(boolean optional) throws Exception {
+		return false;
+	}
+
+	public void suspend() throws Exception {
+	}
+
+	public void resume() throws Exception {
+	}
+
+	public static void main(String[] args) {
+		DesktopApplicationContext.main(Pivot837.class, args);
+	}
+
+}

Added: pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_837.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_837.bxml?rev=1236286&view=auto
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_837.bxml (added)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_837.bxml Thu Jan 26 16:57:02 2012
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<Window title="Pivot-837" maximized="true"
+    xmlns:bxml="http://pivot.apache.org/bxml"
+    xmlns:content="org.apache.pivot.wtk.content"
+    xmlns="org.apache.pivot.wtk"
+>
+
+    <TabPane styles="{tabOrientation:'vertical'}">
+        <corner>
+            <BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'top'}">
+                <PushButton buttonData="+"/>
+            </BoxPane>
+        </corner>
+
+        <BoxPane>
+            <TabPane.tabData>
+                <content:ButtonData text="Tab 1"/>
+            </TabPane.tabData>
+        </BoxPane>
+        <BoxPane>
+            <TabPane.tabData>
+                <content:ButtonData text="Tab 2"/>
+            </TabPane.tabData>
+        </BoxPane>
+    </TabPane>
+
+</Window>