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/17 17:37:44 UTC
svn commit: r1232467 - in
/pivot/trunk/tests/src/org/apache/pivot/tests/issues: Pivot835.java
pivot_835.bxml
Author: smartini
Date: Tue Jan 17 16:37:43 2012
New Revision: 1232467
URL: http://svn.apache.org/viewvc?rev=1232467&view=rev
Log:
PIVOT-835, test case
Added:
pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot835.java
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_835.bxml
Added: pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot835.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot835.java?rev=1232467&view=auto
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot835.java (added)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot835.java Tue Jan 17 16:37:43 2012
@@ -0,0 +1,48 @@
+/*
+ * 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 Pivot835 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_835.bxml"));
+ window.open(display);
+ }
+
+ public boolean shutdown(boolean b) throws Exception {
+ return false;
+ }
+
+ public void suspend() throws Exception {
+ }
+
+ public void resume() throws Exception {
+ }
+
+ public static void main(String[] args) {
+ DesktopApplicationContext.main(Pivot835.class, args);
+ }
+
+}
Added: pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_835.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_835.bxml?rev=1232467&view=auto
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_835.bxml (added)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_835.bxml Tue Jan 17 16:37:43 2012
@@ -0,0 +1,39 @@
+<?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="TextPane example" maximized="true" xmlns:text="org.apache.pivot.wtk.text" xmlns="org.apache.pivot.wtk">
+ <TablePane>
+ <columns>
+ <TablePane.Column width="1*"/>
+ </columns>
+
+ <TablePane.Row height="1*">
+ <Border styles="{color:10}">
+ <ScrollPane horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fill_to_capacity">
+ <TextPane tooltipText="Enter character, than press Enter key and try to enter another character">
+ <text:Document>
+ <text:Paragraph>
+ <text:TextNode text="Some text ..."/>
+ </text:Paragraph>
+ </text:Document>
+ </TextPane>
+ </ScrollPane>
+ </Border>
+ </TablePane.Row>
+ </TablePane>
+</Window>