Author: rwhitcomb
Date: Fri Apr 27 00:00:08 2018
New Revision: 1830285

URL: http://svn.apache.org/viewvc?rev=1830285&view=rev
Log:
PIVOT-1032: Fix a host of "check style" errors in various places.  No particular
rhyme or reason except we went after some of the lower frequency errors and
when a file was changed other things were usually addressed in that file also.


Modified:
    pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Failure.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Option.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Some.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Success.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/Try.java
    pivot/trunk/core/src/org/apache/pivot/functional/monad/TryCompanion.java
    pivot/trunk/core/test/org/apache/pivot/functional/monad/test/OptionTest.java
    pivot/trunk/core/test/org/apache/pivot/functional/monad/test/TryTest.java
    pivot/trunk/core/test/org/apache/pivot/util/test/BooleanResultTest.java
    pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java
    pivot/trunk/tests/src/org/apache/pivot/tests/CardPaneTest.java
    pivot/trunk/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java
    pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot686.java
    
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Pivot.java
    
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java
    
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/BXMLExplorerDocument.java
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/text/TextInputs.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCheckboxSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPaletteSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Gauge.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Span.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/LabelSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/NumberRulerSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/validation/RegexTextValidator.java

Modified: 
pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java 
(original)
+++ pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java 
Fri Apr 27 00:00:08 2018
@@ -49,7 +49,7 @@ public class ListAdapter<T> implements L
         this.list = list;
     }
 
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public ListAdapter(T... a) {
         this.list = Arrays.asList(a);
     }

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Failure.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Failure.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Failure.java 
(original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Failure.java Fri Apr 
27 00:00:08 2018
@@ -20,7 +20,7 @@ package org.apache.pivot.functional.mona
  * Generic container, to hold the unsuccessful result of a computation (a 
RuntimeException).
  */
 public class Failure<T> extends Try<T> {
-    final RuntimeException value;
+    protected final RuntimeException value;
 
     /**
      * Default constructor, do not use because it set null as invariant value 
to hold.
@@ -30,7 +30,7 @@ public class Failure<T> extends Try<T> {
     }
 
     /**
-     * Constructor with a value to set
+     * Constructor with a value to set.
      * @param val the RuntimeException to set
      */
     public Failure(final RuntimeException val) {

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java Fri Apr 
27 00:00:08 2018
@@ -21,7 +21,7 @@ package org.apache.pivot.functional.mona
  */
 public abstract class Monad<T> implements MonadicOperations<T> {
 
-    /** Default constructor */
+    /** Default constructor. */
     protected Monad() {
         // no-op
     }

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Option.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Option.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Option.java 
(original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Option.java Fri Apr 
27 00:00:08 2018
@@ -22,7 +22,7 @@ import java.util.Iterator;
  * Definition of a generic Option container, to hold an invariant value 
(derived from Monad).
  */
 public abstract class Option<T> extends Monad<T> implements Iterable<T> {
-    final T value;
+    protected final T value;
 
     /**
      * Default constructor, do not use because it set null as invariant value 
to hold.
@@ -32,7 +32,7 @@ public abstract class Option<T> extends
     }
 
     /**
-     * Constructor with a value to set in the Option
+     * Constructor with a value to set in the Option.
      * @param val the value to set in the Option
      */
     public Option(final T val) {
@@ -57,7 +57,7 @@ public abstract class Option<T> extends
      * @return value if set, otherwise alternativeValue
      */
     public T getValueOrElse(final T alternativeValue) {
-        return (hasValue() == true) ? getValue() : alternativeValue;
+        return hasValue() ? getValue() : alternativeValue;
     }
 
     /**
@@ -105,7 +105,7 @@ public abstract class Option<T> extends
     }
 
     /**
-     * Return an Iterator
+     * Return an Iterator over this option.
      * @see java.lang.Iterable#iterator()
      */
     @Override

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Some.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Some.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Some.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Some.java Fri Apr 27 
00:00:08 2018
@@ -30,7 +30,7 @@ public final class Some<T> extends Optio
     }
 
     /**
-     * Constructor with a value to set here
+     * Constructor with a value to set here.
      *
      * @param val the value to set
      */

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Success.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Success.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Success.java 
(original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Success.java Fri Apr 
27 00:00:08 2018
@@ -20,17 +20,17 @@ package org.apache.pivot.functional.mona
  * Generic container, to hold the successful result of a computation.
  */
 public class Success<T> extends Try<T> {
-    final T value;
+    protected final T value;
 
     /**
-     * Default constructor, do not use because it set null as invariant value 
to hold.
+     * Default constructor, do not use because it will throw an exception.
      */
     public Success() {
         throw new IllegalArgumentException("Success must have a value in the 
constructor");
     }
 
     /**
-     * Constructor with a value to set in the Option
+     * Constructor with a value to set.
      * @param val the value to set
      */
     public Success(final T val) {

Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Try.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Try.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/Try.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Try.java Fri Apr 27 
00:00:08 2018
@@ -23,7 +23,7 @@ import java.util.Iterator;
  */
 public abstract class Try<T> extends Monad<T> implements Iterable<T> {
 
-    /** Default constructor */
+    /** Default constructor. */
     protected Try() {
         // no-op
     }
@@ -46,7 +46,7 @@ public abstract class Try<T> extends Mon
      * @return value if it is a successful value, otherwise alternativeValue
      */
     public T getValueOrElse(final T alternativeValue) {
-        return (isSuccess() == true) ? getValue() : alternativeValue;
+        return isSuccess() ? getValue() : alternativeValue;
     }
 
     /**
@@ -63,7 +63,7 @@ public abstract class Try<T> extends Mon
     }
 
     /**
-     * Return an Iterator
+     * Return an Iterator.
      * @see java.lang.Iterable#iterator()
      */
     @Override

Modified: 
pivot/trunk/core/src/org/apache/pivot/functional/monad/TryCompanion.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/TryCompanion.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/functional/monad/TryCompanion.java 
(original)
+++ pivot/trunk/core/src/org/apache/pivot/functional/monad/TryCompanion.java 
Fri Apr 27 00:00:08 2018
@@ -30,7 +30,7 @@ public final class TryCompanion<T> {
      * @param <T> The type of this companion object.
      * @return the static instance
      */
-    public static final <T> TryCompanion<T> getInstance() {
+    public static <T> TryCompanion<T> getInstance() {
         return INSTANCE;
     }
 
@@ -48,7 +48,7 @@ public final class TryCompanion<T> {
      * @param val the value to test
      * @return true if it's a Try, false otherwise
      */
-    public final boolean isTry(final T val) {
+    public boolean isTry(final T val) {
         return val instanceof Try;
     }
 
@@ -109,7 +109,7 @@ public final class TryCompanion<T> {
     }
 
     /**
-     * Utility method to return the value contained in the Try, in a Option 
instance
+     * Utility method to return the value contained in the Try, in a Option 
instance.
      * @param t the Try
      * @return an Option instance: Some(value) if success, None otherwise
      */

Modified: 
pivot/trunk/core/test/org/apache/pivot/functional/monad/test/OptionTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/functional/monad/test/OptionTest.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/core/test/org/apache/pivot/functional/monad/test/OptionTest.java 
(original)
+++ 
pivot/trunk/core/test/org/apache/pivot/functional/monad/test/OptionTest.java 
Fri Apr 27 00:00:08 2018
@@ -17,6 +17,7 @@
 package org.apache.pivot.functional.monad.test;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
@@ -45,7 +46,7 @@ public class OptionTest {
         Option<Object> on = o.fromValue(null);
         assertNotNull(on);
         assertTrue(on instanceof None);
-        assertTrue(on.hasValue() == false);
+        assertFalse(on.hasValue());
         System.out.println("companionNoneTest(), has value is " + 
on.hasValue());
         Object onValue = on.getValue();  // throw Exception here
         assertTrue(onValue instanceof None);  // never called
@@ -59,7 +60,7 @@ public class OptionTest {
         Option<Object> oo = o.fromValue(new String("Hello"));
         assertNotNull(oo);
         assertTrue(oo instanceof Some);
-        assertTrue(oo.hasValue() == true);
+        assertTrue(oo.hasValue());
         Object ooValue = oo.getValue();
         assertTrue(ooValue instanceof String);
         System.out.println("companionObjectTest(), value stored is " + 
ooValue);
@@ -73,7 +74,7 @@ public class OptionTest {
         Option<String> os = o.fromValue("Hello");
         assertNotNull(os);
         assertTrue(os instanceof Some);
-        assertTrue(os.hasValue() == true);
+        assertTrue(os.hasValue());
         Object osValue = os.getValue();
         assertTrue(osValue instanceof String);
         System.out.println("companionStringTest(), value stored is " + 
osValue);
@@ -84,10 +85,10 @@ public class OptionTest {
         OptionCompanion<Number> o = OptionCompanion.getInstance();
         assertNotNull(o);
 
-        Option<Number> on = o.fromValue(new Double(3.141592653589793));
+        Option<Number> on = o.fromValue(new Double(Math.PI));
         assertNotNull(on);
         assertTrue(on instanceof Some);
-        assertTrue(on.hasValue() == true);
+        assertTrue(on.hasValue());
         Object onValue = on.getValue();
         assertTrue(onValue instanceof Number);
         assertTrue(onValue instanceof Double);
@@ -132,20 +133,20 @@ public class OptionTest {
 
             if (randomInt % 2 == 0) {
                 assertTrue(os instanceof Some);
-                assertTrue(os.hasValue() == true);
+                assertTrue(os.hasValue());
                 tsValue = os.getValue();
                 System.out.println("companionRealUsageRandomTest(), value 
stored is " + tsValue);
                 assertTrue(tsValue != null);
             } else {
                 assertTrue(os instanceof None);
-                assertTrue(os.hasValue() == false);
+                assertFalse(os.hasValue());
                 tsValue = os.getValue();  // will throw a RuntimeException 
when called in the case
                 assertTrue(tsValue == null);  // never called
             }
 
         } catch (RuntimeException e) {
             System.err.println("companionRealUsageRandomTest(), got 
RuntimeException " + e);
-            assertTrue(os.hasValue() == false);
+            assertFalse(os.hasValue());
         }
     }
 
@@ -163,7 +164,7 @@ public class OptionTest {
         // verify the value stored
         System.out.println("optionSomeTest(), stored element has a value " + 
os.hasValue());
         assertTrue(os instanceof Some);
-        assertTrue(os.hasValue() == true);
+        assertTrue(os.hasValue());
         osValue = os.getValue();
         System.out.println("optionSomeTest(), value stored is " + osValue);
         assertTrue(osValue != null);
@@ -189,13 +190,13 @@ public class OptionTest {
         // verify the value stored
         System.out.println("optionNoneTest(), stored element has a value " + 
os.hasValue());
         assertTrue(os instanceof None);
-        assertTrue(os.hasValue() == false);
+        assertFalse(os.hasValue());
         try {
             tsValue = os.getValue();  // will throw a RuntimeException when 
called in the case
             assertTrue(tsValue == null);  // never called
         } catch (RuntimeException e) {
             System.err.println("optionNoneTest(), got RuntimeException " + e);
-            assertTrue(os.hasValue() == false);
+            assertFalse(os.hasValue());
         }
         // test with alternative value
         tsValue = os.getValueOrElse("Alternative value");

Modified: 
pivot/trunk/core/test/org/apache/pivot/functional/monad/test/TryTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/functional/monad/test/TryTest.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/test/org/apache/pivot/functional/monad/test/TryTest.java 
(original)
+++ pivot/trunk/core/test/org/apache/pivot/functional/monad/test/TryTest.java 
Fri Apr 27 00:00:08 2018
@@ -17,7 +17,9 @@
 package org.apache.pivot.functional.monad.test;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.Iterator;
@@ -47,9 +49,9 @@ public class TryTest {
         Try<Object> tn = t.fromValue(null);
         assertNotNull(tn);
         assertTrue(tn instanceof Success);
-        assertTrue(tn.isSuccess() == true);
+        assertTrue(tn.isSuccess());
         Object tnValue = tn.getValue();
-        assertTrue(tnValue == null);
+        assertNull(tnValue);
         System.out.println("companionNullTest(), value stored is " + tnValue);
     }
 
@@ -61,11 +63,11 @@ public class TryTest {
         Try<Object> to = t.fromValue(new String("Hello"));
         assertNotNull(to);
         assertTrue(to instanceof Success);
-        assertTrue(to.isSuccess() == true);
+        assertTrue(to.isSuccess());
         Object toValue = to.getValue();
-        assertTrue(toValue != null);
+        assertNotNull(toValue);
         assertTrue(toValue instanceof String);
-        assertTrue(toValue.equals("Hello"));
+        assertEquals(toValue, "Hello");
         System.out.println("companionObjectTest(), value stored is " + 
toValue);
     }
 
@@ -77,11 +79,11 @@ public class TryTest {
         Try<String> ts = t.fromValue("Hello");
         assertNotNull(ts);
         assertTrue(ts instanceof Success);
-        assertTrue(ts.isSuccess() == true);
+        assertTrue(ts.isSuccess());
         String tsValue = ts.getValue();
-        assertTrue(tsValue != null);
+        assertNotNull(tsValue);
         // assertTrue(tsValue instanceof String);  // unnecessary
-        assertTrue(tsValue.equals("Hello"));
+        assertEquals(tsValue, "Hello");
         System.out.println("companionStringTest(), value stored is " + 
tsValue);
     }
 
@@ -94,13 +96,14 @@ public class TryTest {
         Try<String> tf = t.fromValue(re);
         assertNotNull(tf);
         assertTrue(tf instanceof Failure);
-        assertTrue(tf.isSuccess() == false);
+        assertFalse(tf.isSuccess());
         try {
             String tfValue = tf.getValue();  // this will throw the 
RuntimeException stored inside the Failure
-            assertTrue(tfValue != null);  // never called
+            assertNotNull(tfValue);          // never called
         } catch (RuntimeException e) {
             System.err.println("companionFailureTest(), value stored is " + e);
-            assertTrue(e != null);  // unnecessary
+            assertNotNull(e);  // unnecessary
+
         }
     }
 
@@ -137,12 +140,12 @@ public class TryTest {
         System.out.println("companionRealUsageRandomTest(), value stored is a 
success " + ts.isSuccess());
         try {
             String tsValue = ts.getValue();  // this will throw the 
RuntimeException stored inside the Failure
-            assertTrue(tsValue != null);  // called only when a real value is 
stored (and not a RuntimeException)
+            assertNotNull(tsValue);          // called only when a real value 
is stored (and not a RuntimeException)
             System.out.println("companionRealUsageRandomTest(), value stored 
is " + tsValue);
-            assertTrue(ts.isSuccess() == true);
+            assertTrue(ts.isSuccess());
         } catch (RuntimeException e) {
             System.err.println("companionRealUsageRandomTest(), exception 
stored is " + e);
-            assertTrue(ts.isSuccess() == false);
+            assertFalse(ts.isSuccess());
         }
     }
 
@@ -157,7 +160,7 @@ public class TryTest {
         } catch (RuntimeException e) {
             // ts = new Success<>(e);  // compile error, ok
             ts = new Failure<>(e);
-            assertTrue(e != null);  // unnecessary
+            assertNotNull(e);  // unnecessary
         }
 
         // verify the value stored
@@ -165,12 +168,12 @@ public class TryTest {
         String tsValue;
         try {
             tsValue = ts.getValue();  // this will throw the RuntimeException 
stored inside the Failure
-            assertTrue(tsValue != null);  // called only when a real value is 
stored (and not a RuntimeException)
+            assertNotNull(tsValue);   // called only when a real value is 
stored (and not a RuntimeException)
             System.out.println("trySuccessTest(), value stored is " + tsValue);
-            assertTrue(ts.isSuccess() == true);
+            assertTrue(ts.isSuccess());
         } catch (RuntimeException e) {
             System.err.println("trySuccessTest(), exception stored is " + e);
-            assertTrue(ts.isSuccess() == false);
+            assertFalse(ts.isSuccess());
         }
         // test with alternative value
         tsValue = ts.getValueOrElse("Alternative value");
@@ -190,7 +193,7 @@ public class TryTest {
         } catch (RuntimeException e) {
             // ts = new Success<>(e);  // compile error, ok
             tf = new Failure<>(e);
-            assertTrue(e != null);  // unnecessary
+            assertNotNull(e);  // unnecessary
         }
 
         // verify the value stored
@@ -198,12 +201,12 @@ public class TryTest {
         String tsValue;
         try {
             tsValue = tf.getValue();  // this will throw the RuntimeException 
stored inside the Failure
-            assertTrue(tsValue != null);  // called only when a real value is 
stored (and not a RuntimeException)
+            assertNotNull(tsValue);   // called only when a real value is 
stored (and not a RuntimeException)
             System.out.println("tryFailureTest(), value stored is " + tsValue);
-            assertTrue(tf.isSuccess() == true);
+            assertTrue(tf.isSuccess());
         } catch (RuntimeException e) {
             System.err.println("tryFailureTest(), exception stored is " + e);
-            assertTrue(tf.isSuccess() == false);
+            assertFalse(tf.isSuccess());
         }
         // test with alternative value
         tsValue = tf.getValueOrElse("Alternative value");
@@ -264,7 +267,7 @@ public class TryTest {
             // never executed in this case
             String value = it.next();
             System.out.println("tryFailureIteratorTest(), value " + i + " from 
iterator is " + value);
-            assertEquals(null, value);
+            assertNull(value);
             i++;
         }
         assertEquals(i, 0);
@@ -275,7 +278,7 @@ public class TryTest {
         for (String value : tf) {
             // never executed in this case
             System.out.println("tryFailureIteratorTest(), value " + i + " from 
iterator is " + value);
-            assertEquals(null, value);
+            assertNull(value);
             i++;
         }
         assertEquals(i, 0);
@@ -295,15 +298,15 @@ public class TryTest {
 
         assertNotNull(ts);
         assertTrue(ts instanceof Success);
-        assertTrue(ts.isSuccess() == true);
+        assertTrue(ts.isSuccess());
 
         assertNotNull(os);
         assertTrue(os instanceof Some);
-        assertTrue(os.hasValue() == true);
+        assertTrue(os.hasValue());
 
         String osValue = os.getValue();
-        assertTrue(osValue != null);
-        assertTrue(osValue.equals("Hello"));
+        assertNotNull(osValue);
+        assertEquals(osValue, "Hello");
         System.out.println("companionSuccessToOptionTest(), value stored is " 
+ osValue);
     }
 
@@ -322,15 +325,15 @@ public class TryTest {
 
         assertNotNull(tf);
         assertTrue(tf instanceof Failure);
-        assertTrue(tf.isSuccess() == false);
+        assertFalse(tf.isSuccess());
 
         assertNotNull(on);
         assertTrue(on instanceof None);
-        assertTrue(on.hasValue() == false);
+        assertFalse(on.hasValue());
 
         try {
             String onValue = on.getValue();  // this will throw a 
RuntimeException for the non-value of None
-            assertTrue(onValue != null);  // never called
+            assertNotNull(onValue);          // never called
         } catch (RuntimeException e) {
             System.err.println("companionFailureToOptionTest(), got 
RuntimeException " + e);
         }

Modified: 
pivot/trunk/core/test/org/apache/pivot/util/test/BooleanResultTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/util/test/BooleanResultTest.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/core/test/org/apache/pivot/util/test/BooleanResultTest.java 
(original)
+++ pivot/trunk/core/test/org/apache/pivot/util/test/BooleanResultTest.java Fri 
Apr 27 00:00:08 2018
@@ -17,6 +17,7 @@
 package org.apache.pivot.util.test;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 
 import org.junit.Test;
 
@@ -53,6 +54,9 @@ public class BooleanResultTest {
             case SET:
                 result.set(value);
                 break;
+            default:
+                assertFalse("Invalid operator " + op, true);
+                break;
         }
         assertEquals(result.get(), expectedResult);
     }

Modified: pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java 
(original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/million/LargeData.java Fri Apr 
27 00:00:08 2018
@@ -167,7 +167,7 @@ public class LargeData implements Applic
         statusLabel = (Label) bxmlSerializer.getNamespace().get("statusLabel");
         tableView = (TableView) bxmlSerializer.getNamespace().get("tableView");
 
-        fileListButton.getListButtonSelectionListeners().add( new 
ListButtonSelectionListener() {
+        fileListButton.getListButtonSelectionListeners().add(new 
ListButtonSelectionListener() {
                 @Override
                 public void selectedItemChanged(ListButton listButtonArgument,
                     Object previousSelectedItem) {

Modified: pivot/trunk/tests/src/org/apache/pivot/tests/CardPaneTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/CardPaneTest.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/CardPaneTest.java (original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/CardPaneTest.java Fri Apr 27 
00:00:08 2018
@@ -93,7 +93,7 @@ public class CardPaneTest implements App
 
         frame.open(display);
 
-        ApplicationContext.queueCallback( () -> sheet.open(frame) );
+        ApplicationContext.queueCallback(() -> sheet.open(frame));
     }
 
     @Override

Modified: 
pivot/trunk/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java 
(original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/JavascriptConsoleTest.java Fri 
Apr 27 00:00:08 2018
@@ -140,7 +140,7 @@ public class JavascriptConsoleTest imple
     }
 
     /**
-     * Load (and returns) a Window, given its file name and serializer to use
+     * Load (and returns) a Window, given its file name and serializer to use.
      *
      * @param fileName the file name for the bxml file to load
      * @param bxmlSerializer the serializer to use, or if null a new one will 
be

Modified: pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot686.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot686.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot686.java (original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/Pivot686.java Fri Apr 
27 00:00:08 2018
@@ -47,7 +47,7 @@ public class Pivot686 implements Applica
         initializeFields(bxmlSerializer);
         window.open(display);
 
-        if (forceFocus == true) {
+        if (forceFocus) {
             System.out.println("force focus on textInput now");
             textInput.requestFocus(); // force focus on TextInput, Ok when run
                                       // as a Java Application, and even as

Modified: 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Pivot.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Pivot.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Pivot.java 
(original)
+++ 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Pivot.java 
Fri Apr 27 00:00:08 2018
@@ -47,7 +47,7 @@ import com.kitfox.svg.SVGException;
 import com.kitfox.svg.animation.AnimationElement;
 
 /**
- * Test application with Pivot components
+ * Test application with Pivot components.
  */
 public class Pivot964Pivot implements Application {
 

Modified: 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java 
(original)
+++ 
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java 
Fri Apr 27 00:00:08 2018
@@ -34,7 +34,7 @@ import com.kitfox.svg.animation.Animatio
 import com.kitfox.svg.app.beans.SVGIcon;
 
 /**
- * Test using a Swing JFrame
+ * Test using a Swing JFrame.
  * In this case all is good.
  */
 public class Pivot964Swing extends javax.swing.JFrame {
@@ -42,7 +42,7 @@ public class Pivot964Swing extends javax
 
     TestPanel panel = new TestPanel();
 
-    /** Creates new form SVGIconDemo */
+    /** Creates new form SVGIconDemo. */
     public Pivot964Swing() {
         initComponents();
         panelDisplay.add(panel, BorderLayout.CENTER);

Modified: 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/BXMLExplorerDocument.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/BXMLExplorerDocument.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/BXMLExplorerDocument.java
 (original)
+++ 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/BXMLExplorerDocument.java
 Fri Apr 27 00:00:08 2018
@@ -63,23 +63,17 @@ import org.apache.pivot.wtk.effects.Shad
 import org.xml.sax.SAXException;
 
 public class BXMLExplorerDocument extends CardPane implements Bindable {
-    @BXML
-    private TreeView treeView;
-    @BXML
-    private CardPane playgroundCardPane;
-    @BXML
-    private TextPane bxmlSourceTextPane;
-    @BXML
-    private ComponentPropertyInspector componentPropertyInspector;
-    @BXML
-    private ComponentStyleInspector componentStyleInspector;
-    @BXML
-    private PushButton reloadButton;
+    @BXML private TreeView treeView;
+    @BXML private CardPane playgroundCardPane;
+    @BXML private TextPane bxmlSourceTextPane;
+    @BXML private ComponentPropertyInspector componentPropertyInspector;
+    @BXML private ComponentStyleInspector componentStyleInspector;
+    @BXML private PushButton reloadButton;
 
     private File file;
     private Component loadedComponent;
     /**
-     * maps the WTK widgets -> bxml:id values
+     * Maps the WTK widgets -&gt; bxml:id values.
      */
     private HashMap<Object, String> widgetToID = null;
     private HashMap<Object, TreeNode> componentToTreeNode = null;

Modified: 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/text/TextInputs.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/text/TextInputs.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/text/TextInputs.java 
(original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/text/TextInputs.java 
Fri Apr 27 00:00:08 2018
@@ -129,6 +129,6 @@ public class TextInputs extends Window i
     @Override
     public void open(Display display, Window owner) {
         super.open(display, owner);
-        ApplicationContext.queueCallback( () -> stateTextInput.requestFocus() 
);
+        ApplicationContext.queueCallback(() -> stateTextInput.requestFocus());
     }
 }

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java 
(original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java 
Fri Apr 27 00:00:08 2018
@@ -189,12 +189,10 @@ public class TerraAlertSkin extends Terr
     @Override
     public Vote previewWindowOpen(Window window) {
         Vote vote = super.previewWindowOpen(window);
-        switch (vote) {
-            case APPROVE:
-                // If this is the second or subsequent open, then the
-                // image view has been cleared, so set it up again
-                messageTypeChanged((Alert)window, null);
-                break;
+        if (vote == Vote.APPROVE) {
+            // If this is the second or subsequent open, then the
+            // image view has been cleared, so set it up again
+            messageTypeChanged((Alert)window, null);
         }
         return vote;
     }

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCheckboxSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCheckboxSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCheckboxSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCheckboxSkin.java
 Fri Apr 27 00:00:08 2018
@@ -175,7 +175,7 @@ public class TerraCheckboxSkin extends C
                 graphics.fillRect(0, 0, CHECKBOX_SIZE, CHECKBOX_SIZE);
             } else {
                 BasicStroke dashStroke = new BasicStroke(1.0f, 
BasicStroke.CAP_ROUND,
-                    BasicStroke.JOIN_ROUND, 1.0f, new float[] { 0.0f, 2.0f }, 
0.0f);
+                    BasicStroke.JOIN_ROUND, 1.0f, new float[] {0.0f, 2.0f}, 
0.0f);
 
                 graphics.setStroke(dashStroke);
                 graphics.setColor(buttonBorderColor);
@@ -243,6 +243,10 @@ public class TerraCheckboxSkin extends C
             GraphicsUtilities.drawLine(graphics, 4, (CHECKBOX_SIZE - 3) / 2 + 
1,
                 CHECKBOX_SIZE - 8, Orientation.HORIZONTAL, 2);
             break;
+
+          default:
+            // Nothing to do here for the unselected state
+            break;
         }
 
         GraphicsUtilities.setAntialiasingOff(graphics);

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java
 Fri Apr 27 00:00:08 2018
@@ -996,7 +996,7 @@ public class TerraFileBrowserSkin extend
                 int tooltipXOffset = 16;
                 int padding = 15;
 
-                toolTipTextArea.setMaximumWidth(display.getWidth() - ( x + 
tooltipXOffset + padding) );
+                toolTipTextArea.setMaximumWidth(display.getWidth() - (x + 
tooltipXOffset + padding));
                 tooltip.setLocation(x + tooltipXOffset, y);
                 tooltip.open(comp.getWindow());
             }

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
 Fri Apr 27 00:00:08 2018
@@ -954,15 +954,19 @@ public class TerraListViewSkin extends C
     }
 
     /**
-     * {@link KeyCode#UP UP} Selects the previous enabled list item when select
-     * mode is not {@link SelectMode#NONE}<br> {@link KeyCode#DOWN DOWN} 
Selects
-     * the next enabled list item when select mode is not
-     * {@link SelectMode#NONE}<p> {@link Modifier#SHIFT SHIFT} +
-     * {@link KeyCode#UP UP} Increases the selection size by including the
-     * previous enabled list item when select mode is {@link SelectMode#MULTI}
-     * <br> {@link Modifier#SHIFT SHIFT} + {@link KeyCode#DOWN DOWN} Increases
+     * Keyboard handling (arrow keys with modifiers).
+     * <ul>
+     * <li>{@link KeyCode#UP UP} Selects the previous enabled list item when 
select
+     * mode is not {@link SelectMode#NONE}</li>
+     * <li>{@link KeyCode#DOWN DOWN} Selects the next enabled list item when 
select
+     * mode is not {@link SelectMode#NONE}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#UP UP} Increases the 
selection
+     * size by including the previous enabled list item when select mode is
+     * {@link SelectMode#MULTI}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#DOWN DOWN} Increases
      * the selection size by including the next enabled list item when select
-     * mode is {@link SelectMode#MULTI}
+     * mode is {@link SelectMode#MULTI}</li>
+     * </ul>
      */
     @Override
     public boolean keyPressed(Component component, int keyCode, KeyLocation 
keyLocation) {
@@ -1056,7 +1060,7 @@ public class TerraListViewSkin extends C
 
     /**
      * {@link KeyCode#SPACE SPACE} Toggles check mark selection when select 
mode
-     * is {@link SelectMode#SINGLE}
+     * is {@link SelectMode#SINGLE}.
      */
     @Override
     public boolean keyReleased(Component component, int keyCode, KeyLocation 
keyLocation) {

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPaletteSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPaletteSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPaletteSkin.java 
(original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPaletteSkin.java 
Fri Apr 27 00:00:08 2018
@@ -447,7 +447,7 @@ public class TerraPaletteSkin extends Wi
     }
 
     /**
-     * Sets the font used in rendering the titlebar text
+     * Sets the font used in rendering the titlebar text.
      *
      * @param font A
      * {@link org.apache.pivot.wtk.skin.ComponentSkin#decodeFont(String) font
@@ -458,7 +458,7 @@ public class TerraPaletteSkin extends Wi
     }
 
     /**
-     * Sets the font used in rendering the titlebar text
+     * Sets the font used in rendering the titlebar text.
      *
      * @param font A dictionary {@link Theme#deriveFont describing a font}
      */

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java 
(original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java 
Fri Apr 27 00:00:08 2018
@@ -168,12 +168,10 @@ public class TerraPromptSkin extends Ter
     @Override
     public Vote previewWindowOpen(Window window) {
         Vote vote = super.previewWindowOpen(window);
-        switch (vote) {
-            case APPROVE:
-                // If this is the second or subsequent open, then the
-                // image view has been cleared, so set it up again
-                messageTypeChanged((Prompt)window, null);
-                break;
+        if (vote == Vote.APPROVE) {
+            // If this is the second or subsequent open, then the
+            // image view has been cleared, so set it up again
+            messageTypeChanged((Prompt)window, null);
         }
         return vote;
     }

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java
 Fri Apr 27 00:00:08 2018
@@ -1259,17 +1259,22 @@ public class TerraTableViewSkin extends
     }
 
     /**
-     * {@link KeyCode#UP UP} Selects the previous enabled row when select mode
-     * is not {@link SelectMode#NONE}<br> {@link KeyCode#DOWN DOWN} Selects the
-     * next enabled row when select mode is not {@link SelectMode#NONE}<p>
-     * {@link Modifier#SHIFT SHIFT} + {@link KeyCode#UP UP} Increases the
+     * Keyboard handling (arrow keys with modifiers and a few others).
+     * <ul>
+     * <li>{@link KeyCode#UP UP} Selects the previous enabled row when select 
mode
+     * is not {@link SelectMode#NONE}</li>
+     * <li>{@link KeyCode#DOWN DOWN} Selects the next enabled row when select 
mode
+     * is not {@link SelectMode#NONE}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#UP UP} Increases the
      * selection size by including the previous enabled row when select mode is
-     * {@link SelectMode#MULTI}<br> {@link Modifier#SHIFT SHIFT} +
-     * {@link KeyCode#DOWN DOWN} Increases the selection size by including the
-     * next enabled row when select mode is {@link SelectMode#MULTI}<br>
-     * {@code Cmd/Ctrl-A} in {@link SelectMode#MULTI} select mode to select 
everything<br>
-     * {@code Cmd/Ctrl-U} will unselect whatever is selected<br>
-     * {@link KeyCode#SPACE SPACE} wil select/unselect the "current" location
+     * {@link SelectMode#MULTI}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#DOWN DOWN} Increases 
the
+     * selection size by including the next enabled row when select mode is
+     * {@link SelectMode#MULTI}</li>
+     * <li>{@code Cmd/Ctrl-A} in {@link SelectMode#MULTI} select mode to 
select everything</li>
+     * <li>{@code Cmd/Ctrl-U} will unselect whatever is selected</li>
+     * <li>{@link KeyCode#SPACE SPACE} wil select/unselect the "current" 
location</li>
+     * </ul>
      */
     @Override
     public boolean keyPressed(Component component, int keyCode, KeyLocation 
keyLocation) {

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTreeViewSkin.java
 Fri Apr 27 00:00:08 2018
@@ -1321,7 +1321,7 @@ public class TerraTreeViewSkin extends C
                 // descendant of our younger sibling
                 for (int n = visibleNodes.getLength(), nodeDepth = 
youngerSibling.depth; insertIndex < n
                     && visibleNodes.get(insertIndex).depth > nodeDepth; 
insertIndex++) {
-                    // empty block
+                    continue;
                 }
             }
 
@@ -1370,7 +1370,7 @@ public class TerraTreeViewSkin extends C
                 // it's a descendant of the last child node
                 for (int n = visibleNodes.getLength(), nodeDepth = last.depth; 
rangeEnd < n
                     && visibleNodes.get(rangeEnd).depth > nodeDepth; 
rangeEnd++) {
-                    // empty block
+                    continue;
                 }
 
                 visibleNodes.remove(rangeStart, rangeEnd - rangeStart);
@@ -1638,14 +1638,19 @@ public class TerraTreeViewSkin extends C
     }
 
     /**
-     * {@link KeyCode#UP UP} Selects the previous enabled node when select mode
-     * is not {@link SelectMode#NONE}<br> {@link KeyCode#DOWN DOWN} Selects the
-     * next enabled node when select mode is not {@link SelectMode#NONE}<p>
-     * {@link Modifier#SHIFT SHIFT} + {@link KeyCode#UP UP} Increases the
+     * Keyboard handling (arrow keys with modifiers).
+     * <ul>
+     * <li>{@link KeyCode#UP UP} Selects the previous enabled node when select 
mode
+     * is not {@link SelectMode#NONE}</li>
+     * <li>{@link KeyCode#DOWN DOWN} Selects the * next enabled node when 
select mode
+     * is not {@link SelectMode#NONE}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#UP UP} Increases the
      * selection size by including the previous enabled node when select mode 
is
-     * {@link SelectMode#MULTI}<br> {@link Modifier#SHIFT SHIFT} +
-     * {@link KeyCode#DOWN DOWN} Increases the selection size by including the
-     * next enabled node when select mode is {@link SelectMode#MULTI}
+     * {@link SelectMode#MULTI}</li>
+     * <li>{@link Modifier#SHIFT SHIFT} + {@link KeyCode#DOWN DOWN} Increases 
the
+     * selection size by including the next enabled node when select mode is
+     * {@link SelectMode#MULTI}</li>
+     * </ul>
      */
     @Override
     public boolean keyPressed(Component component, int keyCode, KeyLocation 
keyLocation) {
@@ -1772,7 +1777,7 @@ public class TerraTreeViewSkin extends C
 
     /**
      * {@link KeyCode#SPACE SPACE} toggles check mark selection when select 
mode
-     * is {@link SelectMode#SINGLE}
+     * is {@link SelectMode#SINGLE}.
      */
     @Override
     public boolean keyReleased(Component component, int keyCode, KeyLocation 
keyLocation) {

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java
 (original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java
 Fri Apr 27 00:00:08 2018
@@ -1149,7 +1149,7 @@ public class TerraVFSBrowserSkin extends
                 int tooltipXOffset = 16;
                 int padding = 15;
 
-                toolTipTextArea.setMaximumWidth(display.getWidth() - ( x + 
tooltipXOffset + padding) );
+                toolTipTextArea.setMaximumWidth(display.getWidth() - (x + 
tooltipXOffset + padding));
                 tooltip.setLocation(x + tooltipXOffset, y);
                 tooltip.open(comp.getWindow());
             }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java Fri Apr 27 
00:00:08 2018
@@ -314,7 +314,8 @@ public abstract class ApplicationContext
             }
 
             @Override
-            public AttributedCharacterIterator 
cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes) {
+            public AttributedCharacterIterator cancelLatestCommittedText(
+                    AttributedCharacterIterator.Attribute[] attributes) {
                 TextInputMethodListener listener = getCurrentListener();
                 if (listener != null) {
                     return listener.cancelLatestCommittedText(attributes);
@@ -323,7 +324,8 @@ public abstract class ApplicationContext
             }
 
             @Override
-            public AttributedCharacterIterator getCommittedText(int 
beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes) {
+            public AttributedCharacterIterator getCommittedText(int 
beginIndex, int endIndex,
+                    AttributedCharacterIterator.Attribute[] attributes) {
                 TextInputMethodListener listener = getCurrentListener();
                 if (listener != null) {
                     return listener.getCommittedText(beginIndex, endIndex, 
attributes);
@@ -359,7 +361,8 @@ public abstract class ApplicationContext
             }
 
             @Override
-            public AttributedCharacterIterator 
getSelectedText(AttributedCharacterIterator.Attribute[] attributes) {
+            public AttributedCharacterIterator getSelectedText(
+                    AttributedCharacterIterator.Attribute[] attributes) {
                 TextInputMethodListener listener = getCurrentListener();
                 if (listener != null) {
                     return listener.getSelectedText(attributes);
@@ -423,7 +426,7 @@ public abstract class ApplicationContext
 
             try {
                 debugPaint = 
Boolean.getBoolean("org.apache.pivot.wtk.debugpaint");
-                if (debugPaint == true) {
+                if (debugPaint) {
                     random = new Random();
                 }
             } catch (SecurityException ex) {
@@ -777,7 +780,7 @@ public abstract class ApplicationContext
         /**
          * Paints the display including any decorators.
          *
-         * @param graphics
+         * @param graphics The graphics to paint into.
          */
         private void paintDisplay(Graphics2D graphics) {
             if (scale != 1) {
@@ -1249,8 +1252,8 @@ public abstract class ApplicationContext
                                 int dragThreshold = 
Platform.getDragThreshold();
 
                                 if (dragLocation != null
-                                    && (Math.abs(x - dragLocation.x) > 
dragThreshold ||
-                                        Math.abs(y - dragLocation.y) > 
dragThreshold)) {
+                                    && (Math.abs(x - dragLocation.x) > 
dragThreshold
+                                    ||  Math.abs(y - dragLocation.y) > 
dragThreshold)) {
                                     // The user has dragged the mouse past the
                                     // drag threshold; try
                                     // to find a drag source
@@ -1489,7 +1492,8 @@ public abstract class ApplicationContext
 
             // Ignore Control when Alt-Graphics is pressed
             if ((modifiersEx & InputEvent.CTRL_DOWN_MASK) > 0
-                && ((modifiersEx & InputEvent.ALT_DOWN_MASK) == 0 || 
awtKeyLocation == KeyEvent.KEY_LOCATION_RIGHT)) {
+             && ((modifiersEx & InputEvent.ALT_DOWN_MASK) == 0
+               || awtKeyLocation == KeyEvent.KEY_LOCATION_RIGHT)) {
                 keyboardModifiers |= Keyboard.Modifier.CTRL.getMask();
             }
 
@@ -1557,7 +1561,8 @@ public abstract class ApplicationContext
                             if (focusedComponentLocal == null) {
                                 for (Application application : applications) {
                                     if (application instanceof 
Application.UnprocessedKeyHandler) {
-                                        Application.UnprocessedKeyHandler 
unprocessedKeyHandler = (Application.UnprocessedKeyHandler) application;
+                                        Application.UnprocessedKeyHandler 
unprocessedKeyHandler =
+                                                
(Application.UnprocessedKeyHandler) application;
                                         
unprocessedKeyHandler.keyPressed(keyCode, keyLocation);
                                     }
                                 }
@@ -1587,7 +1592,8 @@ public abstract class ApplicationContext
                             if (focusedComponentLocal == null) {
                                 for (Application application : applications) {
                                     if (application instanceof 
Application.UnprocessedKeyHandler) {
-                                        Application.UnprocessedKeyHandler 
unprocessedKeyHandler = (Application.UnprocessedKeyHandler) application;
+                                        Application.UnprocessedKeyHandler 
unprocessedKeyHandler =
+                                                
(Application.UnprocessedKeyHandler) application;
                                         
unprocessedKeyHandler.keyReleased(keyCode, keyLocation);
                                     }
                                 }
@@ -1828,7 +1834,9 @@ public abstract class ApplicationContext
             try {
                 return Version.decode(versionString);
             } catch (Throwable ex) {
-                String exMsg = Utils.isNullOrEmpty(ex.getMessage()) ? 
ex.getClass().getSimpleName() : ex.getMessage();
+                String exMsg = Utils.isNullOrEmpty(ex.getMessage())
+                        ? ex.getClass().getSimpleName()
+                        : ex.getMessage();
                 System.err.println("Error decoding version string \"" + 
versionString + "\": " + exMsg);
             }
         }
@@ -2283,7 +2291,8 @@ public abstract class ApplicationContext
             return;
         }
 
-        String message = String.format("%1$s on Thread %2$s:", 
exception.getClass().getName(), thread.getName());
+        String message = String.format("%1$s on Thread %2$s:",
+                exception.getClass().getName(), thread.getName());
 
         TextArea body = null;
         String bodyText = exception.getMessage();
@@ -2305,7 +2314,8 @@ public abstract class ApplicationContext
         int n = 0;
         for (Application application : applications) {
             if (application instanceof Application.UncaughtExceptionHandler) {
-                Application.UncaughtExceptionHandler uncaughtExceptionHandler 
= (Application.UncaughtExceptionHandler) application;
+                Application.UncaughtExceptionHandler uncaughtExceptionHandler =
+                        (Application.UncaughtExceptionHandler) application;
                 uncaughtExceptionHandler.uncaughtException(thread, exception);
                 n++;
             }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java Fri Apr 27 00:00:08 
2018
@@ -35,7 +35,7 @@ public class Checkbox extends Button {
         this(null);
     }
 
-    public Checkbox(Object buttonData) {
+    public Checkbox(final Object buttonData) {
         super(buttonData);
         super.setToggleButton(true);
 
@@ -60,24 +60,24 @@ public class Checkbox extends Button {
     }
 
     /**
-     * This operation is not supported for checkboxes
+     * This operation is not supported for checkboxes.
      *
      * @throws UnsupportedOperationException always since this is unsupported.
      */
     @Override
     @UnsupportedOperation
-    public void setToggleButton(boolean toggleButton) {
+    public void setToggleButton(final boolean toggleButton) {
         throw new UnsupportedOperationException("Checkboxes are always toggle 
buttons.");
     }
 
     /**
-     * This operation is not supported for checkboxes
+     * This operation is not supported for checkboxes.
      *
      * @throws UnsupportedOperationException always since this is unsupported.
      */
     @Override
     @UnsupportedOperation
-    public void setButtonGroup(ButtonGroup buttonGroup) {
+    public void setButtonGroup(final ButtonGroup buttonGroup) {
         throw new UnsupportedOperationException("Checkboxes can't be added to 
a group.");
     }
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java Fri Apr 27 
00:00:08 2018
@@ -93,7 +93,7 @@ public final class CornerRadii implement
 
     /**
      * Construct a {@link CornerRadii} object from a dictionary specifying
-     * values for each of the four corners
+     * values for each of the four corners.
      *
      * @param cornerRadii A dictionary with keys {@value #TOP_LEFT_KEY},
      * {@value #TOP_RIGHT_KEY}, {@value #BOTTOM_LEFT_KEY},
@@ -114,10 +114,10 @@ public final class CornerRadii implement
     public CornerRadii(Sequence<?> cornerRadii) {
         Utils.checkNull(cornerRadii, "cornerRadii");
 
-        topLeft = ((Number)cornerRadii.get(0)).intValue();
-        topRight = ((Number)cornerRadii.get(1)).intValue();
-        bottomLeft = ((Number)cornerRadii.get(2)).intValue();
-        bottomRight = ((Number)cornerRadii.get(3)).intValue();
+        topLeft = ((Number) cornerRadii.get(0)).intValue();
+        topRight = ((Number) cornerRadii.get(1)).intValue();
+        bottomLeft = ((Number) cornerRadii.get(2)).intValue();
+        bottomRight = ((Number) cornerRadii.get(3)).intValue();
 
         check(this);
     }
@@ -195,10 +195,8 @@ public final class CornerRadii implement
             if (parts.length == 4) {
                 try {
                     cornerRadii = new CornerRadii(
-                        Integer.parseInt(parts[0]),
-                        Integer.parseInt(parts[1]),
-                        Integer.parseInt(parts[2]),
-                        Integer.parseInt(parts[3]));
+                        Integer.parseInt(parts[0]), Integer.parseInt(parts[1]),
+                        Integer.parseInt(parts[2]), 
Integer.parseInt(parts[3]));
                 } catch (NumberFormatException ex) {
                     throw new IllegalArgumentException(ex);
                 }

Modified: 
pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java 
(original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java Fri 
Apr 27 00:00:08 2018
@@ -168,14 +168,15 @@ public final class DesktopApplicationCon
                     public void run() {
                         java.awt.Window hostWindow = 
getDisplay().getHostWindow();
 
-                        if (DesktopDisplayHost.this.rootOwner == null) {
+                        Window ownerWindow = DesktopDisplayHost.this.rootOwner;
+                        if (ownerWindow == null) {
                             ((TitledWindow) 
hostWindow).setTitle(DEFAULT_HOST_WINDOW_TITLE);
                             hostWindow.setIconImage(null);
                         } else {
-                            ((TitledWindow) 
hostWindow).setTitle(DesktopDisplayHost.this.rootOwner.getTitle());
+                            ((TitledWindow) 
hostWindow).setTitle(ownerWindow.getTitle());
 
                             java.util.ArrayList<BufferedImage> iconImages = 
new java.util.ArrayList<>();
-                            for (Image icon : 
DesktopDisplayHost.this.rootOwner.getIcons()) {
+                            for (Image icon : ownerWindow.getIcons()) {
                                 if (icon instanceof Picture) {
                                     iconImages.add(((Picture) 
icon).getBufferedImage());
                                 }
@@ -457,7 +458,8 @@ public final class DesktopApplicationCon
     }
 
     /**
-     * Calculate the entire virtual desktop bounding rectangle
+     * Calculate the entire virtual desktop bounding rectangle.
+     * @return The entire bounding rectangle of all the screen devices.
      */
     private static Rectangle getVirtualDesktopBounds() {
         Rectangle virtualBounds = new Rectangle();
@@ -508,7 +510,6 @@ public final class DesktopApplicationCon
             width = preferences.getInt(WIDTH_ARGUMENT, width);
             height = preferences.getInt(HEIGHT_ARGUMENT, height);
             maximized = preferences.getBoolean(MAXIMIZED_ARGUMENT, maximized);
-
         } catch (SecurityException exception) {
             System.err.println("Unable to retrieve startup preferences: " + 
exception);
         }
@@ -684,7 +685,7 @@ public final class DesktopApplicationCon
             }
 
             // Start the application in a callback to allow the host window to 
open first
-            queueCallback( () -> {
+            queueCallback(() -> {
                 try {
                     application.startup(primaryDisplayHost.getDisplay(), new 
ImmutableMap<>(properties));
                 } catch (Throwable exception) {
@@ -705,13 +706,13 @@ public final class DesktopApplicationCon
                 Class<?> eawtApplicationEventClass = 
Class.forName("com.apple.eawt.ApplicationEvent");
 
                 Method setEnabledAboutMenuMethod = 
eawtApplicationClass.getMethod(
-                    "setEnabledAboutMenu", new Class<?>[] { Boolean.TYPE });
+                    "setEnabledAboutMenu", new Class<?>[] {Boolean.TYPE});
 
                 Method addApplicationListenerMethod = 
eawtApplicationClass.getMethod(
-                    "addApplicationListener", new Class<?>[] { 
eawtApplicationListenerClass });
+                    "addApplicationListener", new Class<?>[] 
{eawtApplicationListenerClass});
 
                 final Method setHandledMethod = 
eawtApplicationEventClass.getMethod("setHandled",
-                    new Class<?>[] { Boolean.TYPE });
+                    new Class<?>[] {Boolean.TYPE});
 
                 // Create the proxy handler
                 InvocationHandler handler = new InvocationHandler() {
@@ -729,7 +730,7 @@ public final class DesktopApplicationCon
                         }
 
                         // Invoke setHandled()
-                        setHandledMethod.invoke(args[0], new Object[] { 
Boolean.valueOf(handled) });
+                        setHandledMethod.invoke(args[0], new Object[] 
{Boolean.valueOf(handled)});
 
                         return null;
                     }
@@ -742,11 +743,11 @@ public final class DesktopApplicationCon
 
                 Object eawtApplicationListener = Proxy.newProxyInstance(
                     DesktopApplicationContext.class.getClassLoader(),
-                    new Class<?>[] { eawtApplicationListenerClass }, handler);
+                    new Class<?>[] {eawtApplicationListenerClass}, handler);
 
                 // Invoke the addApplicationListener() method with the proxy 
listener
                 addApplicationListenerMethod.invoke(eawtApplication,
-                    new Object[] { eawtApplicationListener });
+                    new Object[] {eawtApplicationListener});
             } catch (Throwable throwable) {
                 System.err.println("Unable to attach EAWT hooks: " + 
throwable);
             }
@@ -862,7 +863,8 @@ public final class DesktopApplicationCon
      * @param y           The new Y-position for the display.
      * @param modal       Whether or not the new display is to be modal.
      * @param resizable   Whether or not to make the new display resizable by 
the user.
-     * @param undecorated Whether the new display should be undecorated (that 
is just a bare window) or normal.
+     * @param undecorated Whether the new display should be undecorated (that 
is just
+     *                    a bare window) or normal.
      * @param owner       The owner for the new display.
      * @param displayCloseListener The listener for the dialog being closed.
      * @return The newly created display.
@@ -872,7 +874,8 @@ public final class DesktopApplicationCon
         boolean resizable, boolean undecorated, java.awt.Window owner,
         DisplayListener displayCloseListener) {
         if (isFullScreen()) {
-            throw new IllegalStateException();
+            throw new IllegalStateException(
+                    "Secondary display cannot be created for full screen 
application.");
         }
 
         final HostDialog hostDialog = new HostDialog(owner, modal, 
displayCloseListener);
@@ -883,7 +886,7 @@ public final class DesktopApplicationCon
 
         // Open the window in a callback; otherwise, if it is modal, it will
         // block the calling thread
-        ApplicationContext.queueCallback( () -> hostDialog.setVisible(true) );
+        ApplicationContext.queueCallback(() -> hostDialog.setVisible(true));
 
         return hostDialog.getDisplay();
     }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Gauge.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Gauge.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Gauge.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Gauge.java Fri Apr 27 00:00:08 2018
@@ -90,14 +90,14 @@ public class Gauge<T extends Number> ext
     @SuppressWarnings("unchecked")
     public void setType(String typeName) {
         try {
-            this.clazz = (Class<? extends Number>)((typeName.indexOf('.') < 0) 
?
-                Class.forName("java.lang." + typeName) :
-                Class.forName(typeName));
+            this.clazz = (Class<? extends Number>) ((typeName.indexOf('.') < 0)
+                ? Class.forName("java.lang." + typeName)
+                : Class.forName(typeName));
         } catch (ClassNotFoundException cnfe) {
             if (typeName.indexOf('.') < 0) {
                 // Try "java.math" (for BigDecimal, etc.) types
                 try {
-                    this.clazz = (Class<? extends 
Number>)Class.forName("java.math." + typeName);
+                    this.clazz = (Class<? extends Number>) 
Class.forName("java.math." + typeName);
                 } catch (ClassNotFoundException cnfe2) {
                     throw new RuntimeException(cnfe);
                 }
@@ -159,7 +159,7 @@ public class Gauge<T extends Number> ext
      */
     @SuppressWarnings("unchecked")
     public void setValue(String value) {
-        setValue((T)StringUtils.toNumber(value, clazz));
+        setValue((T) StringUtils.toNumber(value, clazz));
     }
 
     public T getMinValue() {
@@ -195,7 +195,7 @@ public class Gauge<T extends Number> ext
      */
     @SuppressWarnings("unchecked")
     public void setMinValue(String minValue) {
-        setMinValue((T)StringUtils.toNumber(minValue, clazz));
+        setMinValue((T) StringUtils.toNumber(minValue, clazz));
     }
 
     public T getMaxValue() {
@@ -231,7 +231,7 @@ public class Gauge<T extends Number> ext
      */
     @SuppressWarnings("unchecked")
     public void setMaxValue(String maxValue) {
-        setMaxValue((T)StringUtils.toNumber(maxValue, clazz));
+        setMaxValue((T) StringUtils.toNumber(maxValue, clazz));
     }
 
     public T getWarningLevel() {
@@ -270,7 +270,7 @@ public class Gauge<T extends Number> ext
      */
     @SuppressWarnings("unchecked")
     public void setWarningLevel(String warningLevel) {
-        setWarningLevel((T)StringUtils.toNumber(warningLevel, clazz));
+        setWarningLevel((T) StringUtils.toNumber(warningLevel, clazz));
     }
 
     public T getCriticalLevel() {
@@ -309,7 +309,7 @@ public class Gauge<T extends Number> ext
      */
     @SuppressWarnings("unchecked")
     public void setCriticalLevel(String criticalLevel) {
-        setCriticalLevel((T)StringUtils.toNumber(criticalLevel, clazz));
+        setCriticalLevel((T) StringUtils.toNumber(criticalLevel, clazz));
     }
 
     public String getText() {
@@ -324,9 +324,9 @@ public class Gauge<T extends Number> ext
         // Null text is allowed
         String previousText = this.text;
 
-        if ((previousText == null && text != null) ||
-            (previousText != null && text == null) ||
-            (previousText != null && !previousText.equals(text))) {
+        if ((previousText == null && text != null)
+         || (previousText != null && text == null)
+         || (previousText != null && !previousText.equals(text))) {
             this.text = text;
             gaugeListeners.textChanged(this, previousText);
         }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java Fri Apr 27 
00:00:08 2018
@@ -279,7 +279,7 @@ public final class GraphicsUtilities {
     }
 
     /**
-     * Interpret a string as a {@link Paint} value
+     * Interpret a string as a {@link Paint} value.
      *
      * @param value Either (a) One of the
      * {@linkplain GraphicsUtilities#decodeColor color values recognized by
@@ -307,7 +307,7 @@ public final class GraphicsUtilities {
     }
 
     /**
-     * Interpret a dictionary as a {@link Paint} value
+     * Interpret a dictionary as a {@link Paint} value.
      *
      * @param dictionary A dictionary containing a key {@value #PAINT_TYPE_KEY}
      * and further elements according to its value: <ul> <li><b>solid_color</b>
@@ -437,7 +437,8 @@ public final class GraphicsUtilities {
      * @param font              The font to use.
      * @param color             The foreground color for the text.
      */
-    public static void prepareForText(Graphics2D graphics, FontRenderContext 
fontRenderContext, Font font, Color color) {
+    public static void prepareForText(Graphics2D graphics, FontRenderContext 
fontRenderContext,
+            Font font, Color color) {
         setFontRenderingHints(graphics, fontRenderContext);
 
         graphics.setFont(font);
@@ -460,7 +461,8 @@ public final class GraphicsUtilities {
     }
 
     /**
-     * Set the context in the given graphics environment for subsequent font 
drawing and return the font render context.
+     * Set the context in the given graphics environment for subsequent font 
drawing and return
+     * the font render context.
      *
      * @param graphics  The graphics context.
      * @param font      The font to use.
@@ -487,7 +489,7 @@ public final class GraphicsUtilities {
         FontRenderContext fontRenderContext = Platform.getFontRenderContext();
 
         GlyphVector missingGlyphVector = 
font.createGlyphVector(fontRenderContext,
-            new int[] { missingGlyphCode });
+            new int[] {missingGlyphCode});
         Rectangle2D textBounds = missingGlyphVector.getLogicalBounds();
 
         Rectangle2D maxCharBounds = font.getMaxCharBounds(fontRenderContext);
@@ -512,7 +514,7 @@ public final class GraphicsUtilities {
         TextLayout layout = new TextLayout(text, fontRenderContext);
         Shape caretShape = layout.getCaretShape(caret);
         Rectangle caretRect = caretShape.getBounds();
-        caretRect.translate(leftOffset, topOffset + 
(int)Math.ceil(layout.getAscent() + layout.getDescent()));
+        caretRect.translate(leftOffset, topOffset + (int) 
Math.ceil(layout.getAscent() + layout.getDescent()));
         return caretRect;
     }
 
@@ -526,9 +528,11 @@ public final class GraphicsUtilities {
      * @param bottom The bottom interior coordinate (height - 1)
      * @param right The right interior coordinate (width - 1)
      */
-    public static void drawBorders(Graphics2D graphics, Borders borders, int 
top, int left, int bottom, int right) {
+    public static void drawBorders(Graphics2D graphics, Borders borders, int 
top, int left,
+            int bottom, int right) {
         // The single line/object cases, or the first of the multiple line 
cases
         switch (borders) {
+            default:
             case NONE:
                 break;
             case ALL:
@@ -583,6 +587,8 @@ public final class GraphicsUtilities {
                 // The top now
                 graphics.drawLine(left, top, right, top);
                 break;
+            default:
+                break;
         }
 
         // Now the third of the triple line cases
@@ -597,6 +603,8 @@ public final class GraphicsUtilities {
                 // The top now
                 graphics.drawLine(left, top, right, top);
                 break;
+            default:
+                break;
         }
     }
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java Fri Apr 27 00:00:08 
2018
@@ -128,10 +128,10 @@ public final class Insets implements Ser
     public Insets(Sequence<?> insets) {
         Utils.checkNull(insets, "padding/margin");
 
-        this.top = ((Number)insets.get(0)).intValue();
-        this.left = ((Number)insets.get(1)).intValue();
-        this.bottom = ((Number)insets.get(2)).intValue();
-        this.right = ((Number)insets.get(3)).intValue();
+        this.top = ((Number) insets.get(0)).intValue();
+        this.left = ((Number) insets.get(1)).intValue();
+        this.bottom = ((Number) insets.get(2)).intValue();
+        this.right = ((Number) insets.get(3)).intValue();
     }
 
     /**
@@ -169,8 +169,8 @@ public final class Insets implements Ser
 
         if (object instanceof Insets) {
             Insets insets = (Insets) object;
-            equals = (top == insets.top && left == insets.left &&
-                      bottom == insets.bottom && right == insets.right);
+            equals = (top == insets.top && left == insets.left
+                   && bottom == insets.bottom && right == insets.right);
         }
 
         return equals;
@@ -193,7 +193,7 @@ public final class Insets implements Ser
     }
 
     /**
-     * Decode a possible Insets value, which can be in one of the
+     * Decode a possible Insets value. The value can be in one of the
      * following forms:
      * <ul>
      * <li><pre>{ "top": nnn, "left": nnn, "bottom": nnn, "right": nnn }</pre>

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ListView.java Fri Apr 27 00:00:08 
2018
@@ -402,11 +402,16 @@ public class ListView extends Component
         }
     };
 
-    private ListViewListener.Listeners listViewListeners = new 
ListViewListener.Listeners();
-    private ListViewItemListener.Listeners listViewItemListeners = new 
ListViewItemListener.Listeners();
-    private ListViewItemStateListener.Listeners listViewItemStateListeners = 
new ListViewItemStateListener.Listeners();
-    private ListViewSelectionListener.Listeners listViewSelectionListeners = 
new ListViewSelectionListener.Listeners();
-    private ListViewBindingListener.Listeners listViewBindingListeners = new 
ListViewBindingListener.Listeners();
+    private ListViewListener.Listeners listViewListeners =
+        new ListViewListener.Listeners();
+    private ListViewItemListener.Listeners listViewItemListeners =
+        new ListViewItemListener.Listeners();
+    private ListViewItemStateListener.Listeners listViewItemStateListeners =
+        new ListViewItemStateListener.Listeners();
+    private ListViewSelectionListener.Listeners listViewSelectionListeners =
+        new ListViewSelectionListener.Listeners();
+    private ListViewBindingListener.Listeners listViewBindingListeners =
+        new ListViewBindingListener.Listeners();
 
     private static final ItemRenderer DEFAULT_ITEM_RENDERER = new 
ListViewItemRenderer();
 
@@ -1130,8 +1135,9 @@ public class ListView extends Component
      */
     public Button.State getItemCheckmarkState(int index) {
         // Find out where the item is stored currently (if at all)
-        int checked = ArrayList.binarySearch(checkedIndexes, 
Integer.valueOf(index));
-        int mixed   = allowTriStateCheckmarks ? 
ArrayList.binarySearch(mixedIndexes, Integer.valueOf(index)) : -1;
+        Integer iIndex = Integer.valueOf(index);
+        int checked = ArrayList.binarySearch(checkedIndexes, iIndex);
+        int mixed   = allowTriStateCheckmarks ? 
ArrayList.binarySearch(mixedIndexes, iIndex) : -1;
 
         if (checked < 0 && mixed < 0) {
             return Button.State.UNSELECTED;
@@ -1197,6 +1203,8 @@ public class ListView extends Component
                     checkedIndexes.insert(Integer.valueOf(index), -(checked + 
1));
                     itemCheckedListener = true;
                     break;
+                default:
+                    break;
             }
 
             // Now, notify any listeners necessary (one or two)

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java Fri Apr 27 00:00:08 2018
@@ -60,8 +60,8 @@ public class Meter extends Component {
 
     public void setText(String text) {
         String previousText = this.text;
-        if ((previousText == null && text != null) ||
-            (previousText != null && !previousText.equals(text))) {
+        if ((previousText == null && text != null)
+         || (previousText != null && !previousText.equals(text))) {
             this.text = text;
             meterListeners.textChanged(this, previousText);
         }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java Fri Apr 27 
00:00:08 2018
@@ -215,7 +215,7 @@ public class RadioButtonGroup extends Bu
     };
 
     /**
-     * Filter used to determine selectable buttons within the group
+     * Filter used to determine selectable buttons within the group.
      */
     private final Filter<Integer> defaultFilter = new Filter<Integer>() {
         @Override

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Span.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Span.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Span.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Span.java Fri Apr 27 00:00:08 2018
@@ -339,8 +339,8 @@ public final class Span {
     public boolean normalEquals(Span span) {
         Utils.checkNull(span, "span");
 
-        return (normalStart() == span.normalStart()) &&
-               (normalEnd() == span.normalEnd());
+        return (normalStart() == span.normalStart())
+            && (normalEnd() == span.normalEnd());
     }
 
     @Override

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TableView.java Fri Apr 27 00:00:08 
2018
@@ -509,7 +509,7 @@ public class TableView extends Component
 
     /**
      * {@link Renderer} interface to customize the appearance of the header of 
a
-     * TableView
+     * TableView.
      */
     public interface HeaderDataRenderer extends Renderer {
         /**

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java Fri Apr 27 
00:00:08 2018
@@ -505,7 +505,7 @@ public class BorderSkin extends Containe
     }
 
     /**
-     * Sets the radii of the Border's corners
+     * Sets the radii of the Border's corners.
      *
      * @param cornerRadii A single integer value, or a JSON dictionary
      * {@linkplain CornerRadii#CornerRadii(Dictionary) specifying the four 
corners}.

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java?rev=1830285&r1=1830284&r2=1830285&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java Fri Apr 27 
00:00:08 2018
@@ -266,8 +266,11 @@ public abstract class ComponentSkin impl
     }
 
     /**
-     * {@link KeyCode#TAB TAB} Transfers focus forwards<br> {@link KeyCode#TAB
-     * TAB} + {@link Modifier#SHIFT SHIFT} Transfers focus backwards
+     * Keyboard handling (Tab key or Shift Tab).
+     * <ul>
+     * <li>{@link KeyCode#TAB TAB} Transfers focus forwards</li>
+     * <li>{@link KeyCode#TAB TAB} + {@link Modifier#SHIFT SHIFT} Transfers 
focus backwards</li>
+     * </ul>
      */
     @Override
     public boolean keyPressed(Component componentArgument, int keyCode,
@@ -278,10 +281,11 @@ public abstract class ComponentSkin impl
         otherModifiers.addAll(Modifier.ALL_MODIFIERS);
         otherModifiers.remove(Modifier.SHIFT);
 
-        if (keyCode == KeyCode.TAB &&
-            !Keyboard.areAnyPressed(otherModifiers) &&
-            getComponent().isFocused()) {
-            FocusTraversalDirection direction = 
(Keyboard.isPressed(Modifier.SHIFT)) ? FocusTraversalDirection.BACKWARD
+        if (keyCode == KeyCode.TAB
+         && !Keyboard.areAnyPressed(otherModifiers)
+         &&  getComponent().isFocused()) {
+            FocusTraversalDirection direction = 
(Keyboard.isPressed(Modifier.SHIFT))
+                ? FocusTraversalDirection.BACKWARD
                 : FocusTraversalDirection.FORWARD;
 
             // Transfer focus to the next component
@@ -325,10 +329,8 @@ public abstract class ComponentSkin impl
             int tooltipWidth = tooltip.getPreferredWidth();
             int tooltipHeight = tooltip.getPreferredHeight();
             if (tooltipX + tooltipWidth > display.getWidth()) {
-                // Try to just fit it inside the display if
-                // there would be room to shift it above the
-                // cursor, otherwise move it to the left of
-                // the cursor
+                // Try to just fit it inside the display if there would be 
room to shift it
+                // above the cursor, otherwise move it to the left of the 
cursor.
                 if (tooltipY > tooltipHeight) {
                     tooltipX = display.getWidth() - tooltipWidth;
                 } else {
@@ -337,9 +339,8 @@ public abstract class ComponentSkin impl
                 if (tooltipX < 0) {
                     tooltipX = 0;
                 }
-                // Adjust the y location if the tip ends up
-                // being behind the mouse cursor because of
-                // these x adjustments
+                // Adjust the y location if the tip ends up being behind the 
mouse cursor
+                // because of these x adjustments.
                 if (tooltipX < location.x && tooltipX + tooltipWidth > 
location.x) {
                     tooltipY -= tooltipHeight;
                     if (tooltipY < 0) {
@@ -396,7 +397,7 @@ public abstract class ComponentSkin impl
     }
 
     /**
-     * Interpret a string as a font specification
+     * Interpret a string as a font specification.
      *
      * @param value Either a JSON dictionary {@link Theme#deriveFont describing
      * a font relative to the current theme}, or one of the


Reply via email to