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/09/17 22:31:20 UTC
svn commit: r1386819 [1/2] - in
/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests: ./ issues/
Author: smartini
Date: Mon Sep 17 20:31:20 2012
New Revision: 1386819
URL: http://svn.apache.org/viewvc?rev=1386819&view=rev
Log:
Set svn props
Modified:
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_843_test.dib (props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/javascript_console_test.bxml (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/javascript_console_test.js (contents, props changed)
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/javascript_console_test.json (contents, props changed)
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java Mon Sep 17 20:31:20 2012
@@ -1,255 +1,255 @@
-/*
- * 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;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Locale;
-
-import org.apache.pivot.beans.BXMLSerializer;
-import org.apache.pivot.collections.Map;
-import org.apache.pivot.serialization.SerializationException;
-import org.apache.pivot.util.Resources;
-import org.apache.pivot.wtk.Application;
-import org.apache.pivot.wtk.DesktopApplicationContext;
-import org.apache.pivot.wtk.Display;
-import org.apache.pivot.wtk.Window;
-
-/**
- * Sample Test Application (not fully working) to show how to interact
- * between Java code and JavaScript code (interpreted by the JVM) inside bxml files.
- * Many things usually done in Java code are here shown but from the JS side.
- * <p>
- * Some utility methods present here could be moved in a dedicated utility class.
- * <p>
- * Note that there are many comments inside this and related sources,
- * and it's to show different ways to do the same things, even as iterative development.
- */
-public class JavascriptConsoleTest extends Application.Adapter {
- public static final String LANGUAGE_KEY = "language";
- public static final String MAIN_CLASS_NAME = JavascriptConsoleTest.class.getName();
-
- private Display display = null;
- private Window window = null;
-
- private Locale locale = null;
- private Resources resources = null;
-
- @Override
- public void startup(Display displayArgument, Map<String, String> properties) throws Exception {
- logObject("startup: start");
-
- this.display = displayArgument;
-
- // get the locale from startup properties, or use the default
- String language = properties.get(LANGUAGE_KEY);
- locale = (language == null) ? Locale.getDefault() : new Locale(language);
- logObject("running with the locale " + locale);
-
- BXMLSerializer bxmlSerializer = new BXMLSerializer();
-
- // add a reference to the application itself in bxml namespace, to be used by JS inside bxml files
- bxmlSerializer.getNamespace().put("application", this);
- logObject("put a reference to application in serializer namespace");
- bxmlSerializer.getNamespace().put("mainClassName", MAIN_CLASS_NAME);
- logObject("put a reference to main class name in serializer namespace \"" + MAIN_CLASS_NAME + "\"");
-
- window = loadWindow("javascript_console_test.bxml", bxmlSerializer);
- initializeFields(bxmlSerializer);
- window.open(display);
-
- logObject("startup: end");
- }
-
- @Override
- public boolean shutdown(boolean optional) {
- if (window != null) {
- window.close();
- }
-
- return false;
- }
-
-
- /**
- * Utility method to initialize secondary fields/elements during application startup.
- *
- * @param serializer the BXMLSerializer instance to use
- */
- private void initializeFields(BXMLSerializer serializer) {
- logObject("initializeFields: start");
- logObject("got BXMLSerializer instance = " + serializer);
-
- loadResources(MAIN_CLASS_NAME);
-
- logObject("initializeFields: end");
- }
-
-
- /**
- * Load resource files for the given classname, or if null a default will be used.
- *
- * @param className the full class name (to use as a base name), for loading resources
- */
- private void loadResources(String className) {
- if (className == null || className.length() < 1) {
- className = MAIN_CLASS_NAME; // set a useful default
- }
-
- try {
- // load some resources here, just to show its usage from JS files,
- // but only if not already loaded ...
- if (resources == null) {
- resources = new Resources(MAIN_CLASS_NAME, locale);
- logObject("buildResources, load resources from \"" + className + "\", with locale " + locale);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
-
- /**
- * Load (and returns) a Window, given its file name
- * <p>
- * Note that if public this method could be called even from JS in a bxml file
- * (but a reference to the current application has to be put in serializer namespace).
- *
- * @param fileName the file name for the bxml file to load
- * @return the Window instance
- * @throws SerializationException in case of error
- * @throws IOException in case of error
- */
- public Window load(String fileName) throws SerializationException, IOException {
- logObject("load from \"" + fileName + "\"");
- return loadWindow(fileName, null);
- }
-
- /**
- * Load (and returns) a Window, given its file name and serializer to use
- *
- * @param fileName the file name for the bxml file to load
- * @param bxmlSerializer the serializer to use, or if null a new one will be created
- * @return the Window instance
- * @throws SerializationException in case of error
- * @throws IOException in case of error
- */
- private Window loadWindow(String fileName, BXMLSerializer bxmlSerializer)
- throws SerializationException, IOException {
- logObject("loadWindow from \"" + fileName + "\", with the serializer " + bxmlSerializer);
-
- if (bxmlSerializer == null) {
- bxmlSerializer = new BXMLSerializer();
- }
-
- // return (Window)bxmlSerializer.readObject(JavascriptConsoleTest.class, fileName); // ok
- // better, to allow usage of resources (without having to call setLocation or setResources in the serializer) ...
- return (Window)bxmlSerializer.readObject(JavascriptConsoleTest.class, fileName, true);
- }
-
- /**
- * Load (and returns) a Window, given its URL and serializer to use
- * <p>
- * Note that if public this method could be called even from JS in a bxml file
- * (but a reference to the current application has to be put in serializer namespace).
- * <p>
- * Note that all Exceptions are catched inside this method, to not expose them to JS code.
- *
- * @param urlString the URL of the bxml file to load, as a String
- * @param bxmlSerializer the serializer to use, or if null a new one will be created
- * @return the Window instance
- */
- public Window loadWindowFromURL(String urlString, BXMLSerializer bxmlSerializer) {
- logObject("loadWindow from \"" + urlString + "\", with the serializer " + bxmlSerializer);
-
- if (bxmlSerializer == null) {
- bxmlSerializer = new BXMLSerializer();
- }
-
- Window loadedWindow = null;
- try {
- URL url = new URL(urlString);
-
- // force the location, so it will be possible to decode resources like labels ...
- bxmlSerializer.setLocation(url);
-
- loadedWindow = (Window)bxmlSerializer.readObject(url);
- } catch (MalformedURLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (SerializationException e) {
- e.printStackTrace();
- }
-
- return loadedWindow;
- }
-
-
- /**
- * Return the value for the given label,
- * from the resource file loaded at application startup.
- *
- * @param name the label name
- * @return the value or the label, or empty string if not found
- */
- public String getLabel(String name) {
- String label = "";
- if (name == null || name.length() < 1) {
- throw new IllegalArgumentException("name must be a valid string");
- }
-
- // note that if called from bxml files, resources could be not already loaded,
- // so try to force its load with a default value ...
- if (resources == null) {
- loadResources(null);
- }
-
- label = (String) resources.get(name);
- logObject("search label with name \"" + name + "\", find value \"" + label + "\"");
-
- return ((label == null) ? "": label);
- }
-
-
- /**
- * Sample utility method to log a formatted dump of the given object to System.out .
- * <p>
- * Note that it has been set public, static, and accepting Object (and not String as usual),
- * even to make some tests on it from JS code.
- *
- * @param msg the object (or message) to log
- */
- public static final void logObject(Object obj) {
- if (obj != null) {
- System.out.println(new java.util.Date() + ", log: { class: \"" + obj.getClass().getName() + "\", msg:\"" + obj + "\" }");
- }
- }
-
-
- /**
- * Application entry point, when run as a Standard (Desktop) Java Application.
- *
- * @param args command line arguments
- */
- public static void main(String[] args) {
- DesktopApplicationContext.main(JavascriptConsoleTest.class, args);
- }
-
-}
+/*
+ * 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;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Locale;
+
+import org.apache.pivot.beans.BXMLSerializer;
+import org.apache.pivot.collections.Map;
+import org.apache.pivot.serialization.SerializationException;
+import org.apache.pivot.util.Resources;
+import org.apache.pivot.wtk.Application;
+import org.apache.pivot.wtk.DesktopApplicationContext;
+import org.apache.pivot.wtk.Display;
+import org.apache.pivot.wtk.Window;
+
+/**
+ * Sample Test Application (not fully working) to show how to interact
+ * between Java code and JavaScript code (interpreted by the JVM) inside bxml files.
+ * Many things usually done in Java code are here shown but from the JS side.
+ * <p>
+ * Some utility methods present here could be moved in a dedicated utility class.
+ * <p>
+ * Note that there are many comments inside this and related sources,
+ * and it's to show different ways to do the same things, even as iterative development.
+ */
+public class JavascriptConsoleTest extends Application.Adapter {
+ public static final String LANGUAGE_KEY = "language";
+ public static final String MAIN_CLASS_NAME = JavascriptConsoleTest.class.getName();
+
+ private Display display = null;
+ private Window window = null;
+
+ private Locale locale = null;
+ private Resources resources = null;
+
+ @Override
+ public void startup(Display displayArgument, Map<String, String> properties) throws Exception {
+ logObject("startup: start");
+
+ this.display = displayArgument;
+
+ // get the locale from startup properties, or use the default
+ String language = properties.get(LANGUAGE_KEY);
+ locale = (language == null) ? Locale.getDefault() : new Locale(language);
+ logObject("running with the locale " + locale);
+
+ BXMLSerializer bxmlSerializer = new BXMLSerializer();
+
+ // add a reference to the application itself in bxml namespace, to be used by JS inside bxml files
+ bxmlSerializer.getNamespace().put("application", this);
+ logObject("put a reference to application in serializer namespace");
+ bxmlSerializer.getNamespace().put("mainClassName", MAIN_CLASS_NAME);
+ logObject("put a reference to main class name in serializer namespace \"" + MAIN_CLASS_NAME + "\"");
+
+ window = loadWindow("javascript_console_test.bxml", bxmlSerializer);
+ initializeFields(bxmlSerializer);
+ window.open(display);
+
+ logObject("startup: end");
+ }
+
+ @Override
+ public boolean shutdown(boolean optional) {
+ if (window != null) {
+ window.close();
+ }
+
+ return false;
+ }
+
+
+ /**
+ * Utility method to initialize secondary fields/elements during application startup.
+ *
+ * @param serializer the BXMLSerializer instance to use
+ */
+ private void initializeFields(BXMLSerializer serializer) {
+ logObject("initializeFields: start");
+ logObject("got BXMLSerializer instance = " + serializer);
+
+ loadResources(MAIN_CLASS_NAME);
+
+ logObject("initializeFields: end");
+ }
+
+
+ /**
+ * Load resource files for the given classname, or if null a default will be used.
+ *
+ * @param className the full class name (to use as a base name), for loading resources
+ */
+ private void loadResources(String className) {
+ if (className == null || className.length() < 1) {
+ className = MAIN_CLASS_NAME; // set a useful default
+ }
+
+ try {
+ // load some resources here, just to show its usage from JS files,
+ // but only if not already loaded ...
+ if (resources == null) {
+ resources = new Resources(MAIN_CLASS_NAME, locale);
+ logObject("buildResources, load resources from \"" + className + "\", with locale " + locale);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
+ /**
+ * Load (and returns) a Window, given its file name
+ * <p>
+ * Note that if public this method could be called even from JS in a bxml file
+ * (but a reference to the current application has to be put in serializer namespace).
+ *
+ * @param fileName the file name for the bxml file to load
+ * @return the Window instance
+ * @throws SerializationException in case of error
+ * @throws IOException in case of error
+ */
+ public Window load(String fileName) throws SerializationException, IOException {
+ logObject("load from \"" + fileName + "\"");
+ return loadWindow(fileName, null);
+ }
+
+ /**
+ * Load (and returns) a Window, given its file name and serializer to use
+ *
+ * @param fileName the file name for the bxml file to load
+ * @param bxmlSerializer the serializer to use, or if null a new one will be created
+ * @return the Window instance
+ * @throws SerializationException in case of error
+ * @throws IOException in case of error
+ */
+ private Window loadWindow(String fileName, BXMLSerializer bxmlSerializer)
+ throws SerializationException, IOException {
+ logObject("loadWindow from \"" + fileName + "\", with the serializer " + bxmlSerializer);
+
+ if (bxmlSerializer == null) {
+ bxmlSerializer = new BXMLSerializer();
+ }
+
+ // return (Window)bxmlSerializer.readObject(JavascriptConsoleTest.class, fileName); // ok
+ // better, to allow usage of resources (without having to call setLocation or setResources in the serializer) ...
+ return (Window)bxmlSerializer.readObject(JavascriptConsoleTest.class, fileName, true);
+ }
+
+ /**
+ * Load (and returns) a Window, given its URL and serializer to use
+ * <p>
+ * Note that if public this method could be called even from JS in a bxml file
+ * (but a reference to the current application has to be put in serializer namespace).
+ * <p>
+ * Note that all Exceptions are catched inside this method, to not expose them to JS code.
+ *
+ * @param urlString the URL of the bxml file to load, as a String
+ * @param bxmlSerializer the serializer to use, or if null a new one will be created
+ * @return the Window instance
+ */
+ public Window loadWindowFromURL(String urlString, BXMLSerializer bxmlSerializer) {
+ logObject("loadWindow from \"" + urlString + "\", with the serializer " + bxmlSerializer);
+
+ if (bxmlSerializer == null) {
+ bxmlSerializer = new BXMLSerializer();
+ }
+
+ Window loadedWindow = null;
+ try {
+ URL url = new URL(urlString);
+
+ // force the location, so it will be possible to decode resources like labels ...
+ bxmlSerializer.setLocation(url);
+
+ loadedWindow = (Window)bxmlSerializer.readObject(url);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (SerializationException e) {
+ e.printStackTrace();
+ }
+
+ return loadedWindow;
+ }
+
+
+ /**
+ * Return the value for the given label,
+ * from the resource file loaded at application startup.
+ *
+ * @param name the label name
+ * @return the value or the label, or empty string if not found
+ */
+ public String getLabel(String name) {
+ String label = "";
+ if (name == null || name.length() < 1) {
+ throw new IllegalArgumentException("name must be a valid string");
+ }
+
+ // note that if called from bxml files, resources could be not already loaded,
+ // so try to force its load with a default value ...
+ if (resources == null) {
+ loadResources(null);
+ }
+
+ label = (String) resources.get(name);
+ logObject("search label with name \"" + name + "\", find value \"" + label + "\"");
+
+ return ((label == null) ? "": label);
+ }
+
+
+ /**
+ * Sample utility method to log a formatted dump of the given object to System.out .
+ * <p>
+ * Note that it has been set public, static, and accepting Object (and not String as usual),
+ * even to make some tests on it from JS code.
+ *
+ * @param msg the object (or message) to log
+ */
+ public static final void logObject(Object obj) {
+ if (obj != null) {
+ System.out.println(new java.util.Date() + ", log: { class: \"" + obj.getClass().getName() + "\", msg:\"" + obj + "\" }");
+ }
+ }
+
+
+ /**
+ * Application entry point, when run as a Standard (Desktop) Java Application.
+ *
+ * @param args command line arguments
+ */
+ public static void main(String[] args) {
+ DesktopApplicationContext.main(JavascriptConsoleTest.class, args);
+ }
+
+}
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json Mon Sep 17 20:31:20 2012
@@ -1,36 +1,36 @@
-/*
- * 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.
- */
-{
- title: "JavaScript Console Test, from JavascriptConsoleTest.json",
- labelText: "Hello, from JavascriptConsoleTest.json",
- labelInfo: "JavaScript (interpreted by the JVM) Console:",
- labelTemplates: "Templates:",
-
- valuesTemplates_0: " - Choose a template - ", // future use
- valuesTemplates_1: "Open Frame Local", // future use
- valuesTemplates_2: "Open Frame Remote (from Pivot Web Site)", // future use
- valuesTemplates_all: "[' - Choose a template - ', 'Open Frame Local', 'Open Frame Remote (from Pivot Web Site)']", // future use, as alternative for singles valuesTemplates_* values ...
- valuesTemplates_num: "3",
-
- labelRun: "Run",
- labelClear: "Clear",
- labelJSSource: "JS Source:",
- labelJSOutput: "JS Output:",
- labelStatus: "Status:",
-
- last: ""
-}
+/*
+ * 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.
+ */
+{
+ title: "JavaScript Console Test, from JavascriptConsoleTest.json",
+ labelText: "Hello, from JavascriptConsoleTest.json",
+ labelInfo: "JavaScript (interpreted by the JVM) Console:",
+ labelTemplates: "Templates:",
+
+ valuesTemplates_0: " - Choose a template - ", // future use
+ valuesTemplates_1: "Open Frame Local", // future use
+ valuesTemplates_2: "Open Frame Remote (from Pivot Web Site)", // future use
+ valuesTemplates_all: "[' - Choose a template - ', 'Open Frame Local', 'Open Frame Remote (from Pivot Web Site)']", // future use, as alternative for singles valuesTemplates_* values ...
+ valuesTemplates_num: "3",
+
+ labelRun: "Run",
+ labelClear: "Clear",
+ labelJSSource: "JS Source:",
+ labelJSOutput: "JS Output:",
+ labelStatus: "Status:",
+
+ last: ""
+}
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.json
------------------------------------------------------------------------------
svn:eol-style = native
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java Mon Sep 17 20:31:20 2012
@@ -1,62 +1,62 @@
-/*
- * 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.PushButton;
-import org.apache.pivot.wtk.Window;
-import org.apache.pivot.wtk.content.ButtonDataRenderer;
-
-public class Pivot721 extends Application.Adapter {
-
- private Window window;
-
- @Override
- public void startup(Display display, Map<String, String> properties) throws Exception {
- BXMLSerializer bxmlSerializer = new BXMLSerializer();
- window = (Window) bxmlSerializer.readObject(Pivot734.class, "pivot_721.bxml");
-
- // force fill into button renderer, but only in some buttons ...
- ButtonDataRenderer filledButtonDataRenderer = new ButtonDataRenderer();
- filledButtonDataRenderer.setFillIcon(true);
- PushButton button3 = (PushButton) bxmlSerializer.getNamespace().get("button3");
- // ((ButtonDataRenderer)button3.getDataRenderer()).setFillIcon(true); // ok, but note that all buttons share a common renderer instance
- button3.setDataRenderer(filledButtonDataRenderer); // set/use the customized renderer instance
- PushButton button4 = (PushButton) bxmlSerializer.getNamespace().get("button4");
- button4.setDataRenderer(filledButtonDataRenderer); // set/use the customized renderer instance
-
- window.open(display);
- }
-
- @Override
- public boolean shutdown(boolean optional) {
- if (window != null) {
- window.close();
- }
-
- return false;
- }
-
- public static void main(String[] args) {
- DesktopApplicationContext.main(Pivot721.class, args);
- }
-
-}
+/*
+ * 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.PushButton;
+import org.apache.pivot.wtk.Window;
+import org.apache.pivot.wtk.content.ButtonDataRenderer;
+
+public class Pivot721 extends Application.Adapter {
+
+ private Window window;
+
+ @Override
+ public void startup(Display display, Map<String, String> properties) throws Exception {
+ BXMLSerializer bxmlSerializer = new BXMLSerializer();
+ window = (Window) bxmlSerializer.readObject(Pivot734.class, "pivot_721.bxml");
+
+ // force fill into button renderer, but only in some buttons ...
+ ButtonDataRenderer filledButtonDataRenderer = new ButtonDataRenderer();
+ filledButtonDataRenderer.setFillIcon(true);
+ PushButton button3 = (PushButton) bxmlSerializer.getNamespace().get("button3");
+ // ((ButtonDataRenderer)button3.getDataRenderer()).setFillIcon(true); // ok, but note that all buttons share a common renderer instance
+ button3.setDataRenderer(filledButtonDataRenderer); // set/use the customized renderer instance
+ PushButton button4 = (PushButton) bxmlSerializer.getNamespace().get("button4");
+ button4.setDataRenderer(filledButtonDataRenderer); // set/use the customized renderer instance
+
+ window.open(display);
+ }
+
+ @Override
+ public boolean shutdown(boolean optional) {
+ if (window != null) {
+ window.close();
+ }
+
+ return false;
+ }
+
+ public static void main(String[] args) {
+ DesktopApplicationContext.main(Pivot721.class, args);
+ }
+
+}
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot721.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml Mon Sep 17 20:31:20 2012
@@ -1,72 +1,72 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-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-721" maximized="true"
- xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:app="org.apache.pivot.tests.issues"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns="org.apache.pivot.wtk"
->
-
- <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
-
- <Border title="Button Without Fill">
- <BoxPane orientation="horizontal" styles="{spacing:40}">
- <Border>
- <BoxPane>
- <Label text="button 50x50" />
- <PushButton bxml:id="button1" preferredWidth="50" preferredHeight="50">
- <content:ButtonData icon="@test1.jpg" />
- </PushButton>
- </BoxPane>
- </Border>
- <Border>
- <BoxPane>
- <Label text="button 200x200" />
- <PushButton bxml:id="button2" preferredWidth="200" preferredHeight="200">
- <content:ButtonData icon="@test1.jpg" />
- </PushButton>
- </BoxPane>
- </Border>
- </BoxPane>
- </Border>
-
- <Border title="Button With Fill set in Renderer">
- <BoxPane orientation="horizontal" styles="{spacing:40}">
- <Border>
- <BoxPane>
- <Label text="button 50x50" />
- <PushButton bxml:id="button3" preferredWidth="50" preferredHeight="50">
- <content:ButtonData icon="@test1.jpg" />
- </PushButton>
- </BoxPane>
- </Border>
- <Border>
- <BoxPane>
- <Label text="button 200x200" />
- <PushButton bxml:id="button4" preferredWidth="200" preferredHeight="200">
- <content:ButtonData icon="@test1.jpg" />
- </PushButton>
- </BoxPane>
- </Border>
- </BoxPane>
- </Border>
-
- </BoxPane>
-
-</Window>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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-721" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:app="org.apache.pivot.tests.issues"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk"
+>
+
+ <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
+
+ <Border title="Button Without Fill">
+ <BoxPane orientation="horizontal" styles="{spacing:40}">
+ <Border>
+ <BoxPane>
+ <Label text="button 50x50" />
+ <PushButton bxml:id="button1" preferredWidth="50" preferredHeight="50">
+ <content:ButtonData icon="@test1.jpg" />
+ </PushButton>
+ </BoxPane>
+ </Border>
+ <Border>
+ <BoxPane>
+ <Label text="button 200x200" />
+ <PushButton bxml:id="button2" preferredWidth="200" preferredHeight="200">
+ <content:ButtonData icon="@test1.jpg" />
+ </PushButton>
+ </BoxPane>
+ </Border>
+ </BoxPane>
+ </Border>
+
+ <Border title="Button With Fill set in Renderer">
+ <BoxPane orientation="horizontal" styles="{spacing:40}">
+ <Border>
+ <BoxPane>
+ <Label text="button 50x50" />
+ <PushButton bxml:id="button3" preferredWidth="50" preferredHeight="50">
+ <content:ButtonData icon="@test1.jpg" />
+ </PushButton>
+ </BoxPane>
+ </Border>
+ <Border>
+ <BoxPane>
+ <Label text="button 200x200" />
+ <PushButton bxml:id="button4" preferredWidth="200" preferredHeight="200">
+ <content:ButtonData icon="@test1.jpg" />
+ </PushButton>
+ </BoxPane>
+ </Border>
+ </BoxPane>
+ </Border>
+
+ </BoxPane>
+
+</Window>
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721.bxml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml Mon Sep 17 20:31:20 2012
@@ -1,86 +1,86 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-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-721, Scale Up Test on Images" maximized="true"
- xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:app="org.apache.pivot.tests.issues"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns="org.apache.pivot.wtk"
->
-
- <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
-
- <Border title="height: 50">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="50">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 100">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="100">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 300">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="300">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 400">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="400">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- </BoxPane>
-
-</Window>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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-721, Scale Up Test on Images" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:app="org.apache.pivot.tests.issues"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk"
+>
+
+ <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
+
+ <Border title="height: 50">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="50">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 100">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="100">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 300">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="300">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 400">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="400">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ </BoxPane>
+
+</Window>
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2.bxml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml Mon Sep 17 20:31:20 2012
@@ -1,86 +1,86 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-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-721, Scale Up Test on Images - With Workaround" maximized="true"
- xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:app="org.apache.pivot.tests.issues"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns="org.apache.pivot.wtk"
->
-
- <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
-
- <Border title="height: 50">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="50">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="50" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="50" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="50" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 100">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="100">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="100" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="100" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="100" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 300">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="300">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="300" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="300" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="300" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- <Border title="height: 400">
- <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="400">
- <Label text="16x16" />
- <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="400" />
- <Label text=" , " />
- <Label text="32x32" />
- <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="400" />
- <Label text=" , " />
- <Label text="320x240" />
- <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="400" />
- <Label text=" , " />
- </BoxPane>
- </Border>
-
- </BoxPane>
-
-</Window>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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-721, Scale Up Test on Images - With Workaround" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:app="org.apache.pivot.tests.issues"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk"
+>
+
+ <BoxPane orientation="vertical" styles="{fill:true, spacing:10, padding:{top:20}}" preferredWidth="400">
+
+ <Border title="height: 50">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="50">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="50" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="50" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="50" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 100">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="100">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="100" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="100" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="100" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 300">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="300">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="300" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="300" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="300" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ <Border title="height: 400">
+ <BoxPane styles="{fill:true, verticalAlignment:'center'}" preferredHeight="400">
+ <Label text="16x16" />
+ <ImageView image="@../clock.png" styles="{fill:true}" tooltipText="clock.png, 16x16" preferredWidth="400" />
+ <Label text=" , " />
+ <Label text="32x32" />
+ <ImageView image="@../go-home.png" styles="{fill:true}" tooltipText="go-home, 32x32" preferredWidth="400" />
+ <Label text=" , " />
+ <Label text="320x240" />
+ <ImageView image="@../IMG_0725_2.jpg" styles="{fill:true}" tooltipText="IMG_0725_2.jpg, 320x240" preferredWidth="400" />
+ <Label text=" , " />
+ </BoxPane>
+ </Border>
+
+ </BoxPane>
+
+</Window>
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_721_test2_with_workaround.bxml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml?rev=1386819&r1=1386818&r2=1386819&view=diff
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml (original)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml Mon Sep 17 20:31:20 2012
@@ -1,49 +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.
--->
-
-<Window title="PIVOT-781 - Full Screen Mode" maximized="true"
- xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:content="org.apache.pivot.wtk.content"
- xmlns:collections="org.apache.pivot.collections"
- xmlns="org.apache.pivot.wtk"
- preferredWidth="800" preferredHeight="600"
->
-
- <bxml:script>
- <![CDATA[
- importPackage(java.lang); // for System
-
- System.out.println("This (Test) application has to be run with --maximized=true, to test the current issue");
- System.out.println("After, run even with --fullScreen=true, and finally maybe with a combination of both ...");
- ]]>
- </bxml:script>
-
- <Border>
- <BoxPane styles="{padding:4, horizontalAlignment:'center', verticalAlignment:'center'}">
- <PushButton bxml:id="exitButton" buttonData="Click to Exit">
- <buttonPressListeners>
- function buttonPressed(button) {
- System.out.println("Exiting from application now.");
- System.exit(0);
- }
- </buttonPressListeners>
- </PushButton>
- </BoxPane>
- </Border>
-
-</Window>
+<?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-781 - Full Screen Mode" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns:collections="org.apache.pivot.collections"
+ xmlns="org.apache.pivot.wtk"
+ preferredWidth="800" preferredHeight="600"
+>
+
+ <bxml:script>
+ <![CDATA[
+ importPackage(java.lang); // for System
+
+ System.out.println("This (Test) application has to be run with --maximized=true, to test the current issue");
+ System.out.println("After, run even with --fullScreen=true, and finally maybe with a combination of both ...");
+ ]]>
+ </bxml:script>
+
+ <Border>
+ <BoxPane styles="{padding:4, horizontalAlignment:'center', verticalAlignment:'center'}">
+ <PushButton bxml:id="exitButton" buttonData="Click to Exit">
+ <buttonPressListeners>
+ function buttonPressed(button) {
+ System.out.println("Exiting from application now.");
+ System.exit(0);
+ }
+ </buttonPressListeners>
+ </PushButton>
+ </BoxPane>
+ </Border>
+
+</Window>
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_781.bxml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_843_test.dib
------------------------------------------------------------------------------
origination-name = image/bmp
Propchange: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_843_test.dib
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Mon Sep 17 20:31:20 2012
@@ -1 +1 @@
-application/octet-stream
+image/x-ms-bmp