Created v2.0 tag
git-svn-id: https://svn.apache.org/repos/asf/pivot/tags/v2.0@1051372 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/src/org/apache/pivot/serialization/StringSerializer.java b/core/src/org/apache/pivot/serialization/StringSerializer.java
index d4484d0..a58a2ea 100644
--- a/core/src/org/apache/pivot/serialization/StringSerializer.java
+++ b/core/src/org/apache/pivot/serialization/StringSerializer.java
@@ -1,125 +1,125 @@
-/*
- * 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.serialization;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-
-/**
- * Implementation of the {@link Serializer} interface that reads data from
- * and writes data to Java Strings.
- */
-public class StringSerializer implements Serializer<String> {
- private final Charset charset;
-
- public static final String DEFAULT_CHARSET_NAME = "UTF-8";
- public static final String TEXT_EXTENSION = "txt";
- public static final String MIME_TYPE = "text/plain";
- public static final int BUFFER_SIZE = 2048;
-
- public StringSerializer() {
- this(Charset.forName(DEFAULT_CHARSET_NAME));
- }
-
- public StringSerializer(Charset charset) {
- if (charset == null) {
- throw new IllegalArgumentException("charset is null.");
- }
-
- this.charset = charset;
- }
-
- public Charset getCharset() {
- return charset;
- }
-
- /**
- * Reads plain text data from an input stream.
- *
- * @param inputStream
- * The input stream from which data will be read.
- *
- * @return
- * An instance of {@link String} containing the text read from the input stream.
- */
- @Override
- public String readObject(InputStream inputStream) throws IOException, SerializationException {
- if (inputStream == null) {
- throw new IllegalArgumentException("inputStream is null.");
- }
-
- String result = null;
-
- try {
- BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
- ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
-
- byte[] buffer = new byte[BUFFER_SIZE];
- int read;
- while ((read = bufferedInputStream.read(buffer)) != -1) {
- byteOutputStream.write(buffer, 0, read);
- }
-
- byteOutputStream.flush();
-
- result = new String(byteOutputStream.toByteArray(), charset);
- } catch (IOException exception) {
- throw new SerializationException(exception);
- }
-
- return result;
- }
-
- /**
- * Writes plain text data to an output stream.
- *
- * @param text
- * The text to be written to the output stream.
- *
- * @param outputStream
- * The output stream to which data will be written.
- */
- @Override
- public void writeObject(String text, OutputStream outputStream)
- throws IOException, SerializationException {
- if (text == null) {
- throw new IllegalArgumentException("text is null.");
- }
-
- if (outputStream == null) {
- throw new IllegalArgumentException("outputStream is null.");
- }
-
- try {
- BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
- bufferedOutputStream.write(text.getBytes());
- bufferedOutputStream.flush();
- } catch (IOException exception) {
- throw new SerializationException(exception);
- }
- }
-
- @Override
- public String getMIMEType(String object) {
- return MIME_TYPE;
- }
-}
+/*
+ * 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.serialization;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+
+/**
+ * Implementation of the {@link Serializer} interface that reads data from
+ * and writes data to Java Strings.
+ */
+public class StringSerializer implements Serializer<String> {
+ private final Charset charset;
+
+ public static final String DEFAULT_CHARSET_NAME = "UTF-8";
+ public static final String TEXT_EXTENSION = "txt";
+ public static final String MIME_TYPE = "text/plain";
+ public static final int BUFFER_SIZE = 2048;
+
+ public StringSerializer() {
+ this(Charset.forName(DEFAULT_CHARSET_NAME));
+ }
+
+ public StringSerializer(Charset charset) {
+ if (charset == null) {
+ throw new IllegalArgumentException("charset is null.");
+ }
+
+ this.charset = charset;
+ }
+
+ public Charset getCharset() {
+ return charset;
+ }
+
+ /**
+ * Reads plain text data from an input stream.
+ *
+ * @param inputStream
+ * The input stream from which data will be read.
+ *
+ * @return
+ * An instance of {@link String} containing the text read from the input stream.
+ */
+ @Override
+ public String readObject(InputStream inputStream) throws IOException, SerializationException {
+ if (inputStream == null) {
+ throw new IllegalArgumentException("inputStream is null.");
+ }
+
+ String result = null;
+
+ try {
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
+ ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
+
+ byte[] buffer = new byte[BUFFER_SIZE];
+ int read;
+ while ((read = bufferedInputStream.read(buffer)) != -1) {
+ byteOutputStream.write(buffer, 0, read);
+ }
+
+ byteOutputStream.flush();
+
+ result = new String(byteOutputStream.toByteArray(), charset);
+ } catch (IOException exception) {
+ throw new SerializationException(exception);
+ }
+
+ return result;
+ }
+
+ /**
+ * Writes plain text data to an output stream.
+ *
+ * @param text
+ * The text to be written to the output stream.
+ *
+ * @param outputStream
+ * The output stream to which data will be written.
+ */
+ @Override
+ public void writeObject(String text, OutputStream outputStream)
+ throws IOException, SerializationException {
+ if (text == null) {
+ throw new IllegalArgumentException("text is null.");
+ }
+
+ if (outputStream == null) {
+ throw new IllegalArgumentException("outputStream is null.");
+ }
+
+ try {
+ BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
+ bufferedOutputStream.write(text.getBytes());
+ bufferedOutputStream.flush();
+ } catch (IOException exception) {
+ throw new SerializationException(exception);
+ }
+ }
+
+ @Override
+ public String getMIMEType(String object) {
+ return MIME_TYPE;
+ }
+}
diff --git a/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java b/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
index e9023d0..98d566e 100644
--- a/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
+++ b/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
@@ -1,82 +1,82 @@
-/*
- * 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.serialization.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import org.apache.pivot.serialization.ByteArraySerializer;
-import org.apache.pivot.serialization.SerializationException;
-import org.apache.pivot.serialization.Serializer;
-import org.junit.Test;
-
-
-public class ByteArraySerializerTest {
- public static final String testString = "// \n" + "// Hello from "
- + ByteArraySerializerTest.class.getName() + "\n" + "// \n";
- public static final byte[] testBytes = testString.getBytes();
-
- public void log(String msg) {
- System.out.println(msg);
- }
-
- @Test
- public void readValues() throws IOException, SerializationException {
- log("readValues()");
-
- Serializer<byte[]> serializer = new ByteArraySerializer();
-
- ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
- byte[] result = serializer.readObject(inputStream);
- assertNotNull(result);
-
- // dump content, but useful only for text resources ...
- String dump = new String(result);
- int dumpLength = dump.getBytes().length;
- log("Result: " + dumpLength + " bytes \n" + dump);
-
- assertTrue(dumpLength > 0);
- }
-
- @Test
- public void writeValues() throws IOException, SerializationException {
- log("writeValues()");
-
- Serializer<byte[]> serializer = new ByteArraySerializer();
-
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- serializer.writeObject(testBytes, outputStream);
-
- outputStream.flush();
- outputStream.close();
-
- byte[] result = outputStream.toByteArray();
- assertNotNull(result);
-
- // dump content, but useful only for text resources ...
- String dump = new String(result);
- int dumpLength = dump.getBytes().length;
- log("Result: " + dumpLength + " bytes \n" + dump);
-
- assertTrue(dumpLength > 0);
- }
-
-}
+/*
+ * 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.serialization.test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import org.apache.pivot.serialization.ByteArraySerializer;
+import org.apache.pivot.serialization.SerializationException;
+import org.apache.pivot.serialization.Serializer;
+import org.junit.Test;
+
+
+public class ByteArraySerializerTest {
+ public static final String testString = "// \n" + "// Hello from "
+ + ByteArraySerializerTest.class.getName() + "\n" + "// \n";
+ public static final byte[] testBytes = testString.getBytes();
+
+ public void log(String msg) {
+ System.out.println(msg);
+ }
+
+ @Test
+ public void readValues() throws IOException, SerializationException {
+ log("readValues()");
+
+ Serializer<byte[]> serializer = new ByteArraySerializer();
+
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
+ byte[] result = serializer.readObject(inputStream);
+ assertNotNull(result);
+
+ // dump content, but useful only for text resources ...
+ String dump = new String(result);
+ int dumpLength = dump.getBytes().length;
+ log("Result: " + dumpLength + " bytes \n" + dump);
+
+ assertTrue(dumpLength > 0);
+ }
+
+ @Test
+ public void writeValues() throws IOException, SerializationException {
+ log("writeValues()");
+
+ Serializer<byte[]> serializer = new ByteArraySerializer();
+
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ serializer.writeObject(testBytes, outputStream);
+
+ outputStream.flush();
+ outputStream.close();
+
+ byte[] result = outputStream.toByteArray();
+ assertNotNull(result);
+
+ // dump content, but useful only for text resources ...
+ String dump = new String(result);
+ int dumpLength = dump.getBytes().length;
+ log("Result: " + dumpLength + " bytes \n" + dump);
+
+ assertTrue(dumpLength > 0);
+ }
+
+}
diff --git a/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java b/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java
index 0ea6ef6..84065da 100644
--- a/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java
+++ b/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java
@@ -1,85 +1,85 @@
-/*
- * 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.serialization.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import org.apache.pivot.serialization.SerializationException;
-import org.apache.pivot.serialization.Serializer;
-import org.apache.pivot.serialization.StringSerializer;
-import org.junit.Test;
-
-
-public class StringSerializerTest {
- public static final String testString = "// \n" + "// Hello from "
- + StringSerializerTest.class.getName() + "\n" + "// \n";
- public static final byte[] testBytes = testString.getBytes();
-
- public void log(String msg) {
- System.out.println(msg);
- }
-
- @Test
- public void readValues() throws IOException, SerializationException {
- log("readValues()");
-
- Serializer<String> serializer = new StringSerializer();
-
- ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
- String result = serializer.readObject(inputStream);
- assertNotNull(result);
- assertEquals(result, testString);
-
- // dump content, but useful only for text resources ...
- String dump = new String(result);
- int dumpLength = dump.getBytes().length;
- log("Result: " + dumpLength + " bytes \n" + dump);
-
- assertTrue(dumpLength > 0);
- }
-
- @Test
- public void writeValues() throws IOException, SerializationException {
- log("writeValues()");
-
- Serializer<String> serializer = new StringSerializer();
-
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- serializer.writeObject(testString, outputStream);
-
- outputStream.flush();
- outputStream.close();
-
- String result = outputStream.toString();
- assertNotNull(result);
- assertEquals(result, testString);
-
- // dump content, but useful only for text resources ...
- String dump = new String(result);
- int dumpLength = dump.getBytes().length;
- log("Result: " + dumpLength + " bytes \n" + dump);
-
- assertTrue(dumpLength > 0);
- }
-
-}
+/*
+ * 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.serialization.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import org.apache.pivot.serialization.SerializationException;
+import org.apache.pivot.serialization.Serializer;
+import org.apache.pivot.serialization.StringSerializer;
+import org.junit.Test;
+
+
+public class StringSerializerTest {
+ public static final String testString = "// \n" + "// Hello from "
+ + StringSerializerTest.class.getName() + "\n" + "// \n";
+ public static final byte[] testBytes = testString.getBytes();
+
+ public void log(String msg) {
+ System.out.println(msg);
+ }
+
+ @Test
+ public void readValues() throws IOException, SerializationException {
+ log("readValues()");
+
+ Serializer<String> serializer = new StringSerializer();
+
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
+ String result = serializer.readObject(inputStream);
+ assertNotNull(result);
+ assertEquals(result, testString);
+
+ // dump content, but useful only for text resources ...
+ String dump = new String(result);
+ int dumpLength = dump.getBytes().length;
+ log("Result: " + dumpLength + " bytes \n" + dump);
+
+ assertTrue(dumpLength > 0);
+ }
+
+ @Test
+ public void writeValues() throws IOException, SerializationException {
+ log("writeValues()");
+
+ Serializer<String> serializer = new StringSerializer();
+
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ serializer.writeObject(testString, outputStream);
+
+ outputStream.flush();
+ outputStream.close();
+
+ String result = outputStream.toString();
+ assertNotNull(result);
+ assertEquals(result, testString);
+
+ // dump content, but useful only for text resources ...
+ String dump = new String(result);
+ int dumpLength = dump.getBytes().length;
+ log("Result: " + dumpLength + " bytes \n" + dump);
+
+ assertTrue(dumpLength > 0);
+ }
+
+}
diff --git a/demos/www/swing-demo.template.html b/demos/www/swing-demo.template.html
index 70128c3..d0848f3 100644
--- a/demos/www/swing-demo.template.html
+++ b/demos/www/swing-demo.template.html
@@ -3,10 +3,10 @@
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 @VERSION@ (the "License"); you may not use this file except in
+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-@VERSION@
+ 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,
diff --git a/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java b/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java
index a70c348..470771a 100644
--- a/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java
+++ b/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java
@@ -1,3 +1,19 @@
+/*
+ * 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.eclipse;
import org.eclipse.core.resources.IResource;
diff --git a/examples/src/org/apache/pivot/examples/deployment/DeploymentExample.java b/examples/src/org/apache/pivot/examples/deployment/DeploymentExample.java
index 8073b76..b844ef3 100644
--- a/examples/src/org/apache/pivot/examples/deployment/DeploymentExample.java
+++ b/examples/src/org/apache/pivot/examples/deployment/DeploymentExample.java
@@ -1,3 +1,19 @@
+/*
+ * 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.examples.deployment;
import org.apache.pivot.beans.BXMLSerializer;
diff --git a/tests/src/org/apache/pivot/tests/EnumBean.java b/tests/src/org/apache/pivot/tests/EnumBean.java
index bb2b4e1..a2f7eef 100644
--- a/tests/src/org/apache/pivot/tests/EnumBean.java
+++ b/tests/src/org/apache/pivot/tests/EnumBean.java
@@ -1,390 +1,390 @@
-/*
- * 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 org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.util.Vote;
-import org.apache.pivot.web.Query;
-import org.apache.pivot.wtk.BindType;
-import org.apache.pivot.wtk.Button;
-import org.apache.pivot.wtk.Cursor;
-import org.apache.pivot.wtk.DropAction;
-import org.apache.pivot.wtk.FileBrowserSheet;
-import org.apache.pivot.wtk.FocusTraversalDirection;
-import org.apache.pivot.wtk.GraphicsUtilities;
-import org.apache.pivot.wtk.HorizontalAlignment;
-import org.apache.pivot.wtk.ImageView;
-import org.apache.pivot.wtk.Keyboard;
-import org.apache.pivot.wtk.ListView;
-import org.apache.pivot.wtk.MessageType;
-import org.apache.pivot.wtk.Mouse;
-import org.apache.pivot.wtk.Orientation;
-import org.apache.pivot.wtk.ScrollPane;
-import org.apache.pivot.wtk.SortDirection;
-import org.apache.pivot.wtk.SplitPane;
-import org.apache.pivot.wtk.TableView;
-import org.apache.pivot.wtk.TableViewHeader;
-import org.apache.pivot.wtk.TextArea;
-import org.apache.pivot.wtk.TextDecoration;
-import org.apache.pivot.wtk.TreeView;
-import org.apache.pivot.wtk.VerticalAlignment;
-import org.apache.pivot.wtk.media.BufferedImageSerializer;
-import org.apache.pivot.wtk.media.Picture;
-import org.apache.pivot.wtk.skin.CardPaneSkin;
-import org.apache.pivot.wtk.text.BulletedList;
-import org.apache.pivot.wtk.text.NumberedList;
-
-/**
- * Simple bean for testing String to enum coercion.
- * {@link BeanAdapter#coerceEnum(Object, Class)}.
- * <p>
- * All accessors were created using Eclipse's 'Generate Getters & Setters"
- * source generation. No addtional code has been added to them, so they
- * can safely be deleted and regenerated if required.
- */
-public class EnumBean {
-
- // Public non-static field for testing BeanAdapter#get("orientationField");
- public Orientation orientationField;
-
- private BindType bindType;
- private BufferedImageSerializer.Format bufferedImageSerializerFormat;
- private BulletedList.Style bulletedListStyle;
- private Button.State buttonState;
- private CardPaneSkin.SelectionChangeEffect selectionChangeEffect;
- private Cursor cursor;
- private DropAction dropAction;
- private FileBrowserSheet.Mode fileBrowserSheetMode;
- private FocusTraversalDirection focusTraversalDirection;
- private GraphicsUtilities.PaintType paintType;
- private HorizontalAlignment horizontalAlignment;
- private ImageView.ImageBindMapping.Type imageBindMappingType;
- private Keyboard.KeyLocation keyLocation;
- private Keyboard.Modifier modifier;
- private ListView.SelectMode listViewSelectMode;
- private MessageBusTest.TestMessage testMessage;
- private MessageType messageType;
- private Mouse.Button mouseButton;
- private Mouse.ScrollType mouseScrollType;
- private NumberedList.Style numberedListStyle;
- private Orientation orientation;
- private Picture.Interpolation interpolation;
- private Query.Method queryMethod;
- private ScrollPane.Corner.Placement placement;
- private ScrollPane.ScrollBarPolicy scrollBarPolicy;
- private SortDirection sortDirection;
- private SplitPane.Region splitPaneRegion;
- private SplitPane.ResizeMode splitPaneResizeMode;
- private TableView.SelectMode tableViewSelectMode;
- private TableViewHeader.SortMode sortMode;
- private TextDecoration textDecoration;
- private TextArea.ScrollDirection scrollDirection;
- private TreeView.NodeCheckState nodeCheckState;
- private TreeView.SelectMode treeViewSelectMode;
- private VerticalAlignment verticalAlignment;
- private Vote vote;
-
- public BindType getBindType() {
- return bindType;
- }
-
- public void setBindType(BindType bindType) {
- this.bindType = bindType;
- }
-
- public BufferedImageSerializer.Format getBufferedImageSerializerFormat() {
- return bufferedImageSerializerFormat;
- }
-
- public void setBufferedImageSerializerFormat(
- BufferedImageSerializer.Format bufferedImageSerializerFormat) {
- this.bufferedImageSerializerFormat = bufferedImageSerializerFormat;
- }
-
- public BulletedList.Style getBulletedListStyle() {
- return bulletedListStyle;
- }
-
- public void setBulletedListStyle(BulletedList.Style bulletedListStyle) {
- this.bulletedListStyle = bulletedListStyle;
- }
-
- public Button.State getButtonState() {
- return buttonState;
- }
-
- public void setButtonState(Button.State buttonState) {
- this.buttonState = buttonState;
- }
-
- public CardPaneSkin.SelectionChangeEffect getSelectionChangeEffect() {
- return selectionChangeEffect;
- }
-
- public void setSelectionChangeEffect(CardPaneSkin.SelectionChangeEffect selectionChangeEffect) {
- this.selectionChangeEffect = selectionChangeEffect;
- }
-
- public Cursor getCursor() {
- return cursor;
- }
-
- public void setCursor(Cursor cursor) {
- this.cursor = cursor;
- }
-
- public DropAction getDropAction() {
- return dropAction;
- }
-
- public void setDropAction(DropAction dropAction) {
- this.dropAction = dropAction;
- }
-
- public FileBrowserSheet.Mode getFileBrowserSheetMode() {
- return fileBrowserSheetMode;
- }
-
- public void setFileBrowserSheetMode(FileBrowserSheet.Mode fileBrowserSheetMode) {
- this.fileBrowserSheetMode = fileBrowserSheetMode;
- }
-
- public FocusTraversalDirection getFocusTraversalDirection() {
- return focusTraversalDirection;
- }
-
- public void setFocusTraversalDirection(FocusTraversalDirection focusTraversalDirection) {
- this.focusTraversalDirection = focusTraversalDirection;
- }
-
- public GraphicsUtilities.PaintType getPaintType() {
- return paintType;
- }
-
- public void setPaintType(GraphicsUtilities.PaintType paintType) {
- this.paintType = paintType;
- }
-
- public HorizontalAlignment getHorizontalAlignment() {
- return horizontalAlignment;
- }
-
- public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment) {
- this.horizontalAlignment = horizontalAlignment;
- }
-
- public ImageView.ImageBindMapping.Type getImageBindMappingType() {
- return imageBindMappingType;
- }
-
- public void setImageBindMappingType(ImageView.ImageBindMapping.Type imageBindMappingType) {
- this.imageBindMappingType = imageBindMappingType;
- }
-
- public Keyboard.KeyLocation getKeyLocation() {
- return keyLocation;
- }
-
- public void setKeyLocation(Keyboard.KeyLocation keyLocation) {
- this.keyLocation = keyLocation;
- }
-
- public Keyboard.Modifier getModifier() {
- return modifier;
- }
-
- public void setModifier(Keyboard.Modifier modifier) {
- this.modifier = modifier;
- }
-
- public ListView.SelectMode getListViewSelectMode() {
- return listViewSelectMode;
- }
-
- public void setListViewSelectMode(ListView.SelectMode listViewSelectMode) {
- this.listViewSelectMode = listViewSelectMode;
- }
-
- public MessageBusTest.TestMessage getTestMessage() {
- return testMessage;
- }
-
- public void setTestMessage(MessageBusTest.TestMessage testMessage) {
- this.testMessage = testMessage;
- }
-
- public MessageType getMessageType() {
- return messageType;
- }
-
- public void setMessageType(MessageType messageType) {
- this.messageType = messageType;
- }
-
- public Mouse.Button getMouseButton() {
- return mouseButton;
- }
-
- public void setMouseButton(Mouse.Button mouseButton) {
- this.mouseButton = mouseButton;
- }
-
- public Mouse.ScrollType getMouseScrollType() {
- return mouseScrollType;
- }
-
- public void setMouseScrollType(Mouse.ScrollType mouseScrollType) {
- this.mouseScrollType = mouseScrollType;
- }
-
- public NumberedList.Style getNumberedListStyle() {
- return numberedListStyle;
- }
-
- public void setNumberedListStyle(NumberedList.Style numberedListStyle) {
- this.numberedListStyle = numberedListStyle;
- }
-
- public Orientation getOrientation() {
- return orientation;
- }
-
- public void setOrientation(Orientation orientation) {
- this.orientation = orientation;
- }
-
- public Picture.Interpolation getInterpolation() {
- return interpolation;
- }
-
- public void setInterpolation(Picture.Interpolation interpolation) {
- this.interpolation = interpolation;
- }
-
- public Query.Method getQueryMethod() {
- return queryMethod;
- }
-
- public void setQueryMethod(Query.Method queryMethod) {
- this.queryMethod = queryMethod;
- }
-
- public ScrollPane.Corner.Placement getPlacement() {
- return placement;
- }
-
- public void setPlacement(ScrollPane.Corner.Placement placement) {
- this.placement = placement;
- }
-
- public ScrollPane.ScrollBarPolicy getScrollBarPolicy() {
- return scrollBarPolicy;
- }
-
- public void setScrollBarPolicy(ScrollPane.ScrollBarPolicy scrollBarPolicy) {
- this.scrollBarPolicy = scrollBarPolicy;
- }
-
- public SortDirection getSortDirection() {
- return sortDirection;
- }
-
- public void setSortDirection(SortDirection sortDirection) {
- this.sortDirection = sortDirection;
- }
-
- public SplitPane.Region getSplitPaneRegion() {
- return splitPaneRegion;
- }
-
- public void setSplitPaneRegion(SplitPane.Region splitPaneRegion) {
- this.splitPaneRegion = splitPaneRegion;
- }
-
- public SplitPane.ResizeMode getSplitPaneResizeMode() {
- return splitPaneResizeMode;
- }
-
- public void setSplitPaneResizeMode(SplitPane.ResizeMode splitPaneResizeMode) {
- this.splitPaneResizeMode = splitPaneResizeMode;
- }
-
- public TableView.SelectMode getTableViewSelectMode() {
- return tableViewSelectMode;
- }
-
- public void setTableViewSelectMode(TableView.SelectMode tableViewSelectMode) {
- this.tableViewSelectMode = tableViewSelectMode;
- }
-
- public TableViewHeader.SortMode getSortMode() {
- return sortMode;
- }
-
- public void setSortMode(TableViewHeader.SortMode sortMode) {
- this.sortMode = sortMode;
- }
-
- public TextDecoration getTextDecoration() {
- return textDecoration;
- }
-
- public void setTextDecoration(TextDecoration textDecoration) {
- this.textDecoration = textDecoration;
- }
-
- public TextArea.ScrollDirection getScrollDirection() {
- return scrollDirection;
- }
-
- public void setScrollDirection(TextArea.ScrollDirection scrollDirection) {
- this.scrollDirection = scrollDirection;
- }
-
- public TreeView.NodeCheckState getNodeCheckState() {
- return nodeCheckState;
- }
-
- public void setNodeCheckState(TreeView.NodeCheckState nodeCheckState) {
- this.nodeCheckState = nodeCheckState;
- }
-
- public TreeView.SelectMode getTreeViewSelectMode() {
- return treeViewSelectMode;
- }
-
- public void setTreeViewSelectMode(TreeView.SelectMode treeViewSelectMode) {
- this.treeViewSelectMode = treeViewSelectMode;
- }
-
- public VerticalAlignment getVerticalAlignment() {
- return verticalAlignment;
- }
-
- public void setVerticalAlignment(VerticalAlignment verticalAlignment) {
- this.verticalAlignment = verticalAlignment;
- }
-
- public Vote getVote() {
- return vote;
- }
-
- public void setVote(Vote vote) {
- this.vote = vote;
- }
-}
+/*
+ * 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 org.apache.pivot.beans.BeanAdapter;
+import org.apache.pivot.util.Vote;
+import org.apache.pivot.web.Query;
+import org.apache.pivot.wtk.BindType;
+import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.Cursor;
+import org.apache.pivot.wtk.DropAction;
+import org.apache.pivot.wtk.FileBrowserSheet;
+import org.apache.pivot.wtk.FocusTraversalDirection;
+import org.apache.pivot.wtk.GraphicsUtilities;
+import org.apache.pivot.wtk.HorizontalAlignment;
+import org.apache.pivot.wtk.ImageView;
+import org.apache.pivot.wtk.Keyboard;
+import org.apache.pivot.wtk.ListView;
+import org.apache.pivot.wtk.MessageType;
+import org.apache.pivot.wtk.Mouse;
+import org.apache.pivot.wtk.Orientation;
+import org.apache.pivot.wtk.ScrollPane;
+import org.apache.pivot.wtk.SortDirection;
+import org.apache.pivot.wtk.SplitPane;
+import org.apache.pivot.wtk.TableView;
+import org.apache.pivot.wtk.TableViewHeader;
+import org.apache.pivot.wtk.TextArea;
+import org.apache.pivot.wtk.TextDecoration;
+import org.apache.pivot.wtk.TreeView;
+import org.apache.pivot.wtk.VerticalAlignment;
+import org.apache.pivot.wtk.media.BufferedImageSerializer;
+import org.apache.pivot.wtk.media.Picture;
+import org.apache.pivot.wtk.skin.CardPaneSkin;
+import org.apache.pivot.wtk.text.BulletedList;
+import org.apache.pivot.wtk.text.NumberedList;
+
+/**
+ * Simple bean for testing String to enum coercion.
+ * {@link BeanAdapter#coerceEnum(Object, Class)}.
+ * <p>
+ * All accessors were created using Eclipse's 'Generate Getters & Setters"
+ * source generation. No addtional code has been added to them, so they
+ * can safely be deleted and regenerated if required.
+ */
+public class EnumBean {
+
+ // Public non-static field for testing BeanAdapter#get("orientationField");
+ public Orientation orientationField;
+
+ private BindType bindType;
+ private BufferedImageSerializer.Format bufferedImageSerializerFormat;
+ private BulletedList.Style bulletedListStyle;
+ private Button.State buttonState;
+ private CardPaneSkin.SelectionChangeEffect selectionChangeEffect;
+ private Cursor cursor;
+ private DropAction dropAction;
+ private FileBrowserSheet.Mode fileBrowserSheetMode;
+ private FocusTraversalDirection focusTraversalDirection;
+ private GraphicsUtilities.PaintType paintType;
+ private HorizontalAlignment horizontalAlignment;
+ private ImageView.ImageBindMapping.Type imageBindMappingType;
+ private Keyboard.KeyLocation keyLocation;
+ private Keyboard.Modifier modifier;
+ private ListView.SelectMode listViewSelectMode;
+ private MessageBusTest.TestMessage testMessage;
+ private MessageType messageType;
+ private Mouse.Button mouseButton;
+ private Mouse.ScrollType mouseScrollType;
+ private NumberedList.Style numberedListStyle;
+ private Orientation orientation;
+ private Picture.Interpolation interpolation;
+ private Query.Method queryMethod;
+ private ScrollPane.Corner.Placement placement;
+ private ScrollPane.ScrollBarPolicy scrollBarPolicy;
+ private SortDirection sortDirection;
+ private SplitPane.Region splitPaneRegion;
+ private SplitPane.ResizeMode splitPaneResizeMode;
+ private TableView.SelectMode tableViewSelectMode;
+ private TableViewHeader.SortMode sortMode;
+ private TextDecoration textDecoration;
+ private TextArea.ScrollDirection scrollDirection;
+ private TreeView.NodeCheckState nodeCheckState;
+ private TreeView.SelectMode treeViewSelectMode;
+ private VerticalAlignment verticalAlignment;
+ private Vote vote;
+
+ public BindType getBindType() {
+ return bindType;
+ }
+
+ public void setBindType(BindType bindType) {
+ this.bindType = bindType;
+ }
+
+ public BufferedImageSerializer.Format getBufferedImageSerializerFormat() {
+ return bufferedImageSerializerFormat;
+ }
+
+ public void setBufferedImageSerializerFormat(
+ BufferedImageSerializer.Format bufferedImageSerializerFormat) {
+ this.bufferedImageSerializerFormat = bufferedImageSerializerFormat;
+ }
+
+ public BulletedList.Style getBulletedListStyle() {
+ return bulletedListStyle;
+ }
+
+ public void setBulletedListStyle(BulletedList.Style bulletedListStyle) {
+ this.bulletedListStyle = bulletedListStyle;
+ }
+
+ public Button.State getButtonState() {
+ return buttonState;
+ }
+
+ public void setButtonState(Button.State buttonState) {
+ this.buttonState = buttonState;
+ }
+
+ public CardPaneSkin.SelectionChangeEffect getSelectionChangeEffect() {
+ return selectionChangeEffect;
+ }
+
+ public void setSelectionChangeEffect(CardPaneSkin.SelectionChangeEffect selectionChangeEffect) {
+ this.selectionChangeEffect = selectionChangeEffect;
+ }
+
+ public Cursor getCursor() {
+ return cursor;
+ }
+
+ public void setCursor(Cursor cursor) {
+ this.cursor = cursor;
+ }
+
+ public DropAction getDropAction() {
+ return dropAction;
+ }
+
+ public void setDropAction(DropAction dropAction) {
+ this.dropAction = dropAction;
+ }
+
+ public FileBrowserSheet.Mode getFileBrowserSheetMode() {
+ return fileBrowserSheetMode;
+ }
+
+ public void setFileBrowserSheetMode(FileBrowserSheet.Mode fileBrowserSheetMode) {
+ this.fileBrowserSheetMode = fileBrowserSheetMode;
+ }
+
+ public FocusTraversalDirection getFocusTraversalDirection() {
+ return focusTraversalDirection;
+ }
+
+ public void setFocusTraversalDirection(FocusTraversalDirection focusTraversalDirection) {
+ this.focusTraversalDirection = focusTraversalDirection;
+ }
+
+ public GraphicsUtilities.PaintType getPaintType() {
+ return paintType;
+ }
+
+ public void setPaintType(GraphicsUtilities.PaintType paintType) {
+ this.paintType = paintType;
+ }
+
+ public HorizontalAlignment getHorizontalAlignment() {
+ return horizontalAlignment;
+ }
+
+ public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment) {
+ this.horizontalAlignment = horizontalAlignment;
+ }
+
+ public ImageView.ImageBindMapping.Type getImageBindMappingType() {
+ return imageBindMappingType;
+ }
+
+ public void setImageBindMappingType(ImageView.ImageBindMapping.Type imageBindMappingType) {
+ this.imageBindMappingType = imageBindMappingType;
+ }
+
+ public Keyboard.KeyLocation getKeyLocation() {
+ return keyLocation;
+ }
+
+ public void setKeyLocation(Keyboard.KeyLocation keyLocation) {
+ this.keyLocation = keyLocation;
+ }
+
+ public Keyboard.Modifier getModifier() {
+ return modifier;
+ }
+
+ public void setModifier(Keyboard.Modifier modifier) {
+ this.modifier = modifier;
+ }
+
+ public ListView.SelectMode getListViewSelectMode() {
+ return listViewSelectMode;
+ }
+
+ public void setListViewSelectMode(ListView.SelectMode listViewSelectMode) {
+ this.listViewSelectMode = listViewSelectMode;
+ }
+
+ public MessageBusTest.TestMessage getTestMessage() {
+ return testMessage;
+ }
+
+ public void setTestMessage(MessageBusTest.TestMessage testMessage) {
+ this.testMessage = testMessage;
+ }
+
+ public MessageType getMessageType() {
+ return messageType;
+ }
+
+ public void setMessageType(MessageType messageType) {
+ this.messageType = messageType;
+ }
+
+ public Mouse.Button getMouseButton() {
+ return mouseButton;
+ }
+
+ public void setMouseButton(Mouse.Button mouseButton) {
+ this.mouseButton = mouseButton;
+ }
+
+ public Mouse.ScrollType getMouseScrollType() {
+ return mouseScrollType;
+ }
+
+ public void setMouseScrollType(Mouse.ScrollType mouseScrollType) {
+ this.mouseScrollType = mouseScrollType;
+ }
+
+ public NumberedList.Style getNumberedListStyle() {
+ return numberedListStyle;
+ }
+
+ public void setNumberedListStyle(NumberedList.Style numberedListStyle) {
+ this.numberedListStyle = numberedListStyle;
+ }
+
+ public Orientation getOrientation() {
+ return orientation;
+ }
+
+ public void setOrientation(Orientation orientation) {
+ this.orientation = orientation;
+ }
+
+ public Picture.Interpolation getInterpolation() {
+ return interpolation;
+ }
+
+ public void setInterpolation(Picture.Interpolation interpolation) {
+ this.interpolation = interpolation;
+ }
+
+ public Query.Method getQueryMethod() {
+ return queryMethod;
+ }
+
+ public void setQueryMethod(Query.Method queryMethod) {
+ this.queryMethod = queryMethod;
+ }
+
+ public ScrollPane.Corner.Placement getPlacement() {
+ return placement;
+ }
+
+ public void setPlacement(ScrollPane.Corner.Placement placement) {
+ this.placement = placement;
+ }
+
+ public ScrollPane.ScrollBarPolicy getScrollBarPolicy() {
+ return scrollBarPolicy;
+ }
+
+ public void setScrollBarPolicy(ScrollPane.ScrollBarPolicy scrollBarPolicy) {
+ this.scrollBarPolicy = scrollBarPolicy;
+ }
+
+ public SortDirection getSortDirection() {
+ return sortDirection;
+ }
+
+ public void setSortDirection(SortDirection sortDirection) {
+ this.sortDirection = sortDirection;
+ }
+
+ public SplitPane.Region getSplitPaneRegion() {
+ return splitPaneRegion;
+ }
+
+ public void setSplitPaneRegion(SplitPane.Region splitPaneRegion) {
+ this.splitPaneRegion = splitPaneRegion;
+ }
+
+ public SplitPane.ResizeMode getSplitPaneResizeMode() {
+ return splitPaneResizeMode;
+ }
+
+ public void setSplitPaneResizeMode(SplitPane.ResizeMode splitPaneResizeMode) {
+ this.splitPaneResizeMode = splitPaneResizeMode;
+ }
+
+ public TableView.SelectMode getTableViewSelectMode() {
+ return tableViewSelectMode;
+ }
+
+ public void setTableViewSelectMode(TableView.SelectMode tableViewSelectMode) {
+ this.tableViewSelectMode = tableViewSelectMode;
+ }
+
+ public TableViewHeader.SortMode getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(TableViewHeader.SortMode sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public TextDecoration getTextDecoration() {
+ return textDecoration;
+ }
+
+ public void setTextDecoration(TextDecoration textDecoration) {
+ this.textDecoration = textDecoration;
+ }
+
+ public TextArea.ScrollDirection getScrollDirection() {
+ return scrollDirection;
+ }
+
+ public void setScrollDirection(TextArea.ScrollDirection scrollDirection) {
+ this.scrollDirection = scrollDirection;
+ }
+
+ public TreeView.NodeCheckState getNodeCheckState() {
+ return nodeCheckState;
+ }
+
+ public void setNodeCheckState(TreeView.NodeCheckState nodeCheckState) {
+ this.nodeCheckState = nodeCheckState;
+ }
+
+ public TreeView.SelectMode getTreeViewSelectMode() {
+ return treeViewSelectMode;
+ }
+
+ public void setTreeViewSelectMode(TreeView.SelectMode treeViewSelectMode) {
+ this.treeViewSelectMode = treeViewSelectMode;
+ }
+
+ public VerticalAlignment getVerticalAlignment() {
+ return verticalAlignment;
+ }
+
+ public void setVerticalAlignment(VerticalAlignment verticalAlignment) {
+ this.verticalAlignment = verticalAlignment;
+ }
+
+ public Vote getVote() {
+ return vote;
+ }
+
+ public void setVote(Vote vote) {
+ this.vote = vote;
+ }
+}
diff --git a/tests/src/org/apache/pivot/tests/EnumBeanTest.java b/tests/src/org/apache/pivot/tests/EnumBeanTest.java
index 9a95b09..37b3d11 100644
--- a/tests/src/org/apache/pivot/tests/EnumBeanTest.java
+++ b/tests/src/org/apache/pivot/tests/EnumBeanTest.java
@@ -1,81 +1,81 @@
-/*
- * 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 org.apache.pivot.beans.BXMLSerializer;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.serialization.SerializationException;
-import org.apache.pivot.wtk.Orientation;
-
-public class EnumBeanTest {
- public static void main(String[] args) {
-
- BXMLSerializer bxmlSerializer = new BXMLSerializer();
- try {
- EnumBean enumBean = (EnumBean) bxmlSerializer.readObject(EnumBeanTest.class,
- "enum_bean.bxml");
- System.out.println("Bean read OK - " + enumBean);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (SerializationException e) {
- e.printStackTrace();
- }
-
- EnumBean enumBean = new EnumBean();
- BeanAdapter ba = new BeanAdapter(enumBean);
-
- ba.put("orientationField", Orientation.HORIZONTAL);
- dumpField(enumBean, ba);
- ba.put("orientationField", "vertical");
- dumpField(enumBean, ba);
-
- ba.put("orientation", Orientation.HORIZONTAL);
- dumpSetter(enumBean, ba);
- ba.put("orientation", Orientation.VERTICAL);
- dumpSetter(enumBean, ba);
- ba.put("orientation", null);
- dumpSetter(enumBean, ba);
-
- // Force an error to check the IllegalArgumentException message
- // ba.put("orientation", Vote.APPROVE);
- }
-
- private static void dumpField(EnumBean enumBean, BeanAdapter ba) {
- Object value = enumBean.orientationField;
- System.out.println(String.format("\n%-40s %-20s %s", "Direct field access", value,
- (value == null) ? "[null]" : value.getClass().getName()));
-
- value = ba.get("orientationField");
- System.out.println(String.format("%-40s %-20s %s",
- "BeanAdapter.get(\"orientationField\")", value, (value == null) ? "[null]"
- : value.getClass().getName()));
- }
-
- private static void dumpSetter(EnumBean enumBean, BeanAdapter ba) {
- Object value = enumBean.getOrientation();
- System.out.println(String.format("\n%-40s %-20s %s", "Direct from getter", value,
- (value == null) ? "[null]" : value.getClass().getName()));
-
- value = ba.get("orientation");
- System.out.println(String.format("%-40s %-20s %s", "BeanAdapter.get(\"orientation\")",
- value,
- (value == null) ? "[null]" : value.getClass().getName()));
- }
-}
+/*
+ * 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 org.apache.pivot.beans.BXMLSerializer;
+import org.apache.pivot.beans.BeanAdapter;
+import org.apache.pivot.serialization.SerializationException;
+import org.apache.pivot.wtk.Orientation;
+
+public class EnumBeanTest {
+ public static void main(String[] args) {
+
+ BXMLSerializer bxmlSerializer = new BXMLSerializer();
+ try {
+ EnumBean enumBean = (EnumBean) bxmlSerializer.readObject(EnumBeanTest.class,
+ "enum_bean.bxml");
+ System.out.println("Bean read OK - " + enumBean);
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (SerializationException e) {
+ e.printStackTrace();
+ }
+
+ EnumBean enumBean = new EnumBean();
+ BeanAdapter ba = new BeanAdapter(enumBean);
+
+ ba.put("orientationField", Orientation.HORIZONTAL);
+ dumpField(enumBean, ba);
+ ba.put("orientationField", "vertical");
+ dumpField(enumBean, ba);
+
+ ba.put("orientation", Orientation.HORIZONTAL);
+ dumpSetter(enumBean, ba);
+ ba.put("orientation", Orientation.VERTICAL);
+ dumpSetter(enumBean, ba);
+ ba.put("orientation", null);
+ dumpSetter(enumBean, ba);
+
+ // Force an error to check the IllegalArgumentException message
+ // ba.put("orientation", Vote.APPROVE);
+ }
+
+ private static void dumpField(EnumBean enumBean, BeanAdapter ba) {
+ Object value = enumBean.orientationField;
+ System.out.println(String.format("\n%-40s %-20s %s", "Direct field access", value,
+ (value == null) ? "[null]" : value.getClass().getName()));
+
+ value = ba.get("orientationField");
+ System.out.println(String.format("%-40s %-20s %s",
+ "BeanAdapter.get(\"orientationField\")", value, (value == null) ? "[null]"
+ : value.getClass().getName()));
+ }
+
+ private static void dumpSetter(EnumBean enumBean, BeanAdapter ba) {
+ Object value = enumBean.getOrientation();
+ System.out.println(String.format("\n%-40s %-20s %s", "Direct from getter", value,
+ (value == null) ? "[null]" : value.getClass().getName()));
+
+ value = ba.get("orientation");
+ System.out.println(String.format("%-40s %-20s %s", "BeanAdapter.get(\"orientation\")",
+ value,
+ (value == null) ? "[null]" : value.getClass().getName()));
+ }
+}
diff --git a/tests/src/org/apache/pivot/tests/TerraTheme_test.json b/tests/src/org/apache/pivot/tests/TerraTheme_test.json
index 93daf15..b80a7eb 100644
--- a/tests/src/org/apache/pivot/tests/TerraTheme_test.json
+++ b/tests/src/org/apache/pivot/tests/TerraTheme_test.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Arial 16",
-
- colorMultiplier: 0.2,
-
- colors: [
- "#f2f2f2",
- "#2b2b2b",
- "#998e8a",
- "#0a0a0a",
- "#f0751c",
- "#ff7300",
- "#ffe480",
- "#c13719"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Arial 16",
+
+ colorMultiplier: 0.2,
+
+ colors: [
+ "#f2f2f2",
+ "#2b2b2b",
+ "#998e8a",
+ "#0a0a0a",
+ "#f0751c",
+ "#ff7300",
+ "#ffe480",
+ "#c13719"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/tests/src/org/apache/pivot/tests/enum_bean.bxml b/tests/src/org/apache/pivot/tests/enum_bean.bxml
index 1819a63..bfb9380 100644
--- a/tests/src/org/apache/pivot/tests/enum_bean.bxml
+++ b/tests/src/org/apache/pivot/tests/enum_bean.bxml
@@ -1,229 +1,229 @@
-<?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.
--->
-
-<!--
-Tests the setting of bean enum properties without requiring the enum
-constant name to be specified in a case sensitive manner.
-
-There is also no requirement for the bean itself to have anything other
-than a standard setter methods. ie, No overloaded String setter method is
-required in order to handle the Enum.valueOf(String) aspect of the coercion.
--->
-<EnumBean
- xmlns="org.apache.pivot.tests"
- xmlns:bxml="http://pivot.apache.org/bxml"
-
- bindType="load"
- bufferedImageSerializerFormat="png"
- bulletedListStyle="circle"
- buttonState="mixed"
- cursor="crosshair"
- dropAction="copy"
- fileBrowserSheetMode="open"
- focusTraversalDirection="backward"
- horizontalAlignment="center"
- imageBindMappingType="image"
- interpolation="bicubic"
- keyLocation="keypad"
- listViewSelectMode="multi"
- messageType="error"
- modifier="alt"
- mouseButton="left"
- mouseScrollType="block"
- nodeCheckState="checked"
- numberedListStyle="decimal"
- orientation="horizontal"
- paintType="gradient"
- placement="bottom_left"
- queryMethod="delete"
- scrollBarPolicy="always"
- selectionChangeEffect="crossfade"
- scrollDirection="down"
- sortDirection="ascending"
- sortMode="multi_column"
- splitPaneRegion="bottom_right"
- splitPaneResizeMode="primary_region"
- tableViewSelectMode="multi"
- testMessage="goodbye"
- textDecoration="strikethrough"
- treeViewSelectMode="multi"
- verticalAlignment="bottom"
- vote="approve">
-
- <bindType>load</bindType>
- <bindType>store</bindType>
- <bindType>both</bindType>
-
- <bufferedImageSerializerFormat>png</bufferedImageSerializerFormat>
- <bufferedImageSerializerFormat>jpeg</bufferedImageSerializerFormat>
- <bufferedImageSerializerFormat>bmp</bufferedImageSerializerFormat>
- <bufferedImageSerializerFormat>wbmp</bufferedImageSerializerFormat>
- <bufferedImageSerializerFormat>gif</bufferedImageSerializerFormat>
-
- <bulletedListStyle>circle</bulletedListStyle>
- <bulletedListStyle>circle_outline</bulletedListStyle>
-
- <buttonState>mixed</buttonState>
- <buttonState>selected</buttonState>
- <buttonState>unselected</buttonState>
-
- <cursor>crosshair</cursor>
- <cursor>default</cursor>
- <cursor>hand</cursor>
- <cursor>move</cursor>
- <cursor>resize_east</cursor>
- <cursor>resize_north</cursor>
- <cursor>resize_north_east</cursor>
- <cursor>resize_north_west</cursor>
- <cursor>resize_south</cursor>
- <cursor>resize_south_east</cursor>
- <cursor>resize_south_west</cursor>
- <cursor>resize_west</cursor>
- <cursor>text</cursor>
- <cursor>wait</cursor>
-
- <dropAction>copy</dropAction>
- <dropAction>link</dropAction>
- <dropAction>move</dropAction>
-
- <fileBrowserSheetMode>open</fileBrowserSheetMode>
- <fileBrowserSheetMode>open_multiple</fileBrowserSheetMode>
- <fileBrowserSheetMode>save_as</fileBrowserSheetMode>
- <fileBrowserSheetMode>save_to</fileBrowserSheetMode>
-
- <focusTraversalDirection>backward</focusTraversalDirection>
- <focusTraversalDirection>forward</focusTraversalDirection>
-
- <horizontalAlignment>center</horizontalAlignment>
- <horizontalAlignment>left</horizontalAlignment>
- <horizontalAlignment>right</horizontalAlignment>
-
- <imageBindMappingType>image</imageBindMappingType>
- <imageBindMappingType>name</imageBindMappingType>
- <imageBindMappingType>url</imageBindMappingType>
-
- <interpolation>bicubic</interpolation>
- <interpolation>bilinear</interpolation>
- <interpolation>nearest_neighbor</interpolation>
-
- <keyLocation>keypad</keyLocation>
- <keyLocation>left</keyLocation>
- <keyLocation>right</keyLocation>
- <keyLocation>standard</keyLocation>
-
- <listViewSelectMode>multi</listViewSelectMode>
- <listViewSelectMode>none</listViewSelectMode>
- <listViewSelectMode>single</listViewSelectMode>
-
- <messageType>error</messageType>
- <messageType>info</messageType>
- <messageType>question</messageType>
- <messageType>warning</messageType>
-
- <modifier>alt</modifier>
- <modifier>ctrl</modifier>
- <modifier>meta</modifier>
- <modifier>shift</modifier>
-
- <mouseButton>left</mouseButton>
- <mouseButton>middle</mouseButton>
- <mouseButton>right</mouseButton>
-
- <mouseScrollType>block</mouseScrollType>
- <mouseScrollType>unit</mouseScrollType>
-
- <nodeCheckState>checked</nodeCheckState>
- <nodeCheckState>mixed</nodeCheckState>
- <nodeCheckState>unchecked</nodeCheckState>
-
- <numberedListStyle>decimal</numberedListStyle>
- <numberedListStyle>lower_alpha</numberedListStyle>
- <numberedListStyle>upper_alpha</numberedListStyle>
- <numberedListStyle>lower_roman</numberedListStyle>
- <numberedListStyle>upper_roman</numberedListStyle>
-
- <orientation>horizontal</orientation>
- <orientation>vertical</orientation>
-
- <paintType>gradient</paintType>
- <paintType>linear_gradient</paintType>
- <paintType>radial_gradient</paintType>
- <paintType>solid_color</paintType>
-
- <placement>bottom_left</placement>
- <placement>bottom_right</placement>
- <placement>top_left</placement>
- <placement>top_right</placement>
-
- <queryMethod>delete</queryMethod>
- <queryMethod>get</queryMethod>
- <queryMethod>post</queryMethod>
- <queryMethod>put</queryMethod>
-
- <scrollBarPolicy>always</scrollBarPolicy>
- <scrollBarPolicy>auto</scrollBarPolicy>
- <scrollBarPolicy>fill</scrollBarPolicy>
- <scrollBarPolicy>fill_to_capacity</scrollBarPolicy>
- <scrollBarPolicy>never</scrollBarPolicy>
-
- <selectionChangeEffect>crossfade</selectionChangeEffect>
- <selectionChangeEffect>horizontal_flip</selectionChangeEffect>
- <selectionChangeEffect>horizontal_slide</selectionChangeEffect>
- <selectionChangeEffect>vertical_flip</selectionChangeEffect>
- <selectionChangeEffect>vertical_slide</selectionChangeEffect>
- <selectionChangeEffect>zoom</selectionChangeEffect>
-
- <scrollDirection>down</scrollDirection>
- <scrollDirection>up</scrollDirection>
-
- <sortDirection>ascending</sortDirection>
- <sortDirection>descending</sortDirection>
-
- <sortMode>multi_column</sortMode>
- <sortMode>none</sortMode>
- <sortMode>single_column</sortMode>
-
- <splitPaneRegion>bottom_right</splitPaneRegion>
- <splitPaneRegion>top_left</splitPaneRegion>
-
- <splitPaneResizeMode>primary_region</splitPaneResizeMode>
- <splitPaneResizeMode>split_ratio</splitPaneResizeMode>
-
- <tableViewSelectMode>multi</tableViewSelectMode>
- <tableViewSelectMode>none</tableViewSelectMode>
- <tableViewSelectMode>single</tableViewSelectMode>
-
- <testMessage>goodbye</testMessage>
- <testMessage>hello</testMessage>
-
- <textDecoration>strikethrough</textDecoration>
- <textDecoration>underline</textDecoration>
-
- <treeViewSelectMode>multi</treeViewSelectMode>
- <treeViewSelectMode>none</treeViewSelectMode>
- <treeViewSelectMode>single</treeViewSelectMode>
-
- <verticalAlignment>bottom</verticalAlignment>
- <verticalAlignment>center</verticalAlignment>
- <verticalAlignment>top</verticalAlignment>
-
- <vote>approve</vote>
- <vote>defer</vote>
- <vote>deny</vote>
-
+<?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.
+-->
+
+<!--
+Tests the setting of bean enum properties without requiring the enum
+constant name to be specified in a case sensitive manner.
+
+There is also no requirement for the bean itself to have anything other
+than a standard setter methods. ie, No overloaded String setter method is
+required in order to handle the Enum.valueOf(String) aspect of the coercion.
+-->
+<EnumBean
+ xmlns="org.apache.pivot.tests"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+
+ bindType="load"
+ bufferedImageSerializerFormat="png"
+ bulletedListStyle="circle"
+ buttonState="mixed"
+ cursor="crosshair"
+ dropAction="copy"
+ fileBrowserSheetMode="open"
+ focusTraversalDirection="backward"
+ horizontalAlignment="center"
+ imageBindMappingType="image"
+ interpolation="bicubic"
+ keyLocation="keypad"
+ listViewSelectMode="multi"
+ messageType="error"
+ modifier="alt"
+ mouseButton="left"
+ mouseScrollType="block"
+ nodeCheckState="checked"
+ numberedListStyle="decimal"
+ orientation="horizontal"
+ paintType="gradient"
+ placement="bottom_left"
+ queryMethod="delete"
+ scrollBarPolicy="always"
+ selectionChangeEffect="crossfade"
+ scrollDirection="down"
+ sortDirection="ascending"
+ sortMode="multi_column"
+ splitPaneRegion="bottom_right"
+ splitPaneResizeMode="primary_region"
+ tableViewSelectMode="multi"
+ testMessage="goodbye"
+ textDecoration="strikethrough"
+ treeViewSelectMode="multi"
+ verticalAlignment="bottom"
+ vote="approve">
+
+ <bindType>load</bindType>
+ <bindType>store</bindType>
+ <bindType>both</bindType>
+
+ <bufferedImageSerializerFormat>png</bufferedImageSerializerFormat>
+ <bufferedImageSerializerFormat>jpeg</bufferedImageSerializerFormat>
+ <bufferedImageSerializerFormat>bmp</bufferedImageSerializerFormat>
+ <bufferedImageSerializerFormat>wbmp</bufferedImageSerializerFormat>
+ <bufferedImageSerializerFormat>gif</bufferedImageSerializerFormat>
+
+ <bulletedListStyle>circle</bulletedListStyle>
+ <bulletedListStyle>circle_outline</bulletedListStyle>
+
+ <buttonState>mixed</buttonState>
+ <buttonState>selected</buttonState>
+ <buttonState>unselected</buttonState>
+
+ <cursor>crosshair</cursor>
+ <cursor>default</cursor>
+ <cursor>hand</cursor>
+ <cursor>move</cursor>
+ <cursor>resize_east</cursor>
+ <cursor>resize_north</cursor>
+ <cursor>resize_north_east</cursor>
+ <cursor>resize_north_west</cursor>
+ <cursor>resize_south</cursor>
+ <cursor>resize_south_east</cursor>
+ <cursor>resize_south_west</cursor>
+ <cursor>resize_west</cursor>
+ <cursor>text</cursor>
+ <cursor>wait</cursor>
+
+ <dropAction>copy</dropAction>
+ <dropAction>link</dropAction>
+ <dropAction>move</dropAction>
+
+ <fileBrowserSheetMode>open</fileBrowserSheetMode>
+ <fileBrowserSheetMode>open_multiple</fileBrowserSheetMode>
+ <fileBrowserSheetMode>save_as</fileBrowserSheetMode>
+ <fileBrowserSheetMode>save_to</fileBrowserSheetMode>
+
+ <focusTraversalDirection>backward</focusTraversalDirection>
+ <focusTraversalDirection>forward</focusTraversalDirection>
+
+ <horizontalAlignment>center</horizontalAlignment>
+ <horizontalAlignment>left</horizontalAlignment>
+ <horizontalAlignment>right</horizontalAlignment>
+
+ <imageBindMappingType>image</imageBindMappingType>
+ <imageBindMappingType>name</imageBindMappingType>
+ <imageBindMappingType>url</imageBindMappingType>
+
+ <interpolation>bicubic</interpolation>
+ <interpolation>bilinear</interpolation>
+ <interpolation>nearest_neighbor</interpolation>
+
+ <keyLocation>keypad</keyLocation>
+ <keyLocation>left</keyLocation>
+ <keyLocation>right</keyLocation>
+ <keyLocation>standard</keyLocation>
+
+ <listViewSelectMode>multi</listViewSelectMode>
+ <listViewSelectMode>none</listViewSelectMode>
+ <listViewSelectMode>single</listViewSelectMode>
+
+ <messageType>error</messageType>
+ <messageType>info</messageType>
+ <messageType>question</messageType>
+ <messageType>warning</messageType>
+
+ <modifier>alt</modifier>
+ <modifier>ctrl</modifier>
+ <modifier>meta</modifier>
+ <modifier>shift</modifier>
+
+ <mouseButton>left</mouseButton>
+ <mouseButton>middle</mouseButton>
+ <mouseButton>right</mouseButton>
+
+ <mouseScrollType>block</mouseScrollType>
+ <mouseScrollType>unit</mouseScrollType>
+
+ <nodeCheckState>checked</nodeCheckState>
+ <nodeCheckState>mixed</nodeCheckState>
+ <nodeCheckState>unchecked</nodeCheckState>
+
+ <numberedListStyle>decimal</numberedListStyle>
+ <numberedListStyle>lower_alpha</numberedListStyle>
+ <numberedListStyle>upper_alpha</numberedListStyle>
+ <numberedListStyle>lower_roman</numberedListStyle>
+ <numberedListStyle>upper_roman</numberedListStyle>
+
+ <orientation>horizontal</orientation>
+ <orientation>vertical</orientation>
+
+ <paintType>gradient</paintType>
+ <paintType>linear_gradient</paintType>
+ <paintType>radial_gradient</paintType>
+ <paintType>solid_color</paintType>
+
+ <placement>bottom_left</placement>
+ <placement>bottom_right</placement>
+ <placement>top_left</placement>
+ <placement>top_right</placement>
+
+ <queryMethod>delete</queryMethod>
+ <queryMethod>get</queryMethod>
+ <queryMethod>post</queryMethod>
+ <queryMethod>put</queryMethod>
+
+ <scrollBarPolicy>always</scrollBarPolicy>
+ <scrollBarPolicy>auto</scrollBarPolicy>
+ <scrollBarPolicy>fill</scrollBarPolicy>
+ <scrollBarPolicy>fill_to_capacity</scrollBarPolicy>
+ <scrollBarPolicy>never</scrollBarPolicy>
+
+ <selectionChangeEffect>crossfade</selectionChangeEffect>
+ <selectionChangeEffect>horizontal_flip</selectionChangeEffect>
+ <selectionChangeEffect>horizontal_slide</selectionChangeEffect>
+ <selectionChangeEffect>vertical_flip</selectionChangeEffect>
+ <selectionChangeEffect>vertical_slide</selectionChangeEffect>
+ <selectionChangeEffect>zoom</selectionChangeEffect>
+
+ <scrollDirection>down</scrollDirection>
+ <scrollDirection>up</scrollDirection>
+
+ <sortDirection>ascending</sortDirection>
+ <sortDirection>descending</sortDirection>
+
+ <sortMode>multi_column</sortMode>
+ <sortMode>none</sortMode>
+ <sortMode>single_column</sortMode>
+
+ <splitPaneRegion>bottom_right</splitPaneRegion>
+ <splitPaneRegion>top_left</splitPaneRegion>
+
+ <splitPaneResizeMode>primary_region</splitPaneResizeMode>
+ <splitPaneResizeMode>split_ratio</splitPaneResizeMode>
+
+ <tableViewSelectMode>multi</tableViewSelectMode>
+ <tableViewSelectMode>none</tableViewSelectMode>
+ <tableViewSelectMode>single</tableViewSelectMode>
+
+ <testMessage>goodbye</testMessage>
+ <testMessage>hello</testMessage>
+
+ <textDecoration>strikethrough</textDecoration>
+ <textDecoration>underline</textDecoration>
+
+ <treeViewSelectMode>multi</treeViewSelectMode>
+ <treeViewSelectMode>none</treeViewSelectMode>
+ <treeViewSelectMode>single</treeViewSelectMode>
+
+ <verticalAlignment>bottom</verticalAlignment>
+ <verticalAlignment>center</verticalAlignment>
+ <verticalAlignment>top</verticalAlignment>
+
+ <vote>approve</vote>
+ <vote>defer</vote>
+ <vote>deny</vote>
+
</EnumBean>
\ No newline at end of file
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
index 97c049f..1748bbd 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
@@ -934,7 +934,8 @@
public Vote previewSelectedIndexChange(final Accordion accordion, final int selectedIndex) {
Vote vote = Vote.APPROVE;
- if (accordion.isShowing()) {
+ if (accordion.isShowing()
+ && accordion.isValid()) {
if (selectionChangeTransition == null) {
int previousSelectedIndex = accordion.getSelectedIndex();
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_de.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_de.json
index 82239e5..8c103dd 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_de.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_de.json
@@ -1,21 +1,21 @@
-/*
- * 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.
- */
-{ saveAs: "Speichern als:",
- ok: "OK",
- cancel: "Abbruch"
-}
-
+/*
+ * 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.
+ */
+{ saveAs: "Speichern als:",
+ ok: "OK",
+ cancel: "Abbruch"
+}
+
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_it.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_it.json
index 662033b..2f133dc 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_it.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_it.json
@@ -1,21 +1,21 @@
-/*
- * 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.
- */
-{ saveAs: "Salva come:",
- ok: "OK",
- cancel: "Annulla"
-}
-
+/*
+ * 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.
+ */
+{ saveAs: "Salva come:",
+ ok: "OK",
+ cancel: "Annulla"
+}
+
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_pl.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_pl.json
index 383149e..fbcf33f 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_pl.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin_pl.json
@@ -1,21 +1,21 @@
-/*
- * 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.
- */
-{ saveAs: "Zapisz jako:",
- ok: "OK",
- cancel: "Anuluj"
-}
-
+/*
+ * 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.
+ */
+{ saveAs: "Zapisz jako:",
+ ok: "OK",
+ cancel: "Anuluj"
+}
+
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_de.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_de.json
index ab1495c..376ee57 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_de.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_de.json
@@ -1,27 +1,27 @@
-/*
- * 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.
- */
-{ selectDrive: "Laufwerk auswählen",
- goTo: "Ordner auswählen",
- goUp: "Eine Ebene nach oben",
- newFolder: "Neuen Ordner erstellen",
- goHome: "Eigene Dateien anzeigen",
- search: "suchen",
- searchFor: "Suche nach Dateien",
- fileName: "Datei",
- size: "Größe",
- lastModified: "Geändert am"
-}
+/*
+ * 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.
+ */
+{ selectDrive: "Laufwerk auswählen",
+ goTo: "Ordner auswählen",
+ goUp: "Eine Ebene nach oben",
+ newFolder: "Neuen Ordner erstellen",
+ goHome: "Eigene Dateien anzeigen",
+ search: "suchen",
+ searchFor: "Suche nach Dateien",
+ fileName: "Datei",
+ size: "Größe",
+ lastModified: "Geändert am"
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_it.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_it.json
index 02da855..a29a271 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_it.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_it.json
@@ -1,27 +1,27 @@
-/*
- * 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.
- */
-{ selectDrive: "Selezionare un disco",
- goTo: "Vai a cartella",
- goUp: "Sali di una cartella",
- newFolder: "Crea nuova cartella",
- goHome: "Vai a cartella Home",
- search: "cerca",
- searchFor: "Ricerca files",
- fileName: "File",
- size: "Dimensione",
- lastModified: "Modificato"
-}
+/*
+ * 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.
+ */
+{ selectDrive: "Selezionare un disco",
+ goTo: "Vai a cartella",
+ goUp: "Sali di una cartella",
+ newFolder: "Crea nuova cartella",
+ goHome: "Vai a cartella Home",
+ search: "cerca",
+ searchFor: "Ricerca files",
+ fileName: "File",
+ size: "Dimensione",
+ lastModified: "Modificato"
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_pl.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_pl.json
index ac9b039..f983ab7 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_pl.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin_pl.json
@@ -1,27 +1,27 @@
-/*
- * 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.
- */
-{ selectDrive: "Wybierz dysk",
- goTo: "Idz do folderu",
- goUp: "Idz poziom wyøej",
- newFolder: "StwÛrz nowy folder",
- goHome: "Idz do folderu domowego",
- search: "szukaj",
- searchFor: "Szukaj plikÛw",
- fileName: "Plik",
- size: "WielkoúÊ",
- lastModified: "Zmodyfikowano"
-}
+/*
+ * 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.
+ */
+{ selectDrive: "Wybierz dysk",
+ goTo: "Idz do folderu",
+ goUp: "Idz poziom wyøej",
+ newFolder: "StwÛrz nowy folder",
+ goHome: "Idz do folderu domowego",
+ search: "szukaj",
+ searchFor: "Szukaj plikÛw",
+ fileName: "Plik",
+ size: "WielkoúÊ",
+ lastModified: "Zmodyfikowano"
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_dark.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_dark.json
index 89a2f79..acc6e74 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_dark.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_dark.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Verdana 11",
-
- colorMultiplier: 0.2,
-
- colors: [
- "#f2f2f2",
- "#2b2b2b",
- "#998e8a",
- "#0a0a0a",
- "#f0751c",
- "#ff7300",
- "#ffe480",
- "#c13719"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Verdana 11",
+
+ colorMultiplier: 0.2,
+
+ colors: [
+ "#f2f2f2",
+ "#2b2b2b",
+ "#998e8a",
+ "#0a0a0a",
+ "#f0751c",
+ "#ff7300",
+ "#ffe480",
+ "#c13719"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_swing.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_swing.json
index 0f28869..4aecc3e 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_swing.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_swing.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Verdana 11",
-
- colorMultiplier: 0.1,
-
- colors: [
- "#000000",
- "#eeeeee",
- "#8ea1b2",
- "#ffffff",
- "#7a8a99",
- "#7a8a99",
- "#ffff00",
- "#ff0000"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Verdana 11",
+
+ colorMultiplier: 0.1,
+
+ colors: [
+ "#000000",
+ "#eeeeee",
+ "#8ea1b2",
+ "#ffffff",
+ "#7a8a99",
+ "#7a8a99",
+ "#ffff00",
+ "#ff0000"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_ubuntu.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_ubuntu.json
index cfd0a8a..ed7e2d4 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_ubuntu.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_ubuntu.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Verdana 11",
-
- colorMultiplier: 0.1,
-
- colors: [
- "#3c3b37",
- "#f0ebe2",
- "#ccbfa9",
- "#ffffff",
- "#3b3b3b",
- "#ab9c85",
- "#fad26c",
- "#f0583d"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Verdana 11",
+
+ colorMultiplier: 0.1,
+
+ colors: [
+ "#3c3b37",
+ "#f0ebe2",
+ "#ccbfa9",
+ "#ffffff",
+ "#3b3b3b",
+ "#ab9c85",
+ "#fad26c",
+ "#f0583d"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_win2k.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_win2k.json
index 38b5180..6aacae6 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_win2k.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_win2k.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Verdana 11",
-
- colorMultiplier: 0.1,
-
- colors: [
- "#000000",
- "#D2CFC8",
- "#C0C0C0",
- "#E6E6E6",
- "#316AC5",
- "#0055EA",
- "#FFFFE0",
- "#F5001C"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Verdana 11",
+
+ colorMultiplier: 0.1,
+
+ colors: [
+ "#000000",
+ "#D2CFC8",
+ "#C0C0C0",
+ "#E6E6E6",
+ "#316AC5",
+ "#0055EA",
+ "#FFFFE0",
+ "#F5001C"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_winxp2.json b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_winxp2.json
index 999ad7e..d84422d 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_winxp2.json
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme_winxp2.json
@@ -1,45 +1,45 @@
-/*
- * 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.
- */
-{ font: "Verdana 11",
-
- colorMultiplier: 0.1,
-
- colors: [
- "#000000",
- "#F4F4F4",
- "#C0C0C0",
- "#E6E6E6",
- "#316AC5",
- "#0055EA",
- "#FFFFE0",
- "#F5001C"
- ],
-
- messageIcons: {
- error: "message_type-error-32x32.png",
- warning: "message_type-warning-32x32.png",
- question: "message_type-question-32x32.png",
- info: "message_type-info-32x32.png"
- },
-
- smallMessageIcons: {
- error: "message_type-error-16x16.png",
- warning: "message_type-warning-16x16.png",
- question: "message_type-question-16x16.png",
- info: "message_type-info-16x16.png"
- }
-}
+/*
+ * 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.
+ */
+{ font: "Verdana 11",
+
+ colorMultiplier: 0.1,
+
+ colors: [
+ "#000000",
+ "#F4F4F4",
+ "#C0C0C0",
+ "#E6E6E6",
+ "#316AC5",
+ "#0055EA",
+ "#FFFFE0",
+ "#F5001C"
+ ],
+
+ messageIcons: {
+ error: "message_type-error-32x32.png",
+ warning: "message_type-warning-32x32.png",
+ question: "message_type-question-32x32.png",
+ info: "message_type-info-32x32.png"
+ },
+
+ smallMessageIcons: {
+ error: "message_type-error-16x16.png",
+ warning: "message_type-warning-16x16.png",
+ question: "message_type-question-16x16.png",
+ info: "message_type-info-16x16.png"
+ }
+}
diff --git a/wtk/src/org/apache/pivot/wtk/Alert_it.json b/wtk/src/org/apache/pivot/wtk/Alert_it.json
index df4d082..fd4e976 100644
--- a/wtk/src/org/apache/pivot/wtk/Alert_it.json
+++ b/wtk/src/org/apache/pivot/wtk/Alert_it.json
@@ -1,23 +1,23 @@
-/*
- * 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.
- */
-{ defaultOption: "OK",
- defaultTitle: "Avviso",
- defaultErrorTitle: "Errore",
- defaultWarningTitle: "Attenzione",
- defaultQuestionTitle: "Domanda",
- defaultInfoTitle: "Informazione"
-}
+/*
+ * 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.
+ */
+{ defaultOption: "OK",
+ defaultTitle: "Avviso",
+ defaultErrorTitle: "Errore",
+ defaultWarningTitle: "Attenzione",
+ defaultQuestionTitle: "Domanda",
+ defaultInfoTitle: "Informazione"
+}
diff --git a/wtk/src/org/apache/pivot/wtk/Alert_pl.json b/wtk/src/org/apache/pivot/wtk/Alert_pl.json
index f60723f..09193e1 100644
--- a/wtk/src/org/apache/pivot/wtk/Alert_pl.json
+++ b/wtk/src/org/apache/pivot/wtk/Alert_pl.json
@@ -1,23 +1,23 @@
-/*
- * 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.
- */
-{ defaultOption: "OK",
- defaultTitle: "Uwaga",
- defaultErrorTitle: "Błąd",
- defaultWarningTitle: "Ostrzeøenie",
- defaultQuestionTitle: "Pytanie",
- defaultInfoTitle: "Informacja"
-}
+/*
+ * 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.
+ */
+{ defaultOption: "OK",
+ defaultTitle: "Uwaga",
+ defaultErrorTitle: "Błąd",
+ defaultWarningTitle: "Ostrzeøenie",
+ defaultQuestionTitle: "Pytanie",
+ defaultInfoTitle: "Informacja"
+}
diff --git a/wtk/src/org/apache/pivot/wtk/Prompt_de.json b/wtk/src/org/apache/pivot/wtk/Prompt_de.json
index 2eda4da..758c07a 100644
--- a/wtk/src/org/apache/pivot/wtk/Prompt_de.json
+++ b/wtk/src/org/apache/pivot/wtk/Prompt_de.json
@@ -1,18 +1,18 @@
-/*
- * 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.
- */
-{ defaultOption: "OK"
-}
+/*
+ * 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.
+ */
+{ defaultOption: "OK"
+}
diff --git a/wtk/src/org/apache/pivot/wtk/Prompt_it.json b/wtk/src/org/apache/pivot/wtk/Prompt_it.json
index 2eda4da..758c07a 100644
--- a/wtk/src/org/apache/pivot/wtk/Prompt_it.json
+++ b/wtk/src/org/apache/pivot/wtk/Prompt_it.json
@@ -1,18 +1,18 @@
-/*
- * 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.
- */
-{ defaultOption: "OK"
-}
+/*
+ * 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.
+ */
+{ defaultOption: "OK"
+}
diff --git a/wtk/src/org/apache/pivot/wtk/Prompt_pl.json b/wtk/src/org/apache/pivot/wtk/Prompt_pl.json
index 2eda4da..758c07a 100644
--- a/wtk/src/org/apache/pivot/wtk/Prompt_pl.json
+++ b/wtk/src/org/apache/pivot/wtk/Prompt_pl.json
@@ -1,18 +1,18 @@
-/*
- * 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.
- */
-{ defaultOption: "OK"
-}
+/*
+ * 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.
+ */
+{ defaultOption: "OK"
+}
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java
index c7cc126..4cf4997 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java
@@ -19,8 +19,7 @@
import java.awt.Color;
import java.awt.Font;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.wtk.Component;
import org.apache.pivot.wtk.Insets;
import org.apache.pivot.wtk.Label;
@@ -87,17 +86,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
-
+ Object cellData = JSON.get(row, columnName);
return (cellData == null) ? null : cellData.toString();
}
}
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java
index 4e45c58..ca7f104 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java
@@ -21,8 +21,7 @@
import java.util.Calendar;
import java.util.Date;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.util.CalendarDate;
/**
@@ -51,16 +50,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
String string;
if (cellData instanceof Date) {
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java
index c19ea6d..59930ce 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java
@@ -16,8 +16,7 @@
*/
package org.apache.pivot.wtk.content;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.text.FileSizeFormat;
import org.apache.pivot.wtk.HorizontalAlignment;
import org.apache.pivot.wtk.Insets;
@@ -36,16 +35,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
String string;
if (cellData instanceof Number) {
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
index f965348..3c1e4df 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
@@ -16,14 +16,12 @@
*/
package org.apache.pivot.wtk.content;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.wtk.ImageView;
import org.apache.pivot.wtk.TableView;
import org.apache.pivot.wtk.TableView.CellRenderer;
import org.apache.pivot.wtk.media.Image;
-
/**
* Default renderer for table view cells that contain image data.
*/
@@ -61,7 +59,6 @@
super.setPreferredSize(preferredWidth, preferredHeight);
}
- @SuppressWarnings("unchecked")
@Override
public void render(Object row, int rowIndex, int columnIndex,
TableView tableView, String columnName,
@@ -71,14 +68,7 @@
// Get the row and cell data
if (columnName != null) {
- Dictionary<String, Object> rowData;
- if (row instanceof Dictionary<?, ?>) {
- rowData = (Dictionary<String, Object>)row;
- } else {
- rowData = new BeanAdapter(row);
- }
-
- Object cellData = rowData.get(columnName);
+ Object cellData = JSON.get(row, columnName);
if (cellData == null
|| cellData instanceof Image) {
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
index ebe91d4..1a72a81 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
@@ -18,11 +18,11 @@
import java.awt.Graphics2D;
-import org.apache.pivot.beans.BeanAdapter;
import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.collections.Dictionary;
import org.apache.pivot.collections.HashMap;
import org.apache.pivot.collections.Sequence;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.wtk.Dimensions;
import org.apache.pivot.wtk.TableView;
import org.apache.pivot.wtk.content.TableViewCellRenderer;
@@ -310,7 +310,6 @@
}
@Override
- @SuppressWarnings("unchecked")
public void render(Object row, int rowIndex, int columnIndex,
TableView tableView, String columnName,
boolean selected, boolean highlighted, boolean disabled) {
@@ -321,14 +320,7 @@
selected, highlighted, disabled);
}
} else {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
TableView.CellRenderer cellRenderer = null;
Class<?> valueClass = (cellData == null ? null : cellData.getClass());
@@ -356,16 +348,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
TableView.CellRenderer cellRenderer = null;
Class<?> valueClass = (cellData == null ? null : cellData.getClass());
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
index 2e95a99..b49d1a4 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
@@ -19,8 +19,7 @@
import java.text.DecimalFormat;
import java.text.NumberFormat;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.wtk.HorizontalAlignment;
import org.apache.pivot.wtk.Insets;
@@ -58,16 +57,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
String string;
if (cellData instanceof Number) {
diff --git a/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java b/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java
index 1f6528c..82b2c60 100644
--- a/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java
+++ b/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java
@@ -19,8 +19,7 @@
import java.awt.Color;
import java.awt.Font;
-import org.apache.pivot.beans.BeanAdapter;
-import org.apache.pivot.collections.Dictionary;
+import org.apache.pivot.json.JSON;
import org.apache.pivot.wtk.Component;
import org.apache.pivot.wtk.Insets;
import org.apache.pivot.wtk.TableView;
@@ -85,16 +84,8 @@
}
@Override
- @SuppressWarnings("unchecked")
public String toString(Object row, String columnName) {
- Dictionary<String, Object> dictionary;
- if (row instanceof Dictionary<?, ?>) {
- dictionary = (Dictionary<String, Object>)row;
- } else {
- dictionary = new BeanAdapter(row);
- }
-
- Object cellData = dictionary.get(columnName);
+ Object cellData = JSON.get(row, columnName);
return (cellData == null) ? null : cellData.toString();
}
}
diff --git a/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinListView.java b/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinListView.java
index 4cf284f..b9f53bb 100644
--- a/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinListView.java
+++ b/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinListView.java
@@ -1,3 +1,19 @@
+/*
+ * 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.wtk.skin;
import org.apache.pivot.wtk.text.List;