You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/10/05 01:45:53 UTC

svn commit: r1529349 [27/44] - in /pivot/trunk: charts/src/org/apache/pivot/charts/ charts/src/org/apache/pivot/charts/skin/ core/src/org/apache/pivot/beans/ core/src/org/apache/pivot/collections/ core/src/org/apache/pivot/collections/adapter/ core/src...

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ConstrainedVisual.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ConstrainedVisual.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ConstrainedVisual.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ConstrainedVisual.java Fri Oct  4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
 public interface ConstrainedVisual extends Visual {
     /**
      * Sets the visual's render size.
-     *
+     * 
      * @param width
      * @param height
      */
@@ -31,20 +31,18 @@ public interface ConstrainedVisual exten
     /**
      * Returns the visual's preferred width given the provided height
      * constraint.
-     *
-     * @param height
-     * The height by which to constrain the preferred width, or <tt>-1</tt>
-     * for no constraint.
+     * 
+     * @param height The height by which to constrain the preferred width, or
+     * <tt>-1</tt> for no constraint.
      */
     public int getPreferredWidth(int height);
 
     /**
      * Returns the visual's preferred height given the provided width
      * constraint.
-     *
-     * @param width
-     * The width by which to constrain the preferred height, or <tt>-1</tt>
-     * for no constraint.
+     * 
+     * @param width The width by which to constrain the preferred height, or
+     * <tt>-1</tt> for no constraint.
      */
     public int getPreferredHeight(int width);
 
@@ -55,13 +53,11 @@ public interface ConstrainedVisual exten
 
     /**
      * Returns the baseline for a given width and height.
-     *
+     * 
      * @param width
      * @param height
-     *
-     * @return
-     * The baseline relative to the origin of this visual, or <tt>-1</tt> if
-     * this visual does not have a baseline.
+     * @return The baseline relative to the origin of this visual, or <tt>-1</tt>
+     * if this visual does not have a baseline.
      */
     public int getBaseline(int width, int height);
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java Fri Oct  4 23:45:40 2013
@@ -31,10 +31,10 @@ import org.apache.pivot.wtk.effects.Deco
 /**
  * Abstract base class for containers.
  */
-public abstract class Container extends Component
-    implements Sequence<Component>, Iterable<Component> {
-    private static class ContainerListenerList extends WTKListenerList<ContainerListener>
-        implements ContainerListener {
+public abstract class Container extends Component implements Sequence<Component>,
+    Iterable<Component> {
+    private static class ContainerListenerList extends WTKListenerList<ContainerListener> implements
+        ContainerListener {
         @Override
         public void componentInserted(Container container, int index) {
             for (ContainerListener listener : this) {
@@ -106,7 +106,8 @@ public abstract class Container extends 
             boolean consumed = false;
 
             for (ContainerMouseListener listener : this) {
-                consumed |= listener.mouseWheel(container, scrollType, scrollAmount, wheelRotation, x, y);
+                consumed |= listener.mouseWheel(container, scrollType, scrollAmount, wheelRotation,
+                    x, y);
             }
 
             return consumed;
@@ -147,8 +148,7 @@ public abstract class Container extends 
             throw new IllegalArgumentException("component is null.");
         }
 
-        if (component instanceof Container
-            && ((Container)component).isAncestor(this)) {
+        if (component instanceof Container && ((Container) component).isAncestor(this)) {
             throw new IllegalArgumentException("Component already exists in ancestry.");
         }
 
@@ -219,7 +219,7 @@ public abstract class Container extends 
 
     /**
      * Moves a component within the component sequence.
-     *
+     * 
      * @param from
      * @param to
      */
@@ -271,8 +271,7 @@ public abstract class Container extends 
     protected void setParent(Container parent) {
         // If this container is being removed from the component hierarchy
         // and contains the focused component, clear the focus
-        if (parent == null
-            && containsFocus()) {
+        if (parent == null && containsFocus()) {
             clearFocus();
         }
 
@@ -307,9 +306,8 @@ public abstract class Container extends 
         Component component = getComponentAt(x, y);
 
         if (component instanceof Container) {
-            Container container = (Container)component;
-            component = container.getDescendantAt(x - container.getX(),
-                y - container.getY());
+            Container container = (Container) component;
+            component = container.getDescendantAt(x - container.getX(), y - container.getY());
         }
 
         if (component == null) {
@@ -338,8 +336,7 @@ public abstract class Container extends 
 
     @Override
     public void setVisible(boolean visible) {
-        if (!visible
-            && containsFocus()) {
+        if (!visible && containsFocus()) {
             clearFocus();
         }
 
@@ -365,12 +362,12 @@ public abstract class Container extends 
             if (doubleBufferImage == null) {
                 GraphicsConfiguration gc = graphics.getDeviceConfiguration();
                 doubleBufferImage = gc.createCompatibleImage(getWidth(), getHeight(),
-                        Transparency.OPAQUE);
+                    Transparency.OPAQUE);
                 doubleBufferedRepaintRequired = true;
                 freshImage = true;
             }
 
-            Graphics2D bufferedImageGraphics = (Graphics2D)doubleBufferImage.getGraphics();
+            Graphics2D bufferedImageGraphics = (Graphics2D) doubleBufferImage.getGraphics();
             try {
                 if (doubleBufferedRepaintRequired) {
                     if (!freshImage) {
@@ -403,8 +400,7 @@ public abstract class Container extends 
         for (int i = 0; i < count; i++) {
             Component component = get(i);
 
-            if (component.isVisible()
-                && component.isOpaque()
+            if (component.isVisible() && component.isOpaque()
                 && component.getBounds().contains(paintBounds)) {
                 paintContainer = false;
                 break;
@@ -415,7 +411,7 @@ public abstract class Container extends 
             // Give the base method a copy of the graphics context; otherwise,
             // container skins can change the graphics state before it is passed
             // to subcomponents
-            Graphics2D containerGraphics = (Graphics2D)graphics.create();
+            Graphics2D containerGraphics = (Graphics2D) graphics.create();
             super.paint(containerGraphics);
             containerGraphics.dispose();
         }
@@ -428,13 +424,12 @@ public abstract class Container extends 
 
             // Only paint components that are visible and intersect the
             // current clip rectangle
-            if (component.isVisible()
-                && decoratedBounds.intersects(paintBounds)) {
+            if (component.isVisible() && decoratedBounds.intersects(paintBounds)) {
                 Bounds componentBounds = component.getBounds();
 
                 // Create a copy of the current graphics context and
                 // translate to the component's coordinate system
-                Graphics2D decoratedGraphics = (Graphics2D)graphics.create();
+                Graphics2D decoratedGraphics = (Graphics2D) graphics.create();
                 decoratedGraphics.translate(componentBounds.x, componentBounds.y);
 
                 // Prepare the decorators
@@ -446,7 +441,7 @@ public abstract class Container extends 
                 }
 
                 // Paint the component
-                Graphics2D componentGraphics = (Graphics2D)decoratedGraphics.create();
+                Graphics2D componentGraphics = (Graphics2D) decoratedGraphics.create();
                 componentGraphics.clipRect(0, 0, componentBounds.width, componentBounds.height);
                 component.paint(componentGraphics);
                 componentGraphics.dispose();
@@ -463,38 +458,34 @@ public abstract class Container extends 
     /**
      * Tests if this container is an ancestor of a given component. A container
      * is considered to be its own ancestor.
-     *
-     * @param component
-     * The component to test.
-     *
-     * @return
-     * <tt>true</tt> if this container is an ancestor of <tt>component</tt>;
-     * <tt>false</tt> otherwise.
+     * 
+     * @param component The component to test.
+     * @return <tt>true</tt> if this container is an ancestor of
+     * <tt>component</tt>; <tt>false</tt> otherwise.
      */
     public boolean isAncestor(Component component) {
         boolean ancestor = false;
 
         Component parent = component;
         while (parent != null) {
-           if (parent == this) {
-              ancestor = true;
-              break;
-           }
+            if (parent == this) {
+                ancestor = true;
+                break;
+            }
 
-           parent = parent.getParent();
+            parent = parent.getParent();
         }
 
         return ancestor;
-     }
+    }
 
     /**
      * Requests that focus be given to this container. If this container is not
      * focusable, this requests that focus be set to the first focusable
      * descendant in this container.
-     *
-     * @return
-     * The component that got the focus, or <tt>null</tt> if the focus request
-     * was denied
+     * 
+     * @return The component that got the focus, or <tt>null</tt> if the focus
+     * request was denied
      */
     @Override
     public boolean requestFocus() {
@@ -504,12 +495,13 @@ public abstract class Container extends 
             focused = super.requestFocus();
         } else {
             if (focusTraversalPolicy != null) {
-                Component first = focusTraversalPolicy.getNextComponent(this, null, FocusTraversalDirection.FORWARD);
+                Component first = focusTraversalPolicy.getNextComponent(this, null,
+                    FocusTraversalDirection.FORWARD);
 
                 Component component = first;
-                while (component != null
-                    && !component.requestFocus()) {
-                    component = focusTraversalPolicy.getNextComponent(this, component, FocusTraversalDirection.FORWARD);
+                while (component != null && !component.requestFocus()) {
+                    component = focusTraversalPolicy.getNextComponent(this, component,
+                        FocusTraversalDirection.FORWARD);
 
                     // Ensure that we don't get into an infinite loop
                     if (component == first) {
@@ -526,12 +518,9 @@ public abstract class Container extends 
 
     /**
      * Transfers focus to the next focusable component.
-     *
-     * @param component
-     * The component from which focus will be transferred.
-     *
-     * @param direction
-     * The direction in which to transfer focus.
+     * 
+     * @param component The component from which focus will be transferred.
+     * @param direction The direction in which to transfer focus.
      */
     public Component transferFocus(Component component, FocusTraversalDirection direction) {
         Component componentUpdated = component;
@@ -540,20 +529,20 @@ public abstract class Container extends 
             componentUpdated = transferFocus(direction);
         } else {
             do {
-                componentUpdated = focusTraversalPolicy.getNextComponent(this, componentUpdated, direction);
+                componentUpdated = focusTraversalPolicy.getNextComponent(this, componentUpdated,
+                    direction);
 
                 if (componentUpdated != null) {
                     if (componentUpdated.isFocusable()) {
                         componentUpdated.requestFocus();
                     } else {
                         if (componentUpdated instanceof Container) {
-                            Container container = (Container)componentUpdated;
+                            Container container = (Container) componentUpdated;
                             componentUpdated = container.transferFocus(null, direction);
                         }
                     }
                 }
-            } while (componentUpdated != null
-                && !componentUpdated.isFocused());
+            } while (componentUpdated != null && !componentUpdated.isFocused());
 
             if (componentUpdated == null) {
                 // We are at the end of the traversal
@@ -573,9 +562,9 @@ public abstract class Container extends 
 
     /**
      * Sets this container's focus traversal policy.
-     *
-     * @param focusTraversalPolicy
-     * The focus traversal policy to use with this container.
+     * 
+     * @param focusTraversalPolicy The focus traversal policy to use with this
+     * container.
      */
     public void setFocusTraversalPolicy(FocusTraversalPolicy focusTraversalPolicy) {
         FocusTraversalPolicy previousFocusTraversalPolicy = this.focusTraversalPolicy;
@@ -589,15 +578,13 @@ public abstract class Container extends 
     /**
      * Tests whether this container is an ancestor of the currently focused
      * component.
-     *
-     * @return
-     * <tt>true</tt> if a component is focused and this container is an
+     * 
+     * @return <tt>true</tt> if a component is focused and this container is an
      * ancestor of the component; <tt>false</tt>, otherwise.
      */
     public boolean containsFocus() {
         Component focusedComponent = getFocusedComponent();
-        return (focusedComponent != null
-            && isAncestor(focusedComponent));
+        return (focusedComponent != null && isAncestor(focusedComponent));
     }
 
     protected void descendantAdded(Component descendant) {
@@ -634,7 +621,7 @@ public abstract class Container extends 
 
     /**
      * Propagates binding to subcomponents.
-     *
+     * 
      * @param context
      */
     @Override
@@ -646,7 +633,7 @@ public abstract class Container extends 
 
     /**
      * Propagates binding to subcomponents.
-     *
+     * 
      * @param context
      */
     @Override
@@ -673,8 +660,7 @@ public abstract class Container extends 
         // Clear the mouse over component if its mouse-over state has
         // changed (e.g. if its enabled or visible properties have
         // changed)
-        if (mouseOverComponent != null
-            && !mouseOverComponent.isMouseOver()) {
+        if (mouseOverComponent != null && !mouseOverComponent.isMouseOver()) {
             mouseOverComponent = null;
         }
 
@@ -706,8 +692,7 @@ public abstract class Container extends 
 
                 // Propagate event to subcomponents
                 if (component != null) {
-                    consumed = component.mouseMove(x - component.getX(),
-                        y - component.getY());
+                    consumed = component.mouseMove(x - component.getX(), y - component.getY());
                 }
 
                 // Notify the base class
@@ -723,8 +708,7 @@ public abstract class Container extends 
     @Override
     protected void mouseOut() {
         // Ensure that mouse out is called on descendant components
-        if (mouseOverComponent != null
-            && mouseOverComponent.isMouseOver()) {
+        if (mouseOverComponent != null && mouseOverComponent.isMouseOver()) {
             mouseOverComponent.mouseOut();
         }
 
@@ -798,8 +782,7 @@ public abstract class Container extends 
                         component.mouseOver();
                     }
 
-                    consumed = component.mouseUp(button, x - component.getX(),
-                        y - component.getY());
+                    consumed = component.mouseUp(button, x - component.getX(), y - component.getY());
                 }
 
                 // Notify the base class
@@ -808,13 +791,10 @@ public abstract class Container extends 
                 }
 
                 // Synthesize mouse click event
-                if (mouseDown
-                    && component != null
-                    && component == mouseDownComponent
-                    && component.isEnabled()
-                    && component.isVisible()) {
-                    mouseClickConsumed = component.mouseClick(button, x - component.getX(),
-                        y - component.getY(), mouseClickCount);
+                if (mouseDown && component != null && component == mouseDownComponent
+                    && component.isEnabled() && component.isVisible()) {
+                    mouseClickConsumed = component.mouseClick(button, x - component.getX(), y
+                        - component.getY(), mouseClickCount);
                 }
             }
         }
@@ -837,8 +817,8 @@ public abstract class Container extends 
     }
 
     @Override
-    protected boolean mouseWheel(Mouse.ScrollType scrollType, int scrollAmount,
-        int wheelRotation, int x, int y) {
+    protected boolean mouseWheel(Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation,
+        int x, int y) {
         boolean consumed = false;
 
         if (isEnabled()) {
@@ -856,8 +836,8 @@ public abstract class Container extends 
                         component.mouseOver();
                     }
 
-                    consumed = component.mouseWheel(scrollType, scrollAmount, wheelRotation,
-                        x - component.getX(), y - component.getY());
+                    consumed = component.mouseWheel(scrollType, scrollAmount, wheelRotation, x
+                        - component.getX(), y - component.getY());
                 }
 
                 // Notify the base class
@@ -900,13 +880,13 @@ public abstract class Container extends 
     }
 
     public void setDoubleBuffered(boolean b) {
-       doubleBuffering = b;
-       if (b) {
-           invalidate();
-       } else {
-           doubleBufferImage = null;
-           doubleBufferedRepaintRequired = false;
-       }
+        doubleBuffering = b;
+        if (b) {
+            invalidate();
+        } else {
+            doubleBufferImage = null;
+            doubleBufferedRepaintRequired = false;
+        }
     }
 
     public ListenerList<ContainerListener> getContainerListeners() {
@@ -929,8 +909,9 @@ public abstract class Container extends 
         @Override
         public void check(Component component) {
             String threadName = Thread.currentThread().getName();
-            /* Currently, application startup happens on the main thread, so we need to allow
-             * that thread to modify WTK state.
+            /*
+             * Currently, application startup happens on the main thread, so we
+             * need to allow that thread to modify WTK state.
              */
             if (threadName.equals("main") || threadName.equals("javawsApplicationMain")) {
                 return;
@@ -940,15 +921,17 @@ public abstract class Container extends 
                 return;
             }
             /*
-             * See Sun/Oracle bug 6424157. There is a race condition where we can be running on the event thread
-             * but isDispatchThread() will return false.
+             * See Sun/Oracle bug 6424157. There is a race condition where we
+             * can be running on the event thread but isDispatchThread() will
+             * return false.
              */
             if (threadName.startsWith("AWT-EventQueue-")) {
                 return;
             }
             if (!java.awt.EventQueue.isDispatchThread()) {
-                throw new IllegalStateException("this method can only be called from the AWT event dispatch thread"
-                    + ", and not from \"" + threadName + "\"");
+                throw new IllegalStateException(
+                    "this method can only be called from the AWT event dispatch thread"
+                        + ", and not from \"" + threadName + "\"");
             }
         }
     };

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerListener.java Fri Oct  4 23:45:40 2013
@@ -21,7 +21,7 @@ import org.apache.pivot.collections.Sequ
 /**
  * Container listener interface.
  */
-public interface ContainerListener  {
+public interface ContainerListener {
     /**
      * Container listener adapter.
      */
@@ -51,7 +51,7 @@ public interface ContainerListener  {
     /**
      * Called when a component has been inserted into a container's component
      * sequence.
-     *
+     * 
      * @param container
      * @param index
      */
@@ -60,7 +60,7 @@ public interface ContainerListener  {
     /**
      * Called when components have been removed from a container's component
      * sequence.
-     *
+     * 
      * @param container
      * @param index
      * @param removed
@@ -70,7 +70,7 @@ public interface ContainerListener  {
     /**
      * Called when a component has moved from one z-index to another within a
      * container.
-     *
+     * 
      * @param container
      * @param from
      * @param to
@@ -79,7 +79,7 @@ public interface ContainerListener  {
 
     /**
      * Called when a container's focus traversal policy has changed.
-     *
+     * 
      * @param container
      * @param previousFocusTraversalPolicy
      */

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerMouseListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerMouseListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerMouseListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ContainerMouseListener.java Fri Oct  4 23:45:40 2013
@@ -49,59 +49,51 @@ public interface ContainerMouseListener 
 
     /**
      * Called when the mouse is moved over a container.
-     *
+     * 
      * @param container
      * @param x
      * @param y
-     *
-     * @return
-     * <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
+     * @return <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
      * propagate.
      */
     public boolean mouseMove(Container container, int x, int y);
 
     /**
      * Called when the mouse is pressed over a container.
-     *
+     * 
      * @param container
      * @param button
      * @param x
      * @param y
-     *
-     * @return
-     * <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
+     * @return <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
      * propagate.
      */
     public boolean mouseDown(Container container, Mouse.Button button, int x, int y);
 
     /**
      * Called when the mouse is released over a container.
-     *
+     * 
      * @param container
      * @param button
      * @param x
      * @param y
-     *
-     * @return
-     * <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
+     * @return <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
      * propagate.
      */
     public boolean mouseUp(Container container, Mouse.Button button, int x, int y);
 
     /**
      * Called when the mouse wheel is scrolled over a container.
-     *
+     * 
      * @param container
      * @param scrollType
      * @param scrollAmount
      * @param wheelRotation
      * @param x
      * @param y
-     *
-     * @return
-     * <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
+     * @return <tt>true</tt> to consume the event; <tt>false</tt> to allow it to
      * propagate.
      */
-    public boolean mouseWheel(Container container, Mouse.ScrollType scrollType,
-        int scrollAmount, int wheelRotation, int x, int y);
+    public boolean mouseWheel(Container container, Mouse.ScrollType scrollType, int scrollAmount,
+        int wheelRotation, int x, int y);
 }

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=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/CornerRadii.java Fri Oct  4 23:45:40 2013
@@ -98,11 +98,13 @@ public final class CornerRadii implement
     }
 
     /**
-     * Construct a {@link CornerRadii} object from a dictionary specifying values for
-     * each of the four corners
+     * Construct a {@link CornerRadii} object from a dictionary specifying
+     * 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}, {@value #BOTTOM_RIGHT_KEY}, all
-     * with numeric values.  Omitted values are treated as zero.
+     * {@value #TOP_RIGHT_KEY}, {@value #BOTTOM_LEFT_KEY},
+     * {@value #BOTTOM_RIGHT_KEY}, all with numeric values. Omitted values are
+     * treated as zero.
      */
     public CornerRadii(Dictionary<String, ?> cornerRadii) {
         if (cornerRadii == null) {
@@ -110,7 +112,7 @@ public final class CornerRadii implement
         }
 
         if (cornerRadii.containsKey(TOP_LEFT_KEY)) {
-            topLeft = (Integer)cornerRadii.get(TOP_LEFT_KEY);
+            topLeft = (Integer) cornerRadii.get(TOP_LEFT_KEY);
 
             if (topLeft < 0) {
                 throw new IllegalArgumentException("\"topLeft\" is negative.");
@@ -120,7 +122,7 @@ public final class CornerRadii implement
         }
 
         if (cornerRadii.containsKey(TOP_RIGHT_KEY)) {
-            topRight = (Integer)cornerRadii.get(TOP_RIGHT_KEY);
+            topRight = (Integer) cornerRadii.get(TOP_RIGHT_KEY);
 
             if (topRight < 0) {
                 throw new IllegalArgumentException("\"topRight\" is negative.");
@@ -130,7 +132,7 @@ public final class CornerRadii implement
         }
 
         if (cornerRadii.containsKey(BOTTOM_LEFT_KEY)) {
-            bottomLeft = (Integer)cornerRadii.get(BOTTOM_LEFT_KEY);
+            bottomLeft = (Integer) cornerRadii.get(BOTTOM_LEFT_KEY);
 
             if (bottomLeft < 0) {
                 throw new IllegalArgumentException("\"bottomLeft\" is negative.");
@@ -140,7 +142,7 @@ public final class CornerRadii implement
         }
 
         if (cornerRadii.containsKey(BOTTOM_RIGHT_KEY)) {
-            bottomRight = (Integer)cornerRadii.get(BOTTOM_RIGHT_KEY);
+            bottomRight = (Integer) cornerRadii.get(BOTTOM_RIGHT_KEY);
 
             if (bottomRight < 0) {
                 throw new IllegalArgumentException("\"bottomRight\" is negative.");
@@ -155,11 +157,9 @@ public final class CornerRadii implement
         boolean equals = false;
 
         if (object instanceof CornerRadii) {
-            CornerRadii cornerRadii = (CornerRadii)object;
-            equals = (topLeft == cornerRadii.topLeft
-                && topRight == cornerRadii.topRight
-                && bottomLeft == cornerRadii.bottomLeft
-                && bottomRight == cornerRadii.bottomRight);
+            CornerRadii cornerRadii = (CornerRadii) object;
+            equals = (topLeft == cornerRadii.topLeft && topRight == cornerRadii.topRight
+                && bottomLeft == cornerRadii.bottomLeft && bottomRight == cornerRadii.bottomRight);
         }
 
         return equals;
@@ -178,8 +178,8 @@ public final class CornerRadii implement
 
     @Override
     public String toString() {
-        return getClass().getName() + " [" + topLeft + ", " + topRight
-            + bottomLeft + ", " + bottomRight + "]";
+        return getClass().getName() + " [" + topLeft + ", " + topRight + bottomLeft + ", "
+            + bottomRight + "]";
     }
 
     public static CornerRadii decode(String value) {

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Cursor.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Cursor.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Cursor.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Cursor.java Fri Oct  4 23:45:40 2013
@@ -20,18 +20,5 @@ package org.apache.pivot.wtk;
  * Enumeration defining the supported mouse cursor types.
  */
 public enum Cursor {
-    DEFAULT,
-    HAND,
-    TEXT,
-    WAIT,
-    CROSSHAIR,
-    MOVE,
-    RESIZE_NORTH,
-    RESIZE_SOUTH,
-    RESIZE_EAST,
-    RESIZE_WEST,
-    RESIZE_NORTH_EAST,
-    RESIZE_NORTH_WEST,
-    RESIZE_SOUTH_EAST,
-    RESIZE_SOUTH_WEST
+    DEFAULT, HAND, TEXT, WAIT, CROSSHAIR, MOVE, RESIZE_NORTH, RESIZE_SOUTH, RESIZE_EAST, RESIZE_WEST, RESIZE_NORTH_EAST, RESIZE_NORTH_WEST, RESIZE_SOUTH_EAST, RESIZE_SOUTH_WEST
 }

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=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java Fri Oct  4 23:45:40 2013
@@ -41,8 +41,7 @@ import org.apache.pivot.wtk.media.Image;
 import org.apache.pivot.wtk.media.Picture;
 
 /**
- * Application context used to execute applications in a native frame
- * window.
+ * Application context used to execute applications in a native frame window.
  */
 public final class DesktopApplicationContext extends ApplicationContext {
     /**
@@ -66,14 +65,14 @@ public final class DesktopApplicationCon
 
         /**
          * Called when the host window for secondary display has been opened.
-         *
+         * 
          * @param display
          */
         public void hostWindowOpened(Display display);
 
         /**
          * Called when the host window for secondary display has been closed.
-         *
+         * 
          * @param display
          */
         public void hostWindowClosed(Display display);
@@ -115,7 +114,8 @@ public final class DesktopApplicationCon
                 }
 
                 @Override
-                public void componentsRemoved(Container container, int index, Sequence<Component> removed) {
+                public void componentsRemoved(Container container, int index,
+                    Sequence<Component> removed) {
                     if (index == container.getLength()) {
                         updateFrameTitleBar();
                     }
@@ -125,8 +125,7 @@ public final class DesktopApplicationCon
                 public void componentMoved(Container container, int from, int to) {
                     int n = container.getLength();
 
-                    if (from == n - 1
-                        || to == n - 1) {
+                    if (from == n - 1 || to == n - 1) {
                         updateFrameTitleBar();
                     }
                 }
@@ -141,7 +140,7 @@ public final class DesktopApplicationCon
             if (n == 0) {
                 rootOwnerLocal = null;
             } else {
-                Window topWindow = (Window)display.get(display.getLength() - 1);
+                Window topWindow = (Window) display.get(display.getLength() - 1);
                 rootOwnerLocal = topWindow.getRootOwner();
             }
 
@@ -165,10 +164,10 @@ public final class DesktopApplicationCon
                         java.awt.Window hostWindow = getDisplay().getHostWindow();
 
                         if (DesktopDisplayHost.this.rootOwner == null) {
-                            ((TitledWindow)hostWindow).setTitle(DEFAULT_HOST_WINDOW_TITLE);
+                            ((TitledWindow) hostWindow).setTitle(DEFAULT_HOST_WINDOW_TITLE);
                             hostWindow.setIconImage(null);
                         } else {
-                            ((TitledWindow)hostWindow).setTitle(DesktopDisplayHost.this.rootOwner.getTitle());
+                            ((TitledWindow) hostWindow).setTitle(DesktopDisplayHost.this.rootOwner.getTitle());
 
                             java.util.ArrayList<BufferedImage> iconImages = new java.util.ArrayList<>();
                             for (Image icon : DesktopDisplayHost.this.rootOwner.getIcons()) {
@@ -193,10 +192,12 @@ public final class DesktopApplicationCon
         }
     }
 
-    // The AWT Window class does not define a title property; this interface allows
+    // The AWT Window class does not define a title property; this interface
+    // allows
     // the HostFrame and HostDialog titles to be handled polymorphically
     private interface TitledWindow {
         public String getTitle();
+
         public void setTitle(String title);
     }
 
@@ -205,8 +206,7 @@ public final class DesktopApplicationCon
         private static final long serialVersionUID = 5340356674429280196L;
 
         public HostFrame() {
-            enableEvents(AWTEvent.WINDOW_EVENT_MASK
-                | AWTEvent.WINDOW_STATE_EVENT_MASK);
+            enableEvents(AWTEvent.WINDOW_EVENT_MASK | AWTEvent.WINDOW_STATE_EVENT_MASK);
 
             // Disable focus traversal keys
             setFocusTraversalKeysEnabled(false);
@@ -234,7 +234,7 @@ public final class DesktopApplicationCon
         public void processWindowEvent(WindowEvent event) {
             super.processWindowEvent(event);
 
-            switch(event.getID()) {
+            switch (event.getID()) {
                 case WindowEvent.WINDOW_CLOSING: {
                     exit();
                     break;
@@ -253,11 +253,11 @@ public final class DesktopApplicationCon
         protected void processWindowStateEvent(WindowEvent event) {
             super.processWindowStateEvent(event);
 
-            switch(event.getID()) {
+            switch (event.getID()) {
                 case WindowEvent.WINDOW_ICONIFIED: {
                     try {
                         application.suspend();
-                    } catch(Exception exception) {
+                    } catch (Exception exception) {
                         handleUncaughtException(exception);
                     }
 
@@ -266,7 +266,7 @@ public final class DesktopApplicationCon
                 case WindowEvent.WINDOW_DEICONIFIED: {
                     try {
                         application.resume();
-                    } catch(Exception exception) {
+                    } catch (Exception exception) {
                         handleUncaughtException(exception);
                     }
 
@@ -288,8 +288,8 @@ public final class DesktopApplicationCon
         private DisplayListener displayCloseListener;
 
         public HostDialog(java.awt.Window owner, boolean modal, DisplayListener displayCloseListener) {
-            super(owner, modal ?
-                java.awt.Dialog.ModalityType.APPLICATION_MODAL : java.awt.Dialog.ModalityType.MODELESS);
+            super(owner, modal ? java.awt.Dialog.ModalityType.APPLICATION_MODAL
+                : java.awt.Dialog.ModalityType.MODELESS);
 
             this.displayCloseListener = displayCloseListener;
 
@@ -328,7 +328,7 @@ public final class DesktopApplicationCon
         public void processWindowEvent(WindowEvent event) {
             super.processWindowEvent(event);
 
-            switch(event.getID()) {
+            switch (event.getID()) {
                 case WindowEvent.WINDOW_OPENED: {
                     Display display = this.displayHost.getDisplay();
                     displays.add(display);
@@ -395,8 +395,7 @@ public final class DesktopApplicationCon
     }
 
     /**
-     * Terminates the application context.
-     * this call is the same as exit(true)
+     * Terminates the application context. this call is the same as exit(true)
      */
     public static void exit() {
         exit(true);
@@ -404,10 +403,9 @@ public final class DesktopApplicationCon
 
     /**
      * Terminates the application context.
-     *
-     * @param optional
-     * If <tt>true</tt>, shutdown is optional and may be cancelled. If
-     * <tt>false</tt>, shutdown cannot be cancelled.
+     * 
+     * @param optional If <tt>true</tt>, shutdown is optional and may be
+     * cancelled. If <tt>false</tt>, shutdown cannot be cancelled.
      */
     public static boolean exit(boolean optional) {
         boolean cancelShutdown = false;
@@ -415,7 +413,7 @@ public final class DesktopApplicationCon
         if (application != null) {
             try {
                 cancelShutdown = application.shutdown(optional);
-            } catch(Exception exception) {
+            } catch (Exception exception) {
                 handleUncaughtException(exception);
             }
 
@@ -430,8 +428,7 @@ public final class DesktopApplicationCon
                 Preferences preferences = Preferences.userNodeForPackage(DesktopApplicationContext.class);
                 preferences = preferences.node(applicationClassName);
 
-                boolean maximized = (windowedHostFrame.getExtendedState()
-                    & java.awt.Frame.MAXIMIZED_BOTH) == java.awt.Frame.MAXIMIZED_BOTH;
+                boolean maximized = (windowedHostFrame.getExtendedState() & java.awt.Frame.MAXIMIZED_BOTH) == java.awt.Frame.MAXIMIZED_BOTH;
                 if (!maximized) {
                     preferences.putInt(X_ARGUMENT, windowedHostFrame.getX());
                     preferences.putInt(Y_ARGUMENT, windowedHostFrame.getY());
@@ -457,7 +454,7 @@ public final class DesktopApplicationCon
 
     /**
      * Primary application entry point.
-     *
+     * 
      * @param args
      */
     public static void main(String[] args) {
@@ -604,8 +601,8 @@ public final class DesktopApplicationCon
         // Load the application
         try {
             Class<?> applicationClass = Class.forName(applicationClassName);
-            application = (Application)applicationClass.newInstance();
-        } catch(ClassNotFoundException exception) {
+            application = (Application) applicationClass.newInstance();
+        } catch (ClassNotFoundException exception) {
             exception.printStackTrace();
         } catch (InstantiationException exception) {
             exception.printStackTrace();
@@ -626,7 +623,8 @@ public final class DesktopApplicationCon
             // Initial configuration of the windows
             setFullScreen(fullScreen, visible);
 
-            // TODO This is a workaround for Java bug #6365898 on Linux (fixed only in Java 7),
+            // TODO This is a workaround for Java bug #6365898 on Linux (fixed
+            // only in Java 7),
             // revisit / remove later when we'll require Java 7
             if (maximized && visible) {
                 windowedHostFrame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
@@ -638,8 +636,8 @@ public final class DesktopApplicationCon
                 @Override
                 public void run() {
                     try {
-                        application.startup(primaryDisplayHost.getDisplay(),
-                            new ImmutableMap<>(properties));
+                        application.startup(primaryDisplayHost.getDisplay(), new ImmutableMap<>(
+                            properties));
                     } catch (Exception exception) {
                         handleUncaughtException(exception);
                     }
@@ -658,32 +656,32 @@ public final class DesktopApplicationCon
                 Class<?> eawtApplicationListenerClass = Class.forName("com.apple.eawt.ApplicationListener");
                 Class<?> eawtApplicationEventClass = Class.forName("com.apple.eawt.ApplicationEvent");
 
-                Method setEnabledAboutMenuMethod = eawtApplicationClass.getMethod("setEnabledAboutMenu",
-                    new Class<?>[] {Boolean.TYPE});
+                Method setEnabledAboutMenuMethod = eawtApplicationClass.getMethod(
+                    "setEnabledAboutMenu", new Class<?>[] { Boolean.TYPE });
 
-                Method addApplicationListenerMethod = eawtApplicationClass.getMethod("addApplicationListener",
-                    new Class<?>[] {eawtApplicationListenerClass});
+                Method addApplicationListenerMethod = eawtApplicationClass.getMethod(
+                    "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() {
-                @Override
+                    @Override
                     public Object invoke(Object proxy, Method method, Object[] args)
                         throws Throwable {
                         boolean handled = true;
 
                         String methodName = method.getName();
-                        if (methodName.equals("handleAbout"))  {
-                            Application.AboutHandler aboutHandler = (Application.AboutHandler)application;
+                        if (methodName.equals("handleAbout")) {
+                            Application.AboutHandler aboutHandler = (Application.AboutHandler) application;
                             aboutHandler.aboutRequested();
                         } else if (methodName.equals("handleQuit")) {
                             handled = !exit(true);
                         }
 
                         // Invoke setHandled()
-                        setHandledMethod.invoke(args[0], new Object[] {handled});
+                        setHandledMethod.invoke(args[0], new Object[] { handled });
 
                         return null;
                     }
@@ -694,12 +692,14 @@ public final class DesktopApplicationCon
                 setEnabledAboutMenuMethod.invoke(eawtApplication,
                     application instanceof Application.AboutHandler);
 
-                Object eawtApplicationListener =
-                    Proxy.newProxyInstance(DesktopApplicationContext.class.getClassLoader(),
-                        new Class<?>[]{eawtApplicationListenerClass}, handler);
-
-                // Invoke the addApplicationListener() method with the proxy listener
-                addApplicationListenerMethod.invoke(eawtApplication, new Object[] {eawtApplicationListener});
+                Object eawtApplicationListener = Proxy.newProxyInstance(
+                    DesktopApplicationContext.class.getClassLoader(),
+                    new Class<?>[] { eawtApplicationListenerClass }, handler);
+
+                // Invoke the addApplicationListener() method with the proxy
+                // listener
+                addApplicationListenerMethod.invoke(eawtApplication,
+                    new Object[] { eawtApplicationListener });
             } catch (Throwable throwable) {
                 System.err.println("Unable to attach EAWT hooks: " + throwable);
             }
@@ -715,7 +715,7 @@ public final class DesktopApplicationCon
 
     /**
      * Sets the full-screen mode flag.
-     *
+     * 
      * @param fullScreen
      */
     public static void setFullScreen(boolean fullScreen) {
@@ -771,7 +771,7 @@ public final class DesktopApplicationCon
      * its UI and the SplashScreen is ready to be dismissed, but can be safely
      * called regardless of whether there is now, or used to be, a visible
      * SplashScreen.
-     *
+     * 
      * @param display Display to make visible
      * @see java.awt.SplashScreen
      */
@@ -786,7 +786,7 @@ public final class DesktopApplicationCon
 
     /**
      * Sizes the window's native host frame to match its preferred size.
-     *
+     * 
      * @param window
      */
     public static void sizeHostToFit(Window window) {
@@ -801,13 +801,13 @@ public final class DesktopApplicationCon
         Dimensions size = window.getPreferredSize();
         java.awt.Window hostWindow = window.getDisplay().getHostWindow();
         java.awt.Insets frameInsets = hostWindow.getInsets();
-        hostWindow.setSize(size.width + (frameInsets.left + frameInsets.right),
-            size.height + (frameInsets.top + frameInsets.bottom));
+        hostWindow.setSize(size.width + (frameInsets.left + frameInsets.right), size.height
+            + (frameInsets.top + frameInsets.bottom));
     }
 
     /**
      * Creates a new secondary display.
-     *
+     * 
      * @param width
      * @param height
      * @param x
@@ -828,7 +828,8 @@ public final class DesktopApplicationCon
         hostDialog.setResizable(resizable);
         hostDialog.setUndecorated(undecorated);
 
-        // Open the window in a callback; otherwise, if it is modal, it will block the
+        // Open the window in a callback; otherwise, if it is modal, it will
+        // block the
         // calling thread
         ApplicationContext.queueCallback(new Runnable() {
             @Override
@@ -842,16 +843,10 @@ public final class DesktopApplicationCon
 
     /**
      * Utility method to make it easier to define <tt>main()</tt> entry-points
-     * into applications. For example:
-     *
-     * <code>
-     * public class MyApp implements Application {
-     *   public static void main(String[] args) throws Exception {
-     *     DesktopApplicationContext.main(MyApp.class, args);
-     *   }
-     * }
-     * </code>
-     *
+     * into applications. For example: <code> public class MyApp implements
+     * Application { public static void main(String[] args) throws Exception {
+     * DesktopApplicationContext.main(MyApp.class, args); } } </code>
+     * 
      * @param applicationClass
      * @param applicationArgs
      */

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Dialog.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Dialog.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Dialog.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Dialog.java Fri Oct  4 23:45:40 2013
@@ -20,12 +20,12 @@ import org.apache.pivot.util.ListenerLis
 import org.apache.pivot.util.Vote;
 
 /**
- * Window class whose primary purpose is to facilitate interaction between
- * an application and a user.
+ * Window class whose primary purpose is to facilitate interaction between an
+ * application and a user.
  */
 public class Dialog extends Frame {
-    private static class DialogListenerList extends WTKListenerList<DialogListener>
-        implements DialogListener {
+    private static class DialogListenerList extends WTKListenerList<DialogListener> implements
+        DialogListener {
         @Override
         public void modalChanged(Dialog dialog) {
             for (DialogListener listener : this) {
@@ -120,12 +120,10 @@ public class Dialog extends Frame {
 
     /**
      * Opens the dialog.
-     *
-     * @param display
-     * The display on which the dialog will be opened.
-     *
-     * @param owner
-     * The window's owner. The dialog will be modal over this window.
+     * 
+     * @param display The display on which the dialog will be opened.
+     * @param owner The window's owner. The dialog will be modal over this
+     * window.
      */
     @Override
     public final void open(Display display, Window owner) {
@@ -134,12 +132,10 @@ public class Dialog extends Frame {
 
     /**
      * Opens the dialog.
-     *
-     * @param display
-     * The display on which the dialog will be opened.
-     *
-     * @param dialogCloseListenerArgument
-     * A listener that will be called when the dialog is closed.
+     * 
+     * @param display The display on which the dialog will be opened.
+     * @param dialogCloseListenerArgument A listener that will be called when the
+     * dialog is closed.
      */
     public final void open(Display display, DialogCloseListener dialogCloseListenerArgument) {
         open(display, null, dialogCloseListenerArgument);
@@ -147,12 +143,11 @@ public class Dialog extends Frame {
 
     /**
      * Opens the dialog.
-     *
-     * @param owner
-     * The window's owner. The dialog will be modal over this window.
-     *
-     * @param dialogCloseListenerArgument
-     * A listener that will be called when the dialog is closed.
+     * 
+     * @param owner The window's owner. The dialog will be modal over this
+     * window.
+     * @param dialogCloseListenerArgument A listener that will be called when the
+     * dialog is closed.
      */
     public final void open(Window owner, DialogCloseListener dialogCloseListenerArgument) {
         if (owner == null) {
@@ -164,16 +159,12 @@ public class Dialog extends Frame {
 
     /**
      * Opens the dialog.
-     *
-     * @param display
-     * The display on which the dialog will be opened.
-     *
-     * @param owner
-     * The window's owner, or <tt>null</tt> if the window has no owner. Required if the dialog
-     * is modal.
-     *
-     * @param dialogCloseListenerArgument
-     * A listener that will be called when the dialog is closed.
+     * 
+     * @param display The display on which the dialog will be opened.
+     * @param owner The window's owner, or <tt>null</tt> if the window has no
+     * owner. Required if the dialog is modal.
+     * @param dialogCloseListenerArgument A listener that will be called when the
+     * dialog is closed.
      */
     public void open(Display display, Window owner, DialogCloseListener dialogCloseListenerArgument) {
         if (modal && owner == null) {
@@ -213,8 +204,7 @@ public class Dialog extends Frame {
                     this.result = resultArgument;
 
                     // Move the owner to the front
-                    if (owner != null
-                        && owner.isOpen()) {
+                    if (owner != null && owner.isOpen()) {
                         owner.moveToFront();
                     }
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogCloseListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogCloseListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogCloseListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogCloseListener.java Fri Oct  4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
 public interface DialogCloseListener {
     /**
      * Called when a dialog has closed.
-     *
+     * 
      * @param dialog
      */
     public void dialogClosed(Dialog dialog, boolean modal);

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogListener.java Fri Oct  4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
 public interface DialogListener {
     /**
      * Called when a dialog's modal flag has changed.
-     *
+     * 
      * @param dialog
      */
     public void modalChanged(Dialog dialog);

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogStateListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogStateListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogStateListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DialogStateListener.java Fri Oct  4 23:45:40 2013
@@ -44,7 +44,7 @@ public interface DialogStateListener ext
 
     /**
      * Called to preview a dialog close event.
-     *
+     * 
      * @param dialog
      * @param result
      */
@@ -52,7 +52,7 @@ public interface DialogStateListener ext
 
     /**
      * Called when a dialog close event has been vetoed.
-     *
+     * 
      * @param dialog
      * @param reason
      */

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Dimensions.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Dimensions.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Dimensions.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Dimensions.java Fri Oct  4 23:45:40 2013
@@ -54,13 +54,13 @@ public final class Dimensions implements
         }
 
         if (dimensions.containsKey(WIDTH_KEY)) {
-            width = (Integer)dimensions.get(WIDTH_KEY);
+            width = (Integer) dimensions.get(WIDTH_KEY);
         } else {
             width = 0;
         }
 
         if (dimensions.containsKey(HEIGHT_KEY)) {
-            height = (Integer)dimensions.get(HEIGHT_KEY);
+            height = (Integer) dimensions.get(HEIGHT_KEY);
         } else {
             height = 0;
         }
@@ -71,9 +71,8 @@ public final class Dimensions implements
         boolean equals = false;
 
         if (object instanceof Dimensions) {
-            Dimensions dimensions = (Dimensions)object;
-            equals = (width == dimensions.width
-                && height == dimensions.height);
+            Dimensions dimensions = (Dimensions) object;
+            equals = (width == dimensions.width && height == dimensions.height);
         }
 
         return equals;

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Display.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Display.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Display.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Display.java Fri Oct  4 23:45:40 2013
@@ -37,8 +37,7 @@ public final class Display extends Conta
 
     public java.awt.Window getHostWindow() {
         java.awt.Container parent = displayHost.getParent();
-        while (parent != null
-            && !(parent instanceof java.awt.Window)) {
+        while (parent != null && !(parent instanceof java.awt.Window)) {
             parent = parent.getParent();
         }
 
@@ -46,7 +45,7 @@ public final class Display extends Conta
             throw new IllegalArgumentException("Window does not have a native host.");
         }
 
-        return (java.awt.Window)parent;
+        return (java.awt.Window) parent;
     }
 
     @Override
@@ -77,7 +76,7 @@ public final class Display extends Conta
     @Override
     public void repaint(int x, int y, int width, int height, boolean immediate) {
         if (immediate) {
-            Graphics2D graphics = (Graphics2D)displayHost.getGraphics();
+            Graphics2D graphics = (Graphics2D) displayHost.getGraphics();
 
             // If the display host has been made non-displayable (as will
             // happen when the native peer closes), graphics will be null
@@ -86,8 +85,8 @@ public final class Display extends Conta
                 if (scale == 1) {
                     graphics.clipRect(x, y, width, height);
                 } else {
-                    graphics.clipRect((int)Math.floor(x * scale), (int)Math.floor(y * scale),
-                        (int)Math.ceil(width * scale) + 1, (int)Math.ceil(height * scale) + 1);
+                    graphics.clipRect((int) Math.floor(x * scale), (int) Math.floor(y * scale),
+                        (int) Math.ceil(width * scale) + 1, (int) Math.ceil(height * scale) + 1);
                 }
 
                 displayHost.paint(graphics);
@@ -101,8 +100,8 @@ public final class Display extends Conta
     @Override
     public void insert(Component component, int index) {
         if (!(component instanceof Window)) {
-            throw new IllegalArgumentException("component must be an instance "
-               + "of " + Window.class);
+            throw new IllegalArgumentException("component must be an instance " + "of "
+                + Window.class);
         }
 
         super.insert(component, index);

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DragSource.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DragSource.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DragSource.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DragSource.java Fri Oct  4 23:45:40 2013
@@ -22,19 +22,17 @@ package org.apache.pivot.wtk;
 public interface DragSource {
     /**
      * Called by the framework to initiate a drag operation.
-     *
+     * 
      * @param component
      * @param x
      * @param y
-     *
-     * @return
-     * <tt>true</tt> to accept the drag; <tt>false</tt> to reject it.
+     * @return <tt>true</tt> to accept the drag; <tt>false</tt> to reject it.
      */
     public boolean beginDrag(Component component, int x, int y);
 
     /**
      * Called by the framework to terminate a drag operation.
-     *
+     * 
      * @param component
      * @param dropAction
      */
@@ -42,10 +40,9 @@ public interface DragSource {
 
     /**
      * Returns the drag source's native flag.
-     *
-     * @return
-     * If <tt>true</tt>, the drag will be executed via the native OS. Otherwise,
-     * it will be executed locally.
+     * 
+     * @return If <tt>true</tt>, the drag will be executed via the native OS.
+     * Otherwise, it will be executed locally.
      */
     public boolean isNative();
 
@@ -56,27 +53,24 @@ public interface DragSource {
 
     /**
      * Returns a visual representing the drag content.
-     *
-     * @return
-     * The drag visual, or <tt>null</tt> for no visual.
+     * 
+     * @return The drag visual, or <tt>null</tt> for no visual.
      */
     public Visual getRepresentation();
 
     /**
      * Returns the offset of the mouse pointer within the drag visual. Not
      * required unless a representation is specified.
-     *
-     * @return
-     * The mouse offset within the drag visual, or <tt>null</tt> if no visual
-     * is specified.
+     * 
+     * @return The mouse offset within the drag visual, or <tt>null</tt> if no
+     * visual is specified.
      */
     public Point getOffset();
 
     /**
      * Returns the drop actions supported by this drag source.
-     *
-     * @return
-     * A bitfield of the supported drop actions.
+     * 
+     * @return A bitfield of the supported drop actions.
      */
     public int getSupportedDropActions();
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DropAction.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DropAction.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DropAction.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DropAction.java Fri Oct  4 23:45:40 2013
@@ -20,9 +20,7 @@ package org.apache.pivot.wtk;
  * Enumeration defining supported drop actions.
  */
 public enum DropAction {
-    COPY,
-    MOVE,
-    LINK;
+    COPY, MOVE, LINK;
 
     public int getMask() {
         return 1 << ordinal();

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/DropTarget.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/DropTarget.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/DropTarget.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/DropTarget.java Fri Oct  4 23:45:40 2013
@@ -21,78 +21,69 @@ package org.apache.pivot.wtk;
  */
 public interface DropTarget {
     /**
-     * Called when the mouse first enters a drop target during a drag
-     * operation.
-     *
+     * Called when the mouse first enters a drop target during a drag operation.
+     * 
      * @param component
      * @param dragContent
      * @param supportedDropActions
      * @param userDropAction
-     *
-     * @return
-     * The drop action that would result if the user dropped the item at this
-     * location, or <tt>null</tt> if the target cannot accept the drop.
+     * @return The drop action that would result if the user dropped the item at
+     * this location, or <tt>null</tt> if the target cannot accept the drop.
      */
     public DropAction dragEnter(Component component, Manifest dragContent,
         int supportedDropActions, DropAction userDropAction);
 
     /**
      * Called when the mouse leaves a drop target during a drag operation.
-     *
+     * 
      * @param component
      */
     public void dragExit(Component component);
 
     /**
-     * Called when the mouse is moved while positioned over a drop target
-     * during a drag operation.
-     *
+     * Called when the mouse is moved while positioned over a drop target during
+     * a drag operation.
+     * 
      * @param component
      * @param dragContent
      * @param supportedDropActions
      * @param x
      * @param y
      * @param userDropAction
-     *
-     * @return
-     * The drop action that would result if the user dropped the item at this
-     * location, or <tt>null</tt> if the target cannot accept the drop.
+     * @return The drop action that would result if the user dropped the item at
+     * this location, or <tt>null</tt> if the target cannot accept the drop.
      */
-    public DropAction dragMove(Component component, Manifest dragContent,
-        int supportedDropActions, int x, int y, DropAction userDropAction);
+    public DropAction dragMove(Component component, Manifest dragContent, int supportedDropActions,
+        int x, int y, DropAction userDropAction);
 
     /**
      * Called when the user drop action changes while the mouse is positioned
      * over a drop target during a drag operation.
-     *
+     * 
      * @param component
      * @param dragContent
      * @param supportedDropActions
      * @param x
      * @param y
      * @param userDropAction
-     *
-     * @return
-     * The drop action that would result if the user dropped the item at this
-     * location, or <tt>null</tt> if the target cannot accept the drop.
+     * @return The drop action that would result if the user dropped the item at
+     * this location, or <tt>null</tt> if the target cannot accept the drop.
      */
     public DropAction userDropActionChange(Component component, Manifest dragContent,
         int supportedDropActions, int x, int y, DropAction userDropAction);
 
     /**
      * Called to drop the drag content.
-     *
+     * 
      * @param component
      * @param dragContent
      * @param supportedDropActions
      * @param x
      * @param y
      * @param userDropAction
-     *
-     * @return
-     * The drop action used to perform the drop, or <tt>null</tt> if the target
-     * rejected the drop.
+     * @return The drop action used to perform the drop, or <tt>null</tt> if the
+     * target rejected the drop.
      */
-    public DropAction drop(Component component, Manifest dragContent,
-        int supportedDropActions, int x, int y, DropAction userDropAction);
+    public DropAction drop(Component component, Manifest dragContent, int supportedDropActions,
+        int x, int y, DropAction userDropAction);
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Editor.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Editor.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Editor.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Editor.java Fri Oct  4 23:45:40 2013
@@ -29,9 +29,9 @@ public interface Editor {
      * Saves an edit that is in progress by updating the appropriate data
      * object. It is up to implementations to define the behavior when
      * <tt>isEditing() == false</tt>.
-     *
-     * @return
-     * <tt>true</tt> if the changes were successfully saved; <tt>false</tt> otherwise.
+     * 
+     * @return <tt>true</tt> if the changes were successfully saved;
+     * <tt>false</tt> otherwise.
      */
     public boolean saveChanges();
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Expander.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Expander.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Expander.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Expander.java Fri Oct  4 23:45:40 2013
@@ -27,8 +27,8 @@ import org.apache.pivot.util.Vote;
  */
 @DefaultProperty("content")
 public class Expander extends Container {
-    private static class ExpanderListenerList extends WTKListenerList<ExpanderListener>
-    implements ExpanderListener {
+    private static class ExpanderListenerList extends WTKListenerList<ExpanderListener> implements
+        ExpanderListener {
         @Override
         public void titleChanged(Expander expander, String previousTitle) {
             for (ExpanderListener listener : this) {
@@ -89,9 +89,8 @@ public class Expander extends Container 
 
     /**
      * Returns the expander's title.
-     *
-     * @return
-     * The pane's title, or <tt>null</tt> if no title is set.
+     * 
+     * @return The pane's title, or <tt>null</tt> if no title is set.
      */
     public String getTitle() {
         return title;
@@ -99,9 +98,8 @@ public class Expander extends Container 
 
     /**
      * Sets the expander's title.
-     *
-     * @param title
-     * The new title, or <tt>null</tt> for no title.
+     * 
+     * @param title The new title, or <tt>null</tt> for no title.
      */
     public void setTitle(String title) {
         String previousTitle = this.title;
@@ -114,9 +112,8 @@ public class Expander extends Container 
 
     /**
      * Returns the expander's collapsible flag.
-     *
-     * @return
-     * The collapsible flag
+     * 
+     * @return The collapsible flag
      */
     public boolean isCollapsible() {
         return collapsible;
@@ -124,14 +121,12 @@ public class Expander extends Container 
 
     /**
      * Sets the expander's collapsible flag.
-     *
-     * @param collapsible
-     * The collapsible flag
+     * 
+     * @param collapsible The collapsible flag
      */
     public void setCollapsible(boolean collapsible) {
         if (collapsible != this.collapsible) {
-            if (!collapsible
-                && !expanded) {
+            if (!collapsible && !expanded) {
                 throw new IllegalStateException();
             }
 
@@ -146,8 +141,7 @@ public class Expander extends Container 
 
     public void setExpanded(boolean expanded) {
         if (expanded != this.expanded) {
-            if (!collapsible
-                && !expanded) {
+            if (!collapsible && !expanded) {
                 throw new IllegalStateException();
             }
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ExpanderListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ExpanderListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ExpanderListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ExpanderListener.java Fri Oct  4 23:45:40 2013
@@ -59,7 +59,7 @@ public interface ExpanderListener {
 
     /**
      * Called when an expander's title has changed.
-     *
+     * 
      * @param expander
      * @param previousTitle
      */
@@ -67,21 +67,21 @@ public interface ExpanderListener {
 
     /**
      * Called when an expander's collapsible flag has changed.
-     *
+     * 
      * @param expander
      */
     public void collapsibleChanged(Expander expander);
 
     /**
      * Called to preview an expanded change event.
-     *
+     * 
      * @param expander
      */
     public Vote previewExpandedChange(Expander expander);
 
     /**
      * Called when an expanded change event has been vetoed.
-     *
+     * 
      * @param expander
      * @param reason
      */
@@ -89,14 +89,14 @@ public interface ExpanderListener {
 
     /**
      * Called when an expander's expanded state has changed.
-     *
+     * 
      * @param expander
      */
     public void expandedChanged(Expander expander);
 
     /**
      * Called when an expander's content component has changed.
-     *
+     * 
      * @param expander
      * @param previousContent
      */

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowser.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowser.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowser.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowser.java Fri Oct  4 23:45:40 2013
@@ -93,21 +93,18 @@ public class FileBrowser extends Contain
     private FileBrowserListenerList fileBrowserListeners = new FileBrowserListenerList();
 
     /**
-     * Creates a new FileBrowser
-     * <p>
-     * Note that this version set by default mode to open.
+     * Creates a new FileBrowser <p> Note that this version set by default mode
+     * to open.
      */
     public FileBrowser() {
         this(USER_HOME);
     }
 
     /**
-     * Creates a new FileBrowser
-     * <p>
-     * Note that this version of the constructor must be used when a custom root folder has to be set.
-     *
-     * @param rootFolder
-     * The root folder full name.
+     * Creates a new FileBrowser <p> Note that this version of the constructor
+     * must be used when a custom root folder has to be set.
+     * 
+     * @param rootFolder The root folder full name.
      */
     public FileBrowser(String rootFolder) {
         if (rootFolder == null) {
@@ -124,9 +121,8 @@ public class FileBrowser extends Contain
 
     /**
      * Returns the current root directory.
-     *
-     * @return
-     * The current root directory.
+     * 
+     * @return The current root directory.
      */
     public File getRootDirectory() {
         return rootDirectory;
@@ -134,12 +130,11 @@ public class FileBrowser extends Contain
 
     /**
      * Sets the root directory. Clears any existing file selection.
-     *
+     * 
      * @param rootDirectory
      */
     public void setRootDirectory(File rootDirectory) {
-        if (rootDirectory == null
-            || !rootDirectory.isDirectory()) {
+        if (rootDirectory == null || !rootDirectory.isDirectory()) {
             throw new IllegalArgumentException();
         }
 
@@ -158,12 +153,10 @@ public class FileBrowser extends Contain
 
     /**
      * Adds a file to the file selection.
-     *
+     * 
      * @param file
-     *
-     * @return
-     * <tt>true</tt> if the file was added; <tt>false</tt> if it was already
-     * selected.
+     * @return <tt>true</tt> if the file was added; <tt>false</tt> if it was
+     * already selected.
      */
     public boolean addSelectedFile(final File file) {
         if (file == null) {
@@ -189,12 +182,10 @@ public class FileBrowser extends Contain
 
     /**
      * Removes a file from the file selection.
-     *
+     * 
      * @param file
-     *
-     * @return
-     * <tt>true</tt> if the file was removed; <tt>false</tt> if it was not
-     * already selected.
+     * @return <tt>true</tt> if the file was removed; <tt>false</tt> if it was
+     * not already selected.
      */
     public boolean removeSelectedFile(File file) {
         if (file == null) {
@@ -211,9 +202,8 @@ public class FileBrowser extends Contain
 
     /**
      * When in single-select mode, returns the currently selected file.
-     *
-     * @return
-     * The currently selected file.
+     * 
+     * @return The currently selected file.
      */
     public File getSelectedFile() {
         if (multiSelect) {
@@ -225,7 +215,7 @@ public class FileBrowser extends Contain
 
     /**
      * Sets the selection to a single file.
-     *
+     * 
      * @param file
      */
     public void setSelectedFile(File file) {
@@ -242,11 +232,11 @@ public class FileBrowser extends Contain
 
     /**
      * Returns the currently selected files.
-     *
-     * @return
-     * An immutable list containing the currently selected files. Note that the returned
-     * list is a wrapper around the actual selection, not a copy. Any changes made to the
-     * selection state will be reflected in the list, but events will not be fired.
+     * 
+     * @return An immutable list containing the currently selected files. Note
+     * that the returned list is a wrapper around the actual selection, not a
+     * copy. Any changes made to the selection state will be reflected in the
+     * list, but events will not be fired.
      */
     public ImmutableList<File> getSelectedFiles() {
         return new ImmutableList<>(selectedFiles);
@@ -254,20 +244,16 @@ public class FileBrowser extends Contain
 
     /**
      * Sets the selected files.
-     *
-     * @param selectedFiles
-     * The files to select.
-     *
-     * @return
-     * The files that were selected, with duplicates eliminated.
+     * 
+     * @param selectedFiles The files to select.
+     * @return The files that were selected, with duplicates eliminated.
      */
     public Sequence<File> setSelectedFiles(Sequence<File> selectedFiles) {
         if (selectedFiles == null) {
             throw new IllegalArgumentException("selectedFiles is null.");
         }
 
-        if (!multiSelect
-            && selectedFiles.getLength() > 1) {
+        if (!multiSelect && selectedFiles.getLength() > 1) {
             throw new IllegalArgumentException("Multi-select is not enabled.");
         }
 
@@ -321,9 +307,9 @@ public class FileBrowser extends Contain
 
     /**
      * Sets the file browser's multi-select state.
-     *
-     * @param multiSelect
-     * <tt>true</tt> if multi-select is enabled; <tt>false</tt>, otherwise.
+     * 
+     * @param multiSelect <tt>true</tt> if multi-select is enabled;
+     * <tt>false</tt>, otherwise.
      */
     public void setMultiSelect(boolean multiSelect) {
         if (this.multiSelect != multiSelect) {
@@ -338,9 +324,8 @@ public class FileBrowser extends Contain
 
     /**
      * Returns the current file filter.
-     *
-     * @return
-     * The current file filter, or <tt>null</tt> if no filter is set.
+     * 
+     * @return The current file filter, or <tt>null</tt> if no filter is set.
      */
     public Filter<File> getDisabledFileFilter() {
         return disabledFileFilter;
@@ -348,9 +333,9 @@ public class FileBrowser extends Contain
 
     /**
      * Sets the file filter.
-     *
-     * @param disabledFileFilter
-     * The file filter to use, or <tt>null</tt> for no filter.
+     * 
+     * @param disabledFileFilter The file filter to use, or <tt>null</tt> for no
+     * filter.
      */
     public void setDisabledFileFilter(Filter<File> disabledFileFilter) {
         Filter<File> previousDisabledFileFilter = this.disabledFileFilter;
@@ -362,7 +347,7 @@ public class FileBrowser extends Contain
     }
 
     public File getFileAt(int x, int y) {
-        FileBrowser.Skin fileBrowserSkin = (FileBrowser.Skin)getSkin();
+        FileBrowser.Skin fileBrowserSkin = (FileBrowser.Skin) getSkin();
         return fileBrowserSkin.getFileAt(x, y);
     }
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserListener.java Fri Oct  4 23:45:40 2013
@@ -64,7 +64,7 @@ public interface FileBrowserListener {
 
     /**
      * Called when a file browser's root directory has changed.
-     *
+     * 
      * @param fileBrowser
      * @param previousRootDirectory
      */
@@ -72,7 +72,7 @@ public interface FileBrowserListener {
 
     /**
      * Called when a file has been added to a file browser's selection.
-     *
+     * 
      * @param fileBrowser
      * @param file
      */
@@ -80,7 +80,7 @@ public interface FileBrowserListener {
 
     /**
      * Called when a file has been removed from a file browser's selection.
-     *
+     * 
      * @param fileBrowser
      * @param file
      */
@@ -88,23 +88,22 @@ public interface FileBrowserListener {
 
     /**
      * Called when a file browser's selection state has been reset.
-     *
+     * 
      * @param fileBrowser
      * @param previousSelectedFiles
      */
-    public void selectedFilesChanged(FileBrowser fileBrowser,
-        Sequence<File> previousSelectedFiles);
+    public void selectedFilesChanged(FileBrowser fileBrowser, Sequence<File> previousSelectedFiles);
 
     /**
      * Called when a file browser's multi-select flag has changed.
-     *
+     * 
      * @param fileBrowser
      */
     public void multiSelectChanged(FileBrowser fileBrowser);
 
     /**
      * Called when a file browser's file filter has changed.
-     *
+     * 
      * @param fileBrowser
      * @param previousDisabledFileFilter
      */

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheet.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheet.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheet.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheet.java Fri Oct  4 23:45:40 2013
@@ -33,17 +33,13 @@ public class FileBrowserSheet extends Sh
      * Enumeration defining supported modes.
      */
     public enum Mode {
-        OPEN,
-        OPEN_MULTIPLE,
-        SAVE_AS,
-        SAVE_TO
+        OPEN, OPEN_MULTIPLE, SAVE_AS, SAVE_TO
     }
 
     private static final String USER_HOME = System.getProperty("user.home");
 
-    private static class FileBrowserSheetListenerList
-        extends WTKListenerList<FileBrowserSheetListener>
-        implements FileBrowserSheetListener {
+    private static class FileBrowserSheetListenerList extends
+        WTKListenerList<FileBrowserSheetListener> implements FileBrowserSheetListener {
         @Override
         public void modeChanged(FileBrowserSheet fileBrowserSheet,
             FileBrowserSheet.Mode previousMode) {
@@ -72,8 +68,7 @@ public class FileBrowserSheet extends Sh
         public void disabledFileFilterChanged(FileBrowserSheet fileBrowserSheet,
             Filter<File> previousDisabledFileFilter) {
             for (FileBrowserSheetListener listener : this) {
-                listener.disabledFileFilterChanged(fileBrowserSheet,
-                    previousDisabledFileFilter);
+                listener.disabledFileFilterChanged(fileBrowserSheet, previousDisabledFileFilter);
             }
         }
     }
@@ -86,21 +81,18 @@ public class FileBrowserSheet extends Sh
     private FileBrowserSheetListenerList fileBrowserSheetListeners = new FileBrowserSheetListenerList();
 
     /**
-     * Creates a new FileBrowserSheet
-     * <p>
-     * Note that this version set by default mode to open and user home as root folder.
+     * Creates a new FileBrowserSheet <p> Note that this version set by default
+     * mode to open and user home as root folder.
      */
     public FileBrowserSheet() {
         this(Mode.OPEN);
     }
 
     /**
-     * Creates a new FileBrowserSheet
-     * <p>
-     * Note that this version set by default the user home as root folder.
-     *
-     * @param mode
-     * The mode for opening the sheet.
+     * Creates a new FileBrowserSheet <p> Note that this version set by default
+     * the user home as root folder.
+     * 
+     * @param mode The mode for opening the sheet.
      * @see Mode
      */
     public FileBrowserSheet(Mode mode) {
@@ -108,29 +100,23 @@ public class FileBrowserSheet extends Sh
     }
 
     /**
-     * Creates a new FileBrowserSheet
-     * <p>
-     * Note that this version of the constructor can be used when a custom root folder has to be set,
-     * and uses the default mode.
-     *
-     * @param rootFolder
-     * The root folder full name.
+     * Creates a new FileBrowserSheet <p> Note that this version of the
+     * constructor can be used when a custom root folder has to be set, and uses
+     * the default mode.
+     * 
+     * @param rootFolder The root folder full name.
      */
     public FileBrowserSheet(String rootFolder) {
         this(Mode.OPEN, rootFolder);
     }
 
     /**
-     * Creates a new FileBrowserSheet
-     * <p>
-     * Note that this version of the constructor must be used when a custom root folder has to be set.
-     *
-     * @param mode
-     * The mode for opening the sheet.
+     * Creates a new FileBrowserSheet <p> Note that this version of the
+     * constructor must be used when a custom root folder has to be set.
+     * 
+     * @param mode The mode for opening the sheet.
      * @see Mode
-     *
-     * @param rootFolder
-     * The root folder full name.
+     * @param rootFolder The root folder full name.
      */
     public FileBrowserSheet(Mode mode, String rootFolder) {
         if (mode == null) {
@@ -180,8 +166,7 @@ public class FileBrowserSheet extends Sh
             // Give some grace here to allow setting the root directory
             // to a regular file and have it work (by using its parent)
             rootDirectory = rootDirectory.getParentFile();
-            if (rootDirectory == null
-                || !rootDirectory.isDirectory()) {
+            if (rootDirectory == null || !rootDirectory.isDirectory()) {
                 throw new IllegalArgumentException("Root folder is not a directory.");
             }
         }
@@ -197,8 +182,7 @@ public class FileBrowserSheet extends Sh
             // Give some grace here to allow setting the root directory
             // to a regular file and have it work (by using its parent)
             rootDirectory = rootDirectory.getParentFile();
-            if (rootDirectory == null
-                || !rootDirectory.isDirectory()) {
+            if (rootDirectory == null || !rootDirectory.isDirectory()) {
                 throw new IllegalArgumentException("Root directory is not a directory.");
             }
         }
@@ -218,9 +202,8 @@ public class FileBrowserSheet extends Sh
 
     /**
      * When in single-select mode, returns the currently selected file.
-     *
-     * @return
-     * The currently selected file.
+     * 
+     * @return The currently selected file.
      */
     public File getSelectedFile() {
         if (mode == Mode.OPEN_MULTIPLE) {
@@ -232,7 +215,7 @@ public class FileBrowserSheet extends Sh
 
     /**
      * Sets the selection to a single file.
-     *
+     * 
      * @param file
      */
     public void setSelectedFile(File file) {
@@ -249,11 +232,11 @@ public class FileBrowserSheet extends Sh
 
     /**
      * Returns the currently selected files.
-     *
-     * @return
-     * An immutable list containing the currently selected files. Note that the returned
-     * list is a wrapper around the actual selection, not a copy. Any changes made to the
-     * selection state will be reflected in the list, but events will not be fired.
+     * 
+     * @return An immutable list containing the currently selected files. Note
+     * that the returned list is a wrapper around the actual selection, not a
+     * copy. Any changes made to the selection state will be reflected in the
+     * list, but events will not be fired.
      */
     public ImmutableList<File> getSelectedFiles() {
         return new ImmutableList<>(selectedFiles);
@@ -261,20 +244,16 @@ public class FileBrowserSheet extends Sh
 
     /**
      * Sets the selected files.
-     *
-     * @param selectedFiles
-     * The files to select.
-     *
-     * @return
-     * The files that were selected, with duplicates eliminated.
+     * 
+     * @param selectedFiles The files to select.
+     * @return The files that were selected, with duplicates eliminated.
      */
     public Sequence<File> setSelectedFiles(Sequence<File> selectedFiles) {
         if (selectedFiles == null) {
             throw new IllegalArgumentException("selectedFiles is null.");
         }
 
-        if (mode != Mode.OPEN_MULTIPLE
-            && selectedFiles.getLength() > 1) {
+        if (mode != Mode.OPEN_MULTIPLE && selectedFiles.getLength() > 1) {
             throw new IllegalArgumentException("Multi-select is not enabled.");
         }
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheetListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheetListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheetListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/FileBrowserSheetListener.java Fri Oct  4 23:45:40 2013
@@ -56,7 +56,7 @@ public interface FileBrowserSheetListene
 
     /**
      * Called when a file browser sheet's mode has changed.
-     *
+     * 
      * @param fileBrowserSheet
      * @param previousMode
      */
@@ -64,16 +64,15 @@ public interface FileBrowserSheetListene
 
     /**
      * Called when a file browser sheet's root directory has changed.
-     *
+     * 
      * @param fileBrowserSheet
      * @param previousRootDirectory
      */
-    public void rootDirectoryChanged(FileBrowserSheet fileBrowserSheet,
-        File previousRootDirectory);
+    public void rootDirectoryChanged(FileBrowserSheet fileBrowserSheet, File previousRootDirectory);
 
     /**
      * Called when a file browser sheet's selection state has been reset.
-     *
+     * 
      * @param fileBrowserSheet
      * @param previousSelectedFiles
      */
@@ -82,7 +81,7 @@ public interface FileBrowserSheetListene
 
     /**
      * Called when a file browser sheet's disabled file filter has changed.
-     *
+     * 
      * @param fileBrowserSheet
      * @param previousDisabledFileFilter
      */