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 [19/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-terra/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java Fri Oct  4 23:45:40 2013
@@ -46,8 +46,8 @@ import org.apache.pivot.wtk.skin.Contain
 /**
  * Spinner skin.
  */
-public class TerraSpinnerSkin extends ContainerSkin implements Spinner.Skin,
-    SpinnerListener, SpinnerSelectionListener {
+public class TerraSpinnerSkin extends ContainerSkin implements Spinner.Skin, SpinnerListener,
+    SpinnerSelectionListener {
     /**
      * Encapsulates the code needed to perform timer-controlled spinning.
      */
@@ -59,20 +59,16 @@ public class TerraSpinnerSkin extends Co
 
         /**
          * Starts spinning the specified spinner.
-         *
-         * @param spinnerArgument
-         * The spinner to spin
-         *
-         * @param directionArgument
-         * <tt>1</tt> to adjust the spinner's selected index larger;
-         * <tt>-1</tt> to adjust it smaller
-         *
-         * @exception IllegalStateException
-         * If automatic spinner of any spinner is already in progress.
-         * Only one spinner may be automatically spun at one time
+         * 
+         * @param spinnerArgument The spinner to spin
+         * @param directionArgument <tt>1</tt> to adjust the spinner's selected
+         * index larger; <tt>-1</tt> to adjust it smaller
+         * @exception IllegalStateException If automatic spinner of any spinner
+         * is already in progress. Only one spinner may be automatically spun at
+         * one time
          */
         public void start(Spinner spinnerArgument, int directionArgument) {
-            assert(directionArgument != 0) : "Direction must be positive or negative";
+            assert (directionArgument != 0) : "Direction must be positive or negative";
 
             if (scheduledSpinnerCallback != null) {
                 throw new IllegalStateException("Already running");
@@ -100,7 +96,7 @@ public class TerraSpinnerSkin extends Co
             if (count < 1) {
                 // empty spinner
                 stop();
-                return ;
+                return;
             }
 
             if (direction > 0) {
@@ -151,14 +147,15 @@ public class TerraSpinnerSkin extends Co
         public int getPreferredWidth(int height) {
             int preferredWidth = 0;
 
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
             Spinner.ItemRenderer itemRenderer = spinner.getItemRenderer();
 
             if (sizeToContent) {
                 List<?> spinnerData = spinner.getSpinnerData();
                 for (Object item : spinnerData) {
                     itemRenderer.render(item, spinner);
-                    preferredWidth = Math.max(preferredWidth, itemRenderer.getPreferredWidth(height));
+                    preferredWidth = Math.max(preferredWidth,
+                        itemRenderer.getPreferredWidth(height));
                 }
             } else {
                 itemRenderer.render(spinner.getSelectedItem(), spinner);
@@ -172,7 +169,7 @@ public class TerraSpinnerSkin extends Co
         public int getPreferredHeight(int width) {
             int preferredHeight = 0;
 
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
             Spinner.ItemRenderer itemRenderer = spinner.getItemRenderer();
 
             itemRenderer.render(spinner.getSelectedItem(), spinner);
@@ -183,7 +180,7 @@ public class TerraSpinnerSkin extends Co
 
         @Override
         public int getBaseline(int width, int height) {
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
 
             int baseline = -1;
 
@@ -198,7 +195,7 @@ public class TerraSpinnerSkin extends Co
         public Dimensions getPreferredSize() {
             Dimensions preferredSize;
 
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
             Spinner.ItemRenderer itemRenderer = spinner.getItemRenderer();
 
             if (sizeToContent) {
@@ -218,8 +215,8 @@ public class TerraSpinnerSkin extends Co
 
         @Override
         public void paint(Graphics2D graphics) {
-            SpinnerContent spinnerContentLocal = (SpinnerContent)getComponent();
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            SpinnerContent spinnerContentLocal = (SpinnerContent) getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
 
             int width = getWidth();
             int height = getHeight();
@@ -228,7 +225,7 @@ public class TerraSpinnerSkin extends Co
             Spinner.ItemRenderer itemRenderer = spinner.getItemRenderer();
             itemRenderer.render(spinner.getSelectedItem(), spinner);
 
-            Graphics2D contentGraphics = (Graphics2D)graphics.create();
+            Graphics2D contentGraphics = (Graphics2D) graphics.create();
             itemRenderer.setSize(width, height);
             itemRenderer.paint(contentGraphics);
             contentGraphics.dispose();
@@ -236,7 +233,7 @@ public class TerraSpinnerSkin extends Co
             // Paint the focus state
             if (spinnerContentLocal.isFocused()) {
                 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(borderColor);
@@ -244,8 +241,8 @@ public class TerraSpinnerSkin extends Co
                 graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                     RenderingHints.VALUE_ANTIALIAS_ON);
 
-                graphics.draw(new Rectangle2D.Double(1, 1.5, Math.max(width - 2.5, 0),
-                    Math.max(height - 3, 0)));
+                graphics.draw(new Rectangle2D.Double(1, 1.5, Math.max(width - 2.5, 0), Math.max(
+                    height - 3, 0)));
             }
         }
 
@@ -266,11 +263,10 @@ public class TerraSpinnerSkin extends Co
          * {@link KeyCode#DOWN DOWN} Select the next spinner item.
          */
         @Override
-        public boolean keyPressed(Component component, int keyCode,
-            Keyboard.KeyLocation keyLocation) {
+        public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
             boolean consumed = false;
 
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
 
             boolean circular = spinner.isCircular();
             int count = spinner.getSpinnerData().getLength();
@@ -310,7 +306,7 @@ public class TerraSpinnerSkin extends Co
         public boolean keyTyped(Component component, char character) {
             boolean consumed = super.keyTyped(component, character);
 
-            Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+            Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
             List<?> spinnerData = spinner.getSpinnerData();
             Spinner.ItemRenderer itemRenderer = spinner.getItemRenderer();
 
@@ -319,8 +315,7 @@ public class TerraSpinnerSkin extends Co
             for (int i = spinner.getSelectedIndex() + 1, n = spinnerData.getLength(); i < n; i++) {
                 String string = itemRenderer.toString(spinnerData.get(i));
 
-                if (string != null
-                    && string.length() > 0) {
+                if (string != null && string.length() > 0) {
                     char first = Character.toUpperCase(string.charAt(0));
 
                     if (first == characterUpper) {
@@ -383,7 +378,7 @@ public class TerraSpinnerSkin extends Co
         @Override
         public void paint(Graphics2D graphics) {
             // Apply spinner styles to the button
-            SpinButton spinButton = (SpinButton)getComponent();
+            SpinButton spinButton = (SpinButton) getComponent();
 
             int width = getWidth();
             int height = getHeight();
@@ -394,9 +389,8 @@ public class TerraSpinnerSkin extends Co
             graphics.fillRect(0, 0, width, height);
 
             // Paint the image
-            SpinButtonImage buttonImage = (SpinButtonImage)spinButton.getButtonImage();
-            graphics.translate((width - BUTTON_IMAGE_SIZE) / 2,
-                (height - BUTTON_IMAGE_SIZE) / 2);
+            SpinButtonImage buttonImage = (SpinButtonImage) spinButton.getButtonImage();
+            graphics.translate((width - BUTTON_IMAGE_SIZE) / 2, (height - BUTTON_IMAGE_SIZE) / 2);
             buttonImage.paint(graphics);
         }
 
@@ -445,8 +439,8 @@ public class TerraSpinnerSkin extends Co
             boolean consumed = super.mouseDown(component, button, x, y);
 
             if (button == Mouse.Button.LEFT) {
-                SpinButton spinButton = (SpinButton)getComponent();
-                Spinner spinner = (Spinner)TerraSpinnerSkin.this.getComponent();
+                SpinButton spinButton = (SpinButton) getComponent();
+                Spinner spinner = (Spinner) TerraSpinnerSkin.this.getComponent();
 
                 // Start the automatic spinner. It'll be stopped when we
                 // mouse up or mouse out
@@ -500,8 +494,8 @@ public class TerraSpinnerSkin extends Co
         public void paint(Graphics2D graphics) {
             super.paint(graphics);
 
-            int[] xPoints = {0, 2, 4};
-            int[] yPoints = {3, 1, 3};
+            int[] xPoints = { 0, 2, 4 };
+            int[] yPoints = { 3, 1, 3 };
             graphics.fillPolygon(xPoints, yPoints, 3);
             graphics.drawPolygon(xPoints, yPoints, 3);
         }
@@ -512,8 +506,8 @@ public class TerraSpinnerSkin extends Co
         public void paint(Graphics2D graphics) {
             super.paint(graphics);
 
-            int[] xPoints = {0, 2, 4};
-            int[] yPoints = {1, 3, 1};
+            int[] xPoints = { 0, 2, 4 };
+            int[] yPoints = { 1, 3, 1 };
             graphics.fillPolygon(xPoints, yPoints, 3);
             graphics.drawPolygon(xPoints, yPoints, 3);
         }
@@ -539,7 +533,7 @@ public class TerraSpinnerSkin extends Co
     public static final int BUTTON_IMAGE_SIZE = 5;
 
     public TerraSpinnerSkin() {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setBackgroundColor(theme.getColor(4));
 
         font = theme.getFont();
@@ -559,8 +553,7 @@ public class TerraSpinnerSkin extends Co
 
         super.setSize(width, height);
 
-        if (previousWidth != width
-            || previousHeight != height) {
+        if (previousWidth != width || previousHeight != height) {
             automaticSpinner.stop();
         }
     }
@@ -569,7 +562,7 @@ public class TerraSpinnerSkin extends Co
     public void install(Component component) {
         super.install(component);
 
-        Spinner spinner = (Spinner)component;
+        Spinner spinner = (Spinner) component;
         spinner.getSpinnerListeners().add(this);
         spinner.getSpinnerSelectionListeners().add(this);
 
@@ -610,19 +603,16 @@ public class TerraSpinnerSkin extends Co
         Dimensions upButtonPreferredSize = upButton.getPreferredSize();
         Dimensions downButtonPreferredSize = downButton.getPreferredSize();
 
-        int preferredHeight = Math.max(upButtonPreferredSize.height,
-            downButtonPreferredSize.height) * 2;
+        int preferredHeight = Math.max(upButtonPreferredSize.height, downButtonPreferredSize.height) * 2;
 
         if (width >= 0) {
             // Subtract the button and border width from width constraint
-            int buttonWidth = Math.max(upButtonPreferredSize.width,
-                downButtonPreferredSize.width);
+            int buttonWidth = Math.max(upButtonPreferredSize.width, downButtonPreferredSize.width);
 
             width = Math.max(width - buttonWidth - 2, 0);
         }
 
-        preferredHeight = Math.max(preferredHeight,
-            spinnerContent.getPreferredHeight(width)) + 1;
+        preferredHeight = Math.max(preferredHeight, spinnerContent.getPreferredHeight(width)) + 1;
 
         return preferredHeight;
     }
@@ -631,8 +621,7 @@ public class TerraSpinnerSkin extends Co
     public int getBaseline(int width, int height) {
         Dimensions upButtonPreferredSize = upButton.getPreferredSize();
         Dimensions downButtonPreferredSize = downButton.getPreferredSize();
-        int buttonWidth = Math.max(upButtonPreferredSize.width,
-            downButtonPreferredSize.width);
+        int buttonWidth = Math.max(upButtonPreferredSize.width, downButtonPreferredSize.width);
 
         int clientWidth = Math.max(width - buttonWidth - 2, 0);
         int clientHeight = Math.max(height - 2, 0);
@@ -676,14 +665,14 @@ public class TerraSpinnerSkin extends Co
         int buttonWidth = upButton.getWidth();
         int buttonHeight = upButton.getHeight();
 
-        graphics.setPaint(new GradientPaint(buttonX + buttonWidth / 2, 0, buttonBevelColor,
-            buttonX + buttonWidth / 2, buttonHeight, buttonBackgroundColor));
+        graphics.setPaint(new GradientPaint(buttonX + buttonWidth / 2, 0, buttonBevelColor, buttonX
+            + buttonWidth / 2, buttonHeight, buttonBackgroundColor));
         graphics.fillRect(buttonX, 0, buttonWidth, height);
 
         graphics.setPaint(borderColor);
         GraphicsUtilities.drawRect(graphics, 0, 0, width, height);
-        GraphicsUtilities.drawLine(graphics, width - buttonWidth - 2, 0,
-            height, Orientation.VERTICAL);
+        GraphicsUtilities.drawLine(graphics, width - buttonWidth - 2, 0, height,
+            Orientation.VERTICAL);
         GraphicsUtilities.drawLine(graphics, width - buttonWidth - 2, buttonHeight + 1,
             buttonWidth + 1, Orientation.HORIZONTAL);
     }
@@ -859,8 +848,7 @@ public class TerraSpinnerSkin extends Co
     }
 
     @Override
-    public void itemRendererChanged(Spinner spinner,
-        Spinner.ItemRenderer previousItemRenderer) {
+    public void itemRendererChanged(Spinner spinner, Spinner.ItemRenderer previousItemRenderer) {
         invalidateContent();
     }
 

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSplitPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSplitPaneSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSplitPaneSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSplitPaneSkin.java Fri Oct  4 23:45:40 2013
@@ -81,7 +81,7 @@ public class TerraSplitPaneSkin extends 
 
         @Override
         public void paint(Graphics2D graphics) {
-            SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
+            SplitPane splitPane = (SplitPane) TerraSplitPaneSkin.this.getComponent();
 
             Orientation orientation = splitPane.getOrientation();
 
@@ -97,8 +97,7 @@ public class TerraSplitPaneSkin extends 
                 imageHeight = height - 4;
             }
 
-            if (imageWidth > 0
-                && imageHeight > 0) {
+            if (imageWidth > 0 && imageHeight > 0) {
                 int translateX = (width - imageWidth) / 2;
                 int translateY = (height - imageHeight) / 2;
                 graphics.translate(translateX, translateY);
@@ -139,7 +138,7 @@ public class TerraSplitPaneSkin extends 
             boolean consumed = super.mouseMove(component, x, y);
 
             if (Mouse.getCapturer() == component) {
-                SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
+                SplitPane splitPane = (SplitPane) TerraSplitPaneSkin.this.getComponent();
                 Orientation orientation = splitPane.getOrientation();
 
                 // Calculate the would-be new split location
@@ -147,10 +146,10 @@ public class TerraSplitPaneSkin extends 
                 float splitRatio;
                 if (orientation == Orientation.HORIZONTAL) {
                     splitLocation = limitSplitLocation(component.getX() + x - dragOffset);
-                    splitRatio = (float)splitLocation / splitPane.getWidth();
+                    splitRatio = (float) splitLocation / splitPane.getWidth();
                 } else {
                     splitLocation = limitSplitLocation(component.getY() + y - dragOffset);
-                    splitRatio = (float)splitLocation / splitPane.getHeight();
+                    splitRatio = (float) splitLocation / splitPane.getHeight();
                 }
 
                 if (shadow == null) {
@@ -173,10 +172,9 @@ public class TerraSplitPaneSkin extends 
         public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
             boolean consumed = super.mouseDown(component, button, x, y);
 
-            SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
+            SplitPane splitPane = (SplitPane) TerraSplitPaneSkin.this.getComponent();
 
-            if (button == Mouse.Button.LEFT
-                && !splitPane.isLocked()) {
+            if (button == Mouse.Button.LEFT && !splitPane.isLocked()) {
                 Orientation orientation = splitPane.getOrientation();
 
                 if (useShadow) {
@@ -205,20 +203,19 @@ public class TerraSplitPaneSkin extends 
         public boolean mouseUp(Component component, Mouse.Button button, int x, int y) {
             boolean consumed = super.mouseUp(component, button, x, y);
 
-            if (button == Mouse.Button.LEFT
-                && Mouse.getCapturer() == component) {
+            if (button == Mouse.Button.LEFT && Mouse.getCapturer() == component) {
                 if (shadow != null) {
-                    SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
+                    SplitPane splitPane = (SplitPane) TerraSplitPaneSkin.this.getComponent();
 
                     // Update the split location and remove the shadow
                     int splitLocation;
                     float splitRatio;
                     if (splitPane.getOrientation() == Orientation.HORIZONTAL) {
                         splitLocation = shadow.getX();
-                        splitRatio = (float)splitLocation / splitPane.getWidth();
+                        splitRatio = (float) splitLocation / splitPane.getWidth();
                     } else {
                         splitLocation = shadow.getY();
-                        splitRatio = (float)splitLocation / splitPane.getHeight();
+                        splitRatio = (float) splitLocation / splitPane.getHeight();
                     }
 
                     splitPane.setSplitRatio(splitRatio);
@@ -281,7 +278,7 @@ public class TerraSplitPaneSkin extends 
     private boolean useShadow;
 
     public TerraSplitPaneSkin() {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         splitterHandlePrimaryColor = theme.getColor(9);
         splitterHandleSecondaryColor = theme.getColor(10);
         splitterThickness = 6;
@@ -292,7 +289,7 @@ public class TerraSplitPaneSkin extends 
     public void install(Component component) {
         super.install(component);
 
-        SplitPane splitPane = (SplitPane)component;
+        SplitPane splitPane = (SplitPane) component;
         splitPane.getSplitPaneListeners().add(this);
 
         splitPane.add(splitter);
@@ -306,33 +303,32 @@ public class TerraSplitPaneSkin extends 
 
         super.setSize(width, height);
 
-        SplitPane splitPane = (SplitPane)getComponent();
+        SplitPane splitPane = (SplitPane) getComponent();
         Orientation orientation = splitPane.getOrientation();
 
         if (splitPane.getResizeMode() == SplitPane.ResizeMode.PRIMARY_REGION
-            && ((previousWidth != width && orientation == Orientation.HORIZONTAL)
-            || (previousHeight != height && orientation == Orientation.VERTICAL))) {
+            && ((previousWidth != width && orientation == Orientation.HORIZONTAL) || (previousHeight != height && orientation == Orientation.VERTICAL))) {
             SplitPane.Region primaryRegion = splitPane.getPrimaryRegion();
             float splitRatio = splitPane.getSplitRatio();
 
             if (orientation == Orientation.HORIZONTAL) {
-                int splitLocation = (int)(splitRatio * previousWidth);
+                int splitLocation = (int) (splitRatio * previousWidth);
 
                 if (primaryRegion == SplitPane.Region.BOTTOM_RIGHT) {
                     // Move the split location to maintain size on the right
                     splitLocation += (width - previousWidth);
                 }
 
-                splitRatio = (float)limitSplitLocation(splitLocation) / width;
+                splitRatio = (float) limitSplitLocation(splitLocation) / width;
             } else {
-                int splitLocation = (int)(splitRatio * previousHeight);
+                int splitLocation = (int) (splitRatio * previousHeight);
 
                 if (primaryRegion == SplitPane.Region.BOTTOM_RIGHT) {
                     // Move the split location to maintain size on the bottom
                     splitLocation += (height - previousHeight);
                 }
 
-                splitRatio = (float)limitSplitLocation(splitLocation) / height;
+                splitRatio = (float) limitSplitLocation(splitLocation) / height;
             }
 
             splitPane.setSplitRatio(splitRatio);
@@ -359,14 +355,14 @@ public class TerraSplitPaneSkin extends 
         int width = getWidth();
         int height = getHeight();
 
-        SplitPane splitPane = (SplitPane)getComponent();
+        SplitPane splitPane = (SplitPane) getComponent();
 
         float splitRatio = splitPane.getSplitRatio();
         Component topLeft = splitPane.getTopLeft();
         Component bottomRight = splitPane.getBottomRight();
 
         if (splitPane.getOrientation() == Orientation.HORIZONTAL) {
-            int splitLocation = limitSplitLocation((int)(splitRatio * width));
+            int splitLocation = limitSplitLocation((int) (splitRatio * width));
             int rightStart = splitLocation + splitterThickness;
             splitter.setLocation(splitLocation, 0);
             splitter.setSize(splitterThickness, height);
@@ -381,7 +377,7 @@ public class TerraSplitPaneSkin extends 
                 bottomRight.setSize(Math.max(width - rightStart, 0), height);
             }
         } else {
-            int splitLocation = limitSplitLocation((int)(splitRatio * height));
+            int splitLocation = limitSplitLocation((int) (splitRatio * height));
             int bottomStart = splitLocation + splitterThickness;
             splitter.setLocation(0, splitLocation);
             splitter.setSize(width, splitterThickness);
@@ -420,7 +416,7 @@ public class TerraSplitPaneSkin extends 
     }
 
     public final void setSplitterHandlePrimaryColor(int splitterHandlePrimaryColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setSplitterHandlePrimaryColor(theme.getColor(splitterHandlePrimaryColor));
     }
 
@@ -446,7 +442,7 @@ public class TerraSplitPaneSkin extends 
     }
 
     public final void setSplitterHandleSecondaryColor(int splitterHandleSecondaryColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setSplitterHandleSecondaryColor(theme.getColor(splitterHandleSecondaryColor));
     }
 
@@ -468,7 +464,8 @@ public class TerraSplitPaneSkin extends 
 
     public void setUseShadow(boolean useShadow) {
         if (Mouse.getCapturer() == getComponent()) {
-            throw new IllegalStateException("Cannot set useShadow while the splitter is being dragged.");
+            throw new IllegalStateException(
+                "Cannot set useShadow while the splitter is being dragged.");
         }
 
         this.useShadow = useShadow;
@@ -512,7 +509,7 @@ public class TerraSplitPaneSkin extends 
 
     private void updateSplitterCursor() {
         Cursor cursor = Cursor.DEFAULT;
-        SplitPane splitPane = (SplitPane)getComponent();
+        SplitPane splitPane = (SplitPane) getComponent();
 
         if (!splitPane.isLocked()) {
             switch (splitPane.getOrientation()) {
@@ -562,7 +559,7 @@ public class TerraSplitPaneSkin extends 
     }
 
     private int limitSplitLocation(int splitLocation) {
-        SplitPane splitPane = (SplitPane)getComponent();
+        SplitPane splitPane = (SplitPane) getComponent();
 
         Component topLeft = splitPane.getTopLeft();
         Component bottomRight = splitPane.getBottomRight();
@@ -573,7 +570,7 @@ public class TerraSplitPaneSkin extends 
             lower = 0;
             upper = Math.max(getWidth() - splitterThickness, 0);
 
-            if (topLeft  != null) {
+            if (topLeft != null) {
                 int leftLimit = topLeft.getMinimumWidth();
                 if (leftLimit >= 0) {
                     lower = Math.min(leftLimit, upper);
@@ -590,7 +587,7 @@ public class TerraSplitPaneSkin extends 
             lower = 0;
             upper = Math.max(getHeight() - splitterThickness, 0);
 
-            if (topLeft  != null) {
+            if (topLeft != null) {
                 int topLimit = topLeft.getMinimumHeight();
                 if (topLimit >= 0) {
                     lower = Math.min(topLimit, upper);

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java Fri Oct  4 23:45:40 2013
@@ -32,6 +32,8 @@ import org.apache.pivot.wtk.Display;
 import org.apache.pivot.wtk.FocusTraversalDirection;
 import org.apache.pivot.wtk.GraphicsUtilities;
 import org.apache.pivot.wtk.Keyboard;
+import org.apache.pivot.wtk.Keyboard.KeyCode;
+import org.apache.pivot.wtk.Keyboard.Modifier;
 import org.apache.pivot.wtk.ListView;
 import org.apache.pivot.wtk.ListViewSelectionListener;
 import org.apache.pivot.wtk.Mouse;
@@ -44,8 +46,6 @@ import org.apache.pivot.wtk.SuggestionPo
 import org.apache.pivot.wtk.TextInput;
 import org.apache.pivot.wtk.Theme;
 import org.apache.pivot.wtk.Window;
-import org.apache.pivot.wtk.Keyboard.KeyCode;
-import org.apache.pivot.wtk.Keyboard.Modifier;
 import org.apache.pivot.wtk.effects.DropShadowDecorator;
 import org.apache.pivot.wtk.effects.Transition;
 import org.apache.pivot.wtk.effects.TransitionListener;
@@ -54,8 +54,8 @@ import org.apache.pivot.wtk.skin.WindowS
 /**
  * Terra suggestion popup skin.
  */
-public class TerraSuggestionPopupSkin extends WindowSkin
-    implements SuggestionPopupListener, SuggestionPopupSelectionListener, SuggestionPopupStateListener {
+public class TerraSuggestionPopupSkin extends WindowSkin implements SuggestionPopupListener,
+    SuggestionPopupSelectionListener, SuggestionPopupStateListener {
     private Panorama listViewPanorama;
     private Border listViewBorder;
 
@@ -71,14 +71,13 @@ public class TerraSuggestionPopupSkin ex
     private ContainerMouseListener displayMouseListener = new ContainerMouseListener.Adapter() {
         @Override
         public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
-            SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+            SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
             TextInput textInput = suggestionPopup.getTextInput();
 
-            Display display = (Display)container;
+            Display display = (Display) container;
             Component descendant = display.getDescendantAt(x, y);
 
-            if (!suggestionPopup.isAncestor(descendant)
-                && descendant != textInput) {
+            if (!suggestionPopup.isAncestor(descendant) && descendant != textInput) {
                 returnFocusToTextInput = false;
                 suggestionPopup.close(false);
             }
@@ -96,10 +95,9 @@ public class TerraSuggestionPopupSkin ex
     private ComponentStateListener textInputStateListener = new ComponentStateListener.Adapter() {
         @Override
         public void focusedChanged(Component component, Component obverseComponent) {
-            SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+            SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
 
-            if (!component.isFocused()
-                && !suggestionPopup.containsFocus()) {
+            if (!component.isFocused() && !suggestionPopup.containsFocus()) {
                 returnFocusToTextInput = false;
                 suggestionPopup.close();
             }
@@ -114,15 +112,13 @@ public class TerraSuggestionPopupSkin ex
          * false.
          */
         @Override
-        public boolean keyPressed(Component component, int keyCode,
-            Keyboard.KeyLocation keyLocation) {
+        public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
             boolean consumed = false;
 
-            SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+            SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
 
             if (keyCode == Keyboard.KeyCode.DOWN) {
-                if (listView.getSelectedIndex() == -1
-                    && listView.getListData().getLength() > 0) {
+                if (listView.getSelectedIndex() == -1 && listView.getListData().getLength() > 0) {
                     listView.setSelectedIndex(0);
                 }
 
@@ -142,7 +138,7 @@ public class TerraSuggestionPopupSkin ex
         public void selectedItemChanged(ListView listViewArgument, Object previousSelectedItem) {
             int index = listViewArgument.getSelectedIndex();
 
-            SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+            SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
             suggestionPopup.setSelectedIndex(index);
         }
     };
@@ -152,12 +148,12 @@ public class TerraSuggestionPopupSkin ex
          * {@link KeyCode#TAB TAB} Close the suggestion popup with a 'result' of
          * true, and transfer focus forwards from the TextInput.<br>
          * {@link KeyCode#TAB TAB} + {@link Modifier#SHIFT SHIFT} Close the
-         * suggestion popup with a 'result' of true, and transfer focus backwards
-         * from the TextInput.<br>
+         * suggestion popup with a 'result' of true, and transfer focus
+         * backwards from the TextInput.<br>
          */
         @Override
         public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
-            SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+            SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
             TextInput textInput = suggestionPopup.getTextInput();
 
             switch (keyCode) {
@@ -165,8 +161,8 @@ public class TerraSuggestionPopupSkin ex
                     returnFocusToTextInput = false;
                     suggestionPopup.close(true);
 
-                    FocusTraversalDirection direction = (Keyboard.isPressed(Keyboard.Modifier.SHIFT)) ?
-                        FocusTraversalDirection.BACKWARD : FocusTraversalDirection.FORWARD;
+                    FocusTraversalDirection direction = (Keyboard.isPressed(Keyboard.Modifier.SHIFT)) ? FocusTraversalDirection.BACKWARD
+                        : FocusTraversalDirection.FORWARD;
                     textInput.transferFocus(direction);
 
                     break;
@@ -184,7 +180,7 @@ public class TerraSuggestionPopupSkin ex
     private static final int DEFAULT_CLOSE_TRANSITION_DURATION = 150;
     private static final int DEFAULT_CLOSE_TRANSITION_RATE = 30;
 
-    public TerraSuggestionPopupSkin () {
+    public TerraSuggestionPopupSkin() {
         listView.getStyles().put("variableItemHeight", true);
         listView.getListViewSelectionListeners().add(listViewSelectionListener);
         listView.getComponentKeyListeners().add(listViewKeyListener);
@@ -201,7 +197,7 @@ public class TerraSuggestionPopupSkin ex
     public void install(Component component) {
         super.install(component);
 
-        SuggestionPopup suggestionPopup = (SuggestionPopup)component;
+        SuggestionPopup suggestionPopup = (SuggestionPopup) component;
         suggestionPopup.getSuggestionPopupListeners().add(this);
         suggestionPopup.getSuggestionPopupSelectionListeners().add(this);
         suggestionPopup.getSuggestionPopupStateListeners().add(this);
@@ -217,7 +213,7 @@ public class TerraSuggestionPopupSkin ex
     }
 
     public Font getFont() {
-        return (Font)listView.getStyles().get("font");
+        return (Font) listView.getStyles().get("font");
     }
 
     public void setFont(Font font) {
@@ -241,7 +237,7 @@ public class TerraSuggestionPopupSkin ex
     }
 
     public Color getColor() {
-        return (Color)listView.getStyles().get("color");
+        return (Color) listView.getStyles().get("color");
     }
 
     public void setColor(Color color) {
@@ -257,7 +253,7 @@ public class TerraSuggestionPopupSkin ex
     }
 
     public Color getBorderColor() {
-        return (Color)listViewBorder.getStyles().get("color");
+        return (Color) listViewBorder.getStyles().get("color");
     }
 
     public void setBorderColor(Color borderColor) {
@@ -290,7 +286,7 @@ public class TerraSuggestionPopupSkin ex
 
     @Override
     public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
-        SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+        SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
         suggestionPopup.close(true);
 
         return true;
@@ -298,13 +294,12 @@ public class TerraSuggestionPopupSkin ex
 
     /**
      * {@link KeyCode#ENTER ENTER} Close the suggestion popup with a 'result' of
-     * true.<br>
-     * {@link KeyCode#ESCAPE ESCAPE} Close the suggestion popup with a 'result'
-     * of false.
+     * true.<br> {@link KeyCode#ESCAPE ESCAPE} Close the suggestion popup with a
+     * 'result' of false.
      */
     @Override
     public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
-        SuggestionPopup suggestionPopup = (SuggestionPopup)getComponent();
+        SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();
 
         switch (keyCode) {
             case Keyboard.KeyCode.ENTER: {
@@ -330,7 +325,7 @@ public class TerraSuggestionPopupSkin ex
         super.windowOpened(window);
 
         // Adjust for list size
-        SuggestionPopup suggestionPopup = (SuggestionPopup)window;
+        SuggestionPopup suggestionPopup = (SuggestionPopup) window;
 
         int listSize = suggestionPopup.getListSize();
         if (listSize == -1) {
@@ -368,8 +363,7 @@ public class TerraSuggestionPopupSkin ex
 
     @Override
     public void windowCloseVetoed(Window window, Vote reason) {
-        if (reason == Vote.DENY
-            && closeTransition != null) {
+        if (reason == Vote.DENY && closeTransition != null) {
             closeTransition.stop();
 
             listViewBorder.setEnabled(true);
@@ -406,7 +400,8 @@ public class TerraSuggestionPopupSkin ex
     }
 
     @Override
-    public void selectedSuggestionChanged(SuggestionPopup suggestionPopup, Object previousSelectedSuggestion) {
+    public void selectedSuggestionChanged(SuggestionPopup suggestionPopup,
+        Object previousSelectedSuggestion) {
         TextInput textInput = suggestionPopup.getTextInput();
 
         Object suggestion = suggestionPopup.getSelectedSuggestion();
@@ -417,13 +412,13 @@ public class TerraSuggestionPopupSkin ex
     }
 
     @Override
-    public Vote previewSuggestionPopupClose(final SuggestionPopup suggestionPopup, final boolean result) {
+    public Vote previewSuggestionPopupClose(final SuggestionPopup suggestionPopup,
+        final boolean result) {
         if (closeTransition == null) {
             listViewBorder.setEnabled(false);
 
-            closeTransition = new FadeWindowTransition(suggestionPopup,
-                closeTransitionDuration, closeTransitionRate,
-                dropShadowDecorator);
+            closeTransition = new FadeWindowTransition(suggestionPopup, closeTransitionDuration,
+                closeTransitionRate, dropShadowDecorator);
 
             closeTransition.start(new TransitionListener() {
                 @Override
@@ -433,14 +428,12 @@ public class TerraSuggestionPopupSkin ex
             });
         }
 
-        return (closeTransition != null
-            && closeTransition.isRunning()) ? Vote.DEFER : Vote.APPROVE;
+        return (closeTransition != null && closeTransition.isRunning()) ? Vote.DEFER : Vote.APPROVE;
     }
 
     @Override
     public void suggestionPopupCloseVetoed(SuggestionPopup suggestionPopup, Vote reason) {
-        if (reason == Vote.DENY
-            && closeTransition != null) {
+        if (reason == Vote.DENY && closeTransition != null) {
             closeTransition.stop();
 
             listViewBorder.setEnabled(true);

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Fri Oct  4 23:45:40 2013
@@ -64,8 +64,8 @@ import org.apache.pivot.wtk.skin.Contain
 /**
  * Tab pane skin.
  */
-public class TerraTabPaneSkin extends ContainerSkin
-    implements TabPaneListener, TabPaneSelectionListener, TabPaneAttributeListener {
+public class TerraTabPaneSkin extends ContainerSkin implements TabPaneListener,
+    TabPaneSelectionListener, TabPaneAttributeListener {
     /**
      * Tab button component.
      */
@@ -91,7 +91,7 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public Button.DataRenderer getDataRenderer() {
-            TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
+            TabPane tabPane = (TabPane) TerraTabPaneSkin.this.getComponent();
             return tabPane.getTabDataRenderer();
         }
 
@@ -124,17 +124,15 @@ public class TerraTabPaneSkin extends Co
         public void press() {
             // If the tab pane is collapsible, toggle the button selection;
             // otherwise, select it
-            TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
+            TabPane tabPane = (TabPane) TerraTabPaneSkin.this.getComponent();
             setSelected(tabPane.isCollapsible() ? !isSelected() : true);
             super.press();
         }
     }
 
     /**
-     * Tab button skin.
-     * <p>
-     * Note that this class does not respect preferred size constraints,
-     * because it will never be called to use them.
+     * Tab button skin. <p> Note that this class does not respect preferred size
+     * constraints, because it will never be called to use them.
      */
     public class TabButtonSkin extends ButtonSkin {
         @Override
@@ -151,8 +149,8 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public Dimensions getPreferredSize() {
-            TabButton tabButton = (TabButton)getComponent();
-            TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
+            TabButton tabButton = (TabButton) getComponent();
+            TabPane tabPane = (TabPane) TerraTabPaneSkin.this.getComponent();
 
             Button.DataRenderer dataRenderer = tabButton.getDataRenderer();
             dataRenderer.render(tabButton.getButtonData(), tabButton, false);
@@ -163,14 +161,13 @@ public class TerraTabPaneSkin extends Co
             int preferredHeight = 0;
             switch (tabOrientation) {
                 case HORIZONTAL: {
-                    preferredWidth = preferredContentSize.width
-                        + buttonPadding.left + buttonPadding.right + 2;
+                    preferredWidth = preferredContentSize.width + buttonPadding.left
+                        + buttonPadding.right + 2;
 
-                    preferredHeight = preferredContentSize.height
-                        + buttonPadding.top + buttonPadding.bottom + 2;
+                    preferredHeight = preferredContentSize.height + buttonPadding.top
+                        + buttonPadding.bottom + 2;
 
-                    if (tabPane.isCloseable()
-                        && tabButton.isSelected()) {
+                    if (tabPane.isCloseable() && tabButton.isSelected()) {
                         preferredWidth += CLOSE_TRIGGER_SIZE + buttonSpacing;
                     }
 
@@ -178,14 +175,13 @@ public class TerraTabPaneSkin extends Co
                 }
 
                 case VERTICAL: {
-                    preferredWidth = preferredContentSize.height
-                        + buttonPadding.top + buttonPadding.bottom + 2;
+                    preferredWidth = preferredContentSize.height + buttonPadding.top
+                        + buttonPadding.bottom + 2;
 
-                    preferredHeight = preferredContentSize.width
-                        + buttonPadding.left + buttonPadding.right + 2;
+                    preferredHeight = preferredContentSize.width + buttonPadding.left
+                        + buttonPadding.right + 2;
 
-                    if (tabPane.isCloseable()
-                        && tabButton.isSelected()) {
+                    if (tabPane.isCloseable() && tabButton.isSelected()) {
                         preferredHeight += CLOSE_TRIGGER_SIZE + buttonSpacing;
                     }
 
@@ -203,7 +199,7 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public int getBaseline(int width, int height) {
-            TabButton tabButton = (TabButton)getComponent();
+            TabButton tabButton = (TabButton) getComponent();
 
             Button.DataRenderer dataRenderer = tabButton.getDataRenderer();
             dataRenderer.render(tabButton.getButtonData(), tabButton, false);
@@ -222,15 +218,13 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public void paint(Graphics2D graphics) {
-            TabButton tabButton = (TabButton)getComponent();
-            TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
+            TabButton tabButton = (TabButton) getComponent();
+            TabPane tabPane = (TabPane) TerraTabPaneSkin.this.getComponent();
 
-            boolean active = (selectionChangeTransition != null
-                && selectionChangeTransition.getTab() == tabButton.tab);
+            boolean active = (selectionChangeTransition != null && selectionChangeTransition.getTab() == tabButton.tab);
 
             Color backgroundColor, buttonBevelColor;
-            if (tabButton.isSelected()
-                || active) {
+            if (tabButton.isSelected() || active) {
                 backgroundColor = activeTabColor;
                 buttonBevelColor = activeButtonBevelColor;
             } else {
@@ -245,20 +239,20 @@ public class TerraTabPaneSkin extends Co
             graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                 RenderingHints.VALUE_ANTIALIAS_ON);
 
-            switch(tabOrientation) {
+            switch (tabOrientation) {
                 case HORIZONTAL: {
                     graphics.setPaint(new GradientPaint(width / 2f, 0, buttonBevelColor,
                         width / 2f, height / 2f, backgroundColor));
-                    graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1 + buttonCornerRadius,
-                        buttonCornerRadius, buttonCornerRadius));
+                    graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1
+                        + buttonCornerRadius, buttonCornerRadius, buttonCornerRadius));
                     break;
                 }
 
                 case VERTICAL: {
                     graphics.setPaint(new GradientPaint(0, height / 2f, buttonBevelColor,
                         width / 2f, height / 2f, backgroundColor));
-                    graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1 + buttonCornerRadius, height - 1,
-                        buttonCornerRadius, buttonCornerRadius));
+                    graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1
+                        + buttonCornerRadius, height - 1, buttonCornerRadius, buttonCornerRadius));
                     break;
                 }
 
@@ -268,19 +262,20 @@ public class TerraTabPaneSkin extends Co
             }
 
             // Draw the border
-            graphics.setPaint((tabButton.isSelected() || active) ? borderColor : inactiveBorderColor);
+            graphics.setPaint((tabButton.isSelected() || active) ? borderColor
+                : inactiveBorderColor);
             graphics.setStroke(new BasicStroke(1));
 
-            switch(tabOrientation) {
+            switch (tabOrientation) {
                 case HORIZONTAL: {
-                    graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height + buttonCornerRadius - 1,
-                        buttonCornerRadius, buttonCornerRadius));
+                    graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height
+                        + buttonCornerRadius - 1, buttonCornerRadius, buttonCornerRadius));
                     break;
                 }
 
                 case VERTICAL: {
-                    graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width + buttonCornerRadius - 1, height - 1,
-                        buttonCornerRadius, buttonCornerRadius));
+                    graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width + buttonCornerRadius
+                        - 1, height - 1, buttonCornerRadius, buttonCornerRadius));
                     break;
                 }
 
@@ -289,13 +284,13 @@ public class TerraTabPaneSkin extends Co
                 }
             }
 
-            if (!(tabButton.isSelected()
-                || active)) {
+            if (!(tabButton.isSelected() || active)) {
                 graphics.setPaint(borderColor);
                 // Draw divider
-                switch(tabOrientation) {
+                switch (tabOrientation) {
                     case HORIZONTAL: {
-                        graphics.draw(new Line2D.Double(0.5, height - 0.5, width - 0.5, height - 0.5));
+                        graphics.draw(new Line2D.Double(0.5, height - 0.5, width - 0.5,
+                            height - 0.5));
                         break;
                     }
 
@@ -314,15 +309,14 @@ public class TerraTabPaneSkin extends Co
             Button.DataRenderer dataRenderer = tabButton.getDataRenderer();
             dataRenderer.render(tabButton.getButtonData(), tabButton, false);
 
-            Graphics2D contentGraphics = (Graphics2D)graphics.create();
+            Graphics2D contentGraphics = (Graphics2D) graphics.create();
             contentGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                 RenderingHints.VALUE_ANTIALIAS_OFF);
 
             switch (tabOrientation) {
                 case HORIZONTAL: {
                     int contentWidth = getWidth() - (buttonPadding.left + buttonPadding.right + 2);
-                    if (tabPane.isCloseable()
-                        && tabButton.isSelected()) {
+                    if (tabPane.isCloseable() && tabButton.isSelected()) {
                         contentWidth -= (CLOSE_TRIGGER_SIZE + buttonSpacing);
                     }
 
@@ -336,8 +330,7 @@ public class TerraTabPaneSkin extends Co
 
                 case VERTICAL: {
                     int contentWidth = getHeight() - (buttonPadding.top + buttonPadding.bottom + 2);
-                    if (tabPane.isCloseable()
-                        && tabButton.isSelected()) {
+                    if (tabPane.isCloseable() && tabButton.isSelected()) {
                         contentWidth -= (CLOSE_TRIGGER_SIZE + buttonSpacing);
                     }
 
@@ -362,8 +355,7 @@ public class TerraTabPaneSkin extends Co
             contentGraphics.dispose();
 
             // Draw the close trigger
-            if (tabPane.isCloseable()
-                && tabButton.isSelected()) {
+            if (tabPane.isCloseable() && tabButton.isSelected()) {
                 graphics.setStroke(new BasicStroke(2.5f));
 
                 int x = 0;
@@ -386,8 +378,10 @@ public class TerraTabPaneSkin extends Co
                     }
                 }
 
-                graphics.draw(new Line2D.Double(x, y, x + CLOSE_TRIGGER_SIZE - 1, y + CLOSE_TRIGGER_SIZE - 1));
-                graphics.draw(new Line2D.Double(x, y + CLOSE_TRIGGER_SIZE - 1, x + CLOSE_TRIGGER_SIZE - 1, y));
+                graphics.draw(new Line2D.Double(x, y, x + CLOSE_TRIGGER_SIZE - 1, y
+                    + CLOSE_TRIGGER_SIZE - 1));
+                graphics.draw(new Line2D.Double(x, y + CLOSE_TRIGGER_SIZE - 1, x
+                    + CLOSE_TRIGGER_SIZE - 1, y));
             }
         }
 
@@ -400,11 +394,10 @@ public class TerraTabPaneSkin extends Co
         public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
             boolean consumed = super.mouseClick(component, button, x, y, count);
 
-            TabButton tabButton = (TabButton)getComponent();
-            TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
+            TabButton tabButton = (TabButton) getComponent();
+            TabPane tabPane = (TabPane) TerraTabPaneSkin.this.getComponent();
 
-            if (tabPane.isCloseable()
-                && tabButton.isSelected()
+            if (tabPane.isCloseable() && tabButton.isSelected()
                 && getCloseTriggerBounds().contains(x, y)) {
                 tabPane.getTabs().remove(tabButton.tab);
             } else {
@@ -438,15 +431,15 @@ public class TerraTabPaneSkin extends Co
             // Include an extra 2 pixels around the trigger for ease of use
             switch (tabOrientation) {
                 case HORIZONTAL: {
-                    bounds = new Bounds(getWidth() - (CLOSE_TRIGGER_SIZE + buttonPadding.right + 1) - 2,
-                        (getHeight() - CLOSE_TRIGGER_SIZE) / 2 - 2,
-                        CLOSE_TRIGGER_SIZE + 4, CLOSE_TRIGGER_SIZE + 4);
+                    bounds = new Bounds(getWidth() - (CLOSE_TRIGGER_SIZE + buttonPadding.right + 1)
+                        - 2, (getHeight() - CLOSE_TRIGGER_SIZE) / 2 - 2, CLOSE_TRIGGER_SIZE + 4,
+                        CLOSE_TRIGGER_SIZE + 4);
                     break;
                 }
 
                 case VERTICAL: {
-                    bounds = new Bounds((getWidth() - CLOSE_TRIGGER_SIZE) / 2 - 2,
-                        getHeight() - (CLOSE_TRIGGER_SIZE + buttonPadding.bottom + 1) - 2,
+                    bounds = new Bounds((getWidth() - CLOSE_TRIGGER_SIZE) / 2 - 2, getHeight()
+                        - (CLOSE_TRIGGER_SIZE + buttonPadding.bottom + 1) - 2,
                         CLOSE_TRIGGER_SIZE + 4, CLOSE_TRIGGER_SIZE + 4);
                     break;
                 }
@@ -477,7 +470,7 @@ public class TerraTabPaneSkin extends Co
         }
 
         public Component getTab() {
-            TabPane tabPane = (TabPane)getComponent();
+            TabPane tabPane = (TabPane) getComponent();
             return tabPane.getTabs().get(index);
         }
 
@@ -497,7 +490,7 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public void start(TransitionListener transitionListener) {
-            TabPane tabPane = (TabPane)getComponent();
+            TabPane tabPane = (TabPane) getComponent();
 
             if (expand) {
                 getTab().setVisible(true);
@@ -511,7 +504,7 @@ public class TerraTabPaneSkin extends Co
 
         @Override
         public void stop() {
-            TabPane tabPane = (TabPane)getComponent();
+            TabPane tabPane = (TabPane) getComponent();
 
             if (!expand) {
                 getTab().setVisible(false);
@@ -559,20 +552,19 @@ public class TerraTabPaneSkin extends Co
     private ComponentStateListener tabStateListener = new ComponentStateListener.Adapter() {
         @Override
         public void enabledChanged(Component component) {
-            TabPane tabPane = (TabPane)getComponent();
+            TabPane tabPane = (TabPane) getComponent();
             int i = tabPane.getTabs().indexOf(component);
             tabButtonBoxPane.get(i).setEnabled(component.isEnabled());
         }
     };
 
-
     public static final int GRADIENT_BEVEL_THICKNESS = 8;
     private static final int CLOSE_TRIGGER_SIZE = 6;
     private static final int DEFAULT_SELECTION_CHANGE_DURATION = 250;
     private static final int DEFAULT_SELECTION_CHANGE_RATE = 30;
 
     public TerraTabPaneSkin() {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         activeTabColor = theme.getColor(11);
         inactiveTabColor = theme.getColor(9);
         borderColor = theme.getColor(7);
@@ -600,7 +592,7 @@ public class TerraTabPaneSkin extends Co
                 Button button = tabButtonGroup.getSelection();
                 int index = (button == null) ? -1 : tabButtonBoxPane.indexOf(button);
 
-                TabPane tabPane = (TabPane)getComponent();
+                TabPane tabPane = (TabPane) getComponent();
                 tabPane.setSelectedIndex(index);
             }
         });
@@ -612,7 +604,7 @@ public class TerraTabPaneSkin extends Co
     public void install(Component component) {
         super.install(component);
 
-        TabPane tabPane = (TabPane)component;
+        TabPane tabPane = (TabPane) component;
 
         // Add this as a listener on the tab pane
         tabPane.getTabPaneListeners().add(this);
@@ -627,7 +619,7 @@ public class TerraTabPaneSkin extends Co
     public int getPreferredWidth(int height) {
         int preferredWidth = 0;
 
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
 
         Component selectedTab = tabPane.getSelectedTab();
         Component corner = tabPane.getCorner();
@@ -636,10 +628,13 @@ public class TerraTabPaneSkin extends Co
             case HORIZONTAL: {
                 if (height != -1) {
                     if (corner != null) {
-                        height = Math.max(height - Math.max(corner.getPreferredHeight(-1),
-                            Math.max(tabButtonPanorama.getPreferredHeight(-1) - 1, 0)), 0);
+                        height = Math.max(
+                            height
+                                - Math.max(corner.getPreferredHeight(-1),
+                                    Math.max(tabButtonPanorama.getPreferredHeight(-1) - 1, 0)), 0);
                     } else {
-                        height = Math.max(height - (tabButtonPanorama.getPreferredHeight(-1) - 1), 0);
+                        height = Math.max(height - (tabButtonPanorama.getPreferredHeight(-1) - 1),
+                            0);
                     }
 
                     height = Math.max(height - (padding.top + padding.bottom + 2), 0);
@@ -662,15 +657,14 @@ public class TerraTabPaneSkin extends Co
                     height = Math.max(height - (padding.top + padding.bottom + 2), 0);
                 }
 
-                if (selectedTab == null
-                    && selectionChangeTransition == null) {
+                if (selectedTab == null && selectionChangeTransition == null) {
                     preferredWidth = 1;
                 } else {
                     preferredWidth = getPreferredTabWidth(height) + (padding.left + padding.right);
 
                     if (selectionChangeTransition != null) {
                         float scale = selectionChangeTransition.getScale();
-                        preferredWidth = (int)(preferredWidth * scale);
+                        preferredWidth = (int) (preferredWidth * scale);
                     }
 
                     preferredWidth += 2;
@@ -698,7 +692,7 @@ public class TerraTabPaneSkin extends Co
     public int getPreferredHeight(int width) {
         int preferredHeight = 0;
 
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
 
         Component selectedTab = tabPane.getSelectedTab();
         Component corner = tabPane.getCorner();
@@ -709,15 +703,14 @@ public class TerraTabPaneSkin extends Co
                     width = Math.max(width - (padding.left + padding.right + 2), 0);
                 }
 
-                if (selectedTab == null
-                    && selectionChangeTransition == null) {
+                if (selectedTab == null && selectionChangeTransition == null) {
                     preferredHeight = 1;
                 } else {
                     preferredHeight = getPreferredTabHeight(width) + (padding.top + padding.bottom);
 
                     if (selectionChangeTransition != null) {
                         float scale = selectionChangeTransition.getScale();
-                        preferredHeight = (int)(preferredHeight * scale);
+                        preferredHeight = (int) (preferredHeight * scale);
                     }
 
                     preferredHeight += 2;
@@ -736,8 +729,10 @@ public class TerraTabPaneSkin extends Co
             case VERTICAL: {
                 if (width != -1) {
                     if (corner != null) {
-                        width = Math.max(width - Math.max(corner.getPreferredWidth(-1),
-                            Math.max(tabButtonPanorama.getPreferredWidth(-1) - 1, 0)), 0);
+                        width = Math.max(
+                            width
+                                - Math.max(corner.getPreferredWidth(-1),
+                                    Math.max(tabButtonPanorama.getPreferredWidth(-1) - 1, 0)), 0);
                     } else {
                         width = Math.max(width - (tabButtonPanorama.getPreferredWidth(-1) - 1), 0);
                     }
@@ -767,7 +762,7 @@ public class TerraTabPaneSkin extends Co
 
     @Override
     public Dimensions getPreferredSize() {
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
 
         int preferredWidth;
         int preferredHeight;
@@ -777,8 +772,7 @@ public class TerraTabPaneSkin extends Co
 
         switch (tabOrientation) {
             case HORIZONTAL: {
-                if (selectedTab == null
-                    && selectionChangeTransition == null) {
+                if (selectedTab == null && selectionChangeTransition == null) {
                     preferredWidth = getPreferredTabWidth(-1) + (padding.left + padding.right + 2);
                     preferredHeight = 1;
                 } else {
@@ -788,7 +782,7 @@ public class TerraTabPaneSkin extends Co
 
                     if (selectionChangeTransition != null) {
                         float scale = selectionChangeTransition.getScale();
-                        preferredHeight = (int)(preferredHeight * scale);
+                        preferredHeight = (int) (preferredHeight * scale);
                     }
 
                     preferredHeight += 2;
@@ -799,7 +793,8 @@ public class TerraTabPaneSkin extends Co
                     buttonAreaPreferredWidth += corner.getPreferredWidth(-1);
                     preferredHeight += Math.max(corner.getPreferredHeight(-1),
                         Math.max(tabButtonPanorama.getPreferredHeight(-1) - 1, 0));
-                    buttonAreaPreferredWidth += 2; // space between corner and panorama
+                    buttonAreaPreferredWidth += 2; // space between corner and
+                                                   // panorama
                 } else {
                     preferredHeight += Math.max(tabButtonPanorama.getPreferredHeight(-1) - 1, 0);
                 }
@@ -810,10 +805,10 @@ public class TerraTabPaneSkin extends Co
             }
 
             case VERTICAL: {
-                if (selectedTab == null
-                    && selectionChangeTransition == null) {
+                if (selectedTab == null && selectionChangeTransition == null) {
                     preferredWidth = 1;
-                    preferredHeight = getPreferredTabHeight(-1) + (padding.top + padding.bottom + 2);
+                    preferredHeight = getPreferredTabHeight(-1)
+                        + (padding.top + padding.bottom + 2);
                 } else {
                     Dimensions preferredTabSize = getPreferredTabSize();
 
@@ -822,7 +817,7 @@ public class TerraTabPaneSkin extends Co
 
                     if (selectionChangeTransition != null) {
                         float scale = selectionChangeTransition.getScale();
-                        preferredWidth = (int)(preferredWidth * scale);
+                        preferredWidth = (int) (preferredWidth * scale);
                     }
 
                     preferredWidth += 2;
@@ -833,7 +828,8 @@ public class TerraTabPaneSkin extends Co
                     buttonAreaPreferredHeight += corner.getPreferredHeight(-1);
                     preferredWidth += Math.max(corner.getPreferredWidth(-1),
                         Math.max(tabButtonPanorama.getPreferredWidth(-1) - 1, 0));
-                    buttonAreaPreferredHeight += 2; // space between corner and panorama
+                    buttonAreaPreferredHeight += 2; // space between corner and
+                                                    // panorama
                 } else {
                     preferredWidth += Math.max(tabButtonPanorama.getPreferredWidth(-1) - 1, 0);
                 }
@@ -856,9 +852,8 @@ public class TerraTabPaneSkin extends Co
     public int getBaseline(int width, int height) {
         int baseline = -1;
 
-        if (tabOrientation == Orientation.HORIZONTAL
-            && tabButtonBoxPane.getLength() > 0) {
-            TabButton firstTabButton = (TabButton)tabButtonBoxPane.get(0);
+        if (tabOrientation == Orientation.HORIZONTAL && tabButtonBoxPane.getLength() > 0) {
+            TabButton firstTabButton = (TabButton) tabButtonBoxPane.get(0);
 
             int buttonHeight = tabButtonBoxPane.getPreferredHeight();
             baseline = firstTabButton.getBaseline(firstTabButton.getPreferredWidth(buttonHeight),
@@ -871,7 +866,7 @@ public class TerraTabPaneSkin extends Co
     private int getPreferredTabWidth(int height) {
         int preferredTabWidth = 0;
 
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
         for (Component tab : tabPane.getTabs()) {
             preferredTabWidth = Math.max(preferredTabWidth, tab.getPreferredWidth(height));
         }
@@ -882,7 +877,7 @@ public class TerraTabPaneSkin extends Co
     private int getPreferredTabHeight(int width) {
         int preferredTabHeight = 0;
 
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
         for (Component tab : tabPane.getTabs()) {
             preferredTabHeight = Math.max(preferredTabHeight, tab.getPreferredHeight(width));
         }
@@ -894,7 +889,7 @@ public class TerraTabPaneSkin extends Co
         int preferredTabWidth = 0;
         int preferredTabHeight = 0;
 
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
         for (Component tab : tabPane.getTabs()) {
             Dimensions preferredSize = tab.getPreferredSize();
             preferredTabWidth = Math.max(preferredTabWidth, preferredSize.width);
@@ -904,10 +899,9 @@ public class TerraTabPaneSkin extends Co
         return new Dimensions(preferredTabWidth, preferredTabHeight);
     }
 
-
     @Override
     public void layout() {
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
         int width = getWidth();
         int height = getHeight();
 
@@ -926,14 +920,16 @@ public class TerraTabPaneSkin extends Co
                 int buttonPanoramaY = 0;
 
                 if (corner != null) {
-                    int cornerWidth = Math.max(width - buttonPanoramaWidth - 2, corner.getPreferredWidth());
+                    int cornerWidth = Math.max(width - buttonPanoramaWidth - 2,
+                        corner.getPreferredWidth());
                     if (cornerWidth > width - 2) {
                         cornerWidth = Math.max(width - 2, 0);
                     }
                     if (buttonPanoramaWidth + 2 + cornerWidth > width) {
                         buttonPanoramaWidth = Math.max(width - 2 - cornerWidth, 0);
                     }
-                    int cornerHeight = Math.max(corner.getPreferredHeight(-1), buttonPanoramaSize.height - 1);
+                    int cornerHeight = Math.max(corner.getPreferredHeight(-1),
+                        buttonPanoramaSize.height - 1);
                     int cornerX = width - cornerWidth;
                     int cornerY = Math.max(buttonPanoramaHeight - cornerHeight - 1, 0);
 
@@ -950,27 +946,29 @@ public class TerraTabPaneSkin extends Co
                 tabY = padding.top + buttonPanoramaY + buttonPanoramaHeight;
 
                 tabWidth = Math.max(width - (padding.left + padding.right + 2), 0);
-                tabHeight = Math.max(height - (padding.top + padding.bottom
-                    + buttonPanoramaY + buttonPanoramaHeight + 1), 0);
+                tabHeight = Math.max(height
+                    - (padding.top + padding.bottom + buttonPanoramaY + buttonPanoramaHeight + 1),
+                    0);
 
                 break;
             }
 
             case VERTICAL: {
                 int buttonPanoramaWidth = buttonPanoramaSize.width;
-                int buttonPanoramaHeight = Math.min(height,
-                    buttonPanoramaSize.height);
+                int buttonPanoramaHeight = Math.min(height, buttonPanoramaSize.height);
                 int buttonPanoramaX = 0;
 
                 if (corner != null) {
-                    int cornerHeight = Math.max(height - buttonPanoramaHeight - 2, corner.getPreferredHeight());
+                    int cornerHeight = Math.max(height - buttonPanoramaHeight - 2,
+                        corner.getPreferredHeight());
                     if (cornerHeight > height - 2) {
                         cornerHeight = Math.max(height - 2, 0);
                     }
                     if (buttonPanoramaHeight + 2 + cornerHeight > height) {
                         buttonPanoramaHeight = Math.max(height - 2 - cornerHeight, 0);
                     }
-                    int cornerWidth = Math.max(corner.getPreferredWidth(-1), buttonPanoramaSize.width - 1);
+                    int cornerWidth = Math.max(corner.getPreferredWidth(-1),
+                        buttonPanoramaSize.width - 1);
                     int cornerX = Math.max(buttonPanoramaWidth - cornerWidth - 1, 0);
                     int cornerY = height - cornerHeight;
 
@@ -985,8 +983,8 @@ public class TerraTabPaneSkin extends Co
 
                 tabX = padding.left + buttonPanoramaX + buttonPanoramaWidth;
                 tabY = padding.top + 1;
-                tabWidth = Math.max(width - (padding.left + padding.right
-                    + buttonPanoramaX + buttonPanoramaWidth + 1), 0);
+                tabWidth = Math.max(width
+                    - (padding.left + padding.right + buttonPanoramaX + buttonPanoramaWidth + 1), 0);
                 tabHeight = Math.max(height - (padding.top + padding.bottom + 2), 0);
 
                 break;
@@ -1001,8 +999,7 @@ public class TerraTabPaneSkin extends Co
         for (Component tab : tabPane.getTabs()) {
             tab.setLocation(tabX, tabY);
 
-            if (selectionChangeTransition != null
-                && selectionChangeTransition.isRunning()) {
+            if (selectionChangeTransition != null && selectionChangeTransition.isRunning()) {
                 clipDecorator.setSize(tabWidth, tabHeight);
 
                 switch (tabOrientation) {
@@ -1028,7 +1025,7 @@ public class TerraTabPaneSkin extends Co
 
     @Override
     public void paint(Graphics2D graphics) {
-        TabPane tabPane = (TabPane)getComponent();
+        TabPane tabPane = (TabPane) getComponent();
 
         Bounds tabPaneBounds = tabPane.getBounds();
 
@@ -1067,9 +1064,9 @@ public class TerraTabPaneSkin extends Co
 
         TabButton activeTabButton;
         if (selectionChangeTransition == null) {
-            activeTabButton = (TabButton)tabButtonGroup.getSelection();
+            activeTabButton = (TabButton) tabButtonGroup.getSelection();
         } else {
-            activeTabButton = (TabButton)tabButtonBoxPane.get(selectionChangeTransition.index);
+            activeTabButton = (TabButton) tabButtonBoxPane.get(selectionChangeTransition.index);
         }
 
         if (activeTabButton != null) {
@@ -1080,8 +1077,8 @@ public class TerraTabPaneSkin extends Co
 
             // Paint the background
             graphics.setPaint(activeTabColor);
-            graphics.fillRect(contentBounds.x, contentBounds.y,
-                contentBounds.width, contentBounds.height);
+            graphics.fillRect(contentBounds.x, contentBounds.y, contentBounds.width,
+                contentBounds.height);
 
             // Draw the border
             double top = contentBounds.y + 0.5;
@@ -1100,10 +1097,12 @@ public class TerraTabPaneSkin extends Co
                 case HORIZONTAL: {
                     graphics.draw(new Line2D.Double(left, top, left, bottom));
 
-                    Point selectedTabButtonLocation = activeTabButton.mapPointToAncestor(tabPane, 0, 0);
-                    graphics.draw(new Line2D.Double(left, top, selectedTabButtonLocation.x + 0.5, top));
-                    graphics.draw(new Line2D.Double(selectedTabButtonLocation.x + activeTabButton.getWidth() - 0.5,
-                        top, right, top));
+                    Point selectedTabButtonLocation = activeTabButton.mapPointToAncestor(tabPane,
+                        0, 0);
+                    graphics.draw(new Line2D.Double(left, top, selectedTabButtonLocation.x + 0.5,
+                        top));
+                    graphics.draw(new Line2D.Double(selectedTabButtonLocation.x
+                        + activeTabButton.getWidth() - 0.5, top, right, top));
 
                     break;
                 }
@@ -1111,10 +1110,12 @@ public class TerraTabPaneSkin extends Co
                 case VERTICAL: {
                     graphics.draw(new Line2D.Double(left, top, right, top));
 
-                    Point selectedTabButtonLocation = activeTabButton.mapPointToAncestor(tabPane, 0, 0);
-                    graphics.draw(new Line2D.Double(left, top, left, selectedTabButtonLocation.y + 0.5));
-                    graphics.draw(new Line2D.Double(left, selectedTabButtonLocation.y + activeTabButton.getHeight() - 0.5,
-                        left, bottom));
+                    Point selectedTabButtonLocation = activeTabButton.mapPointToAncestor(tabPane,
+                        0, 0);
+                    graphics.draw(new Line2D.Double(left, top, left,
+                        selectedTabButtonLocation.y + 0.5));
+                    graphics.draw(new Line2D.Double(left, selectedTabButtonLocation.y
+                        + activeTabButton.getHeight() - 0.5, left, bottom));
 
                     break;
                 }
@@ -1149,7 +1150,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public final void setActiveTabColor(int activeTabColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setActiveTabColor(theme.getColor(activeTabColor));
     }
 
@@ -1176,7 +1177,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public final void setInactiveTabColor(int inactiveTabColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setInactiveTabColor(theme.getColor(inactiveTabColor));
     }
 
@@ -1203,7 +1204,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public final void setBorderColor(int borderColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setBorderColor(theme.getColor(borderColor));
     }
 
@@ -1229,7 +1230,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public final void setInactiveBorderColor(int inactiveBorderColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setInactiveBorderColor(theme.getColor(inactiveBorderColor));
     }
 
@@ -1325,7 +1326,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public final void setButtonColor(int buttonColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setButtonColor(theme.getColor(buttonColor));
     }
 
@@ -1374,7 +1375,7 @@ public class TerraTabPaneSkin extends Co
     }
 
     public int getButtonSpacing() {
-        return (Integer)tabButtonBoxPane.getStyles().get("spacing");
+        return (Integer) tabButtonBoxPane.getStyles().get("spacing");
     }
 
     public void setButtonSpacing(int buttonSpacing) {
@@ -1456,7 +1457,7 @@ public class TerraTabPaneSkin extends Co
      * {@link KeyCode#KEYPAD_9 KEYPAD_9}<br>or CommandModifier +
      * {@link KeyCode#N1 1} to {@link KeyCode#N9 9} Select the (enabled) tab at
      * index 0 to 8 respectively<p>
-     *
+     * 
      * @see Platform#getCommandModifier()
      */
     @Override
@@ -1464,9 +1465,8 @@ public class TerraTabPaneSkin extends Co
         boolean consumed = super.keyPressed(component, keyCode, keyLocation);
 
         Keyboard.Modifier commandModifier = Platform.getCommandModifier();
-        if (!consumed
-            && Keyboard.isPressed(commandModifier)) {
-            TabPane tabPane = (TabPane)getComponent();
+        if (!consumed && Keyboard.isPressed(commandModifier)) {
+            TabPane tabPane = (TabPane) getComponent();
             TabPane.TabSequence tabs = tabPane.getTabs();
 
             int selectedIndex = -1;
@@ -1531,8 +1531,7 @@ public class TerraTabPaneSkin extends Co
                 }
             }
 
-            if (selectedIndex >= 0
-                && selectedIndex < tabs.getLength()
+            if (selectedIndex >= 0 && selectedIndex < tabs.getLength()
                 && tabs.get(selectedIndex).isEnabled()) {
                 tabPane.setSelectedIndex(selectedIndex);
                 consumed = true;
@@ -1589,7 +1588,7 @@ public class TerraTabPaneSkin extends Co
         Sequence<Component> removedButtons = tabButtonBoxPane.remove(index, removed.getLength());
 
         for (int i = 0, n = removed.getLength(); i < n; i++) {
-            TabButton tabButton = (TabButton)removedButtons.get(i);
+            TabButton tabButton = (TabButton) removedButtons.get(i);
             tabButton.setButtonGroup(null);
 
             // Stop listening for state changes on the tab
@@ -1631,17 +1630,18 @@ public class TerraTabPaneSkin extends Co
         Vote vote;
 
         if (tabPane.isCollapsible()) {
-            if (tabPane.isShowing()
-                && selectionChangeTransition == null) {
+            if (tabPane.isShowing() && selectionChangeTransition == null) {
                 int previousSelectedIndex = tabPane.getSelectedIndex();
 
                 if (selectedIndex == -1) {
                     // Collapse
-                    selectionChangeTransition = new SelectionChangeTransition(previousSelectedIndex, false);
+                    selectionChangeTransition = new SelectionChangeTransition(
+                        previousSelectedIndex, false);
                 } else {
                     if (previousSelectedIndex == -1) {
                         // Expand
-                        selectionChangeTransition = new SelectionChangeTransition(selectedIndex, true);
+                        selectionChangeTransition = new SelectionChangeTransition(selectedIndex,
+                            true);
                     }
                 }
 
@@ -1649,10 +1649,9 @@ public class TerraTabPaneSkin extends Co
                     selectionChangeTransition.start(new TransitionListener() {
                         @Override
                         public void transitionCompleted(Transition transition) {
-                            TabPane tabPaneLocal = (TabPane)getComponent();
+                            TabPane tabPaneLocal = (TabPane) getComponent();
 
-                            SelectionChangeTransition selectionChangeTransitionLocal =
-                                (SelectionChangeTransition)transition;
+                            SelectionChangeTransition selectionChangeTransitionLocal = (SelectionChangeTransition) transition;
 
                             int selectedIndexLocal;
                             if (selectionChangeTransitionLocal.expand) {
@@ -1669,8 +1668,7 @@ public class TerraTabPaneSkin extends Co
                 }
             }
 
-            if (selectionChangeTransition == null
-                || !selectionChangeTransition.isRunning()) {
+            if (selectionChangeTransition == null || !selectionChangeTransition.isRunning()) {
                 vote = Vote.APPROVE;
             } else {
                 vote = Vote.DEFER;
@@ -1684,8 +1682,7 @@ public class TerraTabPaneSkin extends Co
 
     @Override
     public void selectedIndexChangeVetoed(TabPane tabPane, Vote reason) {
-        if (reason == Vote.DENY
-            && selectionChangeTransition != null) {
+        if (reason == Vote.DENY && selectionChangeTransition != null) {
             // NOTE We stop, rather than end, the transition so the completion
             // event isn't fired; if the event fires, the listener will set
             // the selection state
@@ -1707,14 +1704,14 @@ public class TerraTabPaneSkin extends Co
                     button.setSelected(false);
                 }
             } else {
-                final Button button = (Button)tabButtonBoxPane.get(selectedIndex);
+                final Button button = (Button) tabButtonBoxPane.get(selectedIndex);
                 button.setSelected(true);
 
                 Component selectedTab = tabPane.getTabs().get(selectedIndex);
                 selectedTab.setVisible(true);
                 selectedTab.requestFocus();
 
-                ApplicationContext.queueCallback(new Runnable(){
+                ApplicationContext.queueCallback(new Runnable() {
                     @Override
                     public void run() {
                         button.scrollAreaToVisible(0, 0, button.getWidth(), button.getHeight());
@@ -1728,8 +1725,7 @@ public class TerraTabPaneSkin extends Co
             }
         }
 
-        if (selectedIndex == -1
-            || previousSelectedIndex == -1) {
+        if (selectedIndex == -1 || previousSelectedIndex == -1) {
             invalidateComponent();
         }
     }

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTablePaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTablePaneSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTablePaneSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTablePaneSkin.java Fri Oct  4 23:45:40 2013
@@ -30,22 +30,22 @@ public class TerraTablePaneSkin extends 
     }
 
     public final void setBackgroundColor(int backgroundColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setBackgroundColor(theme.getColor(backgroundColor));
     }
 
     public final void setHorizontalGridColor(int horizontalGridColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setHorizontalGridColor(theme.getColor(horizontalGridColor));
     }
 
     public final void setVerticalGridColor(int verticalGridColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setVerticalGridColor(theme.getColor(verticalGridColor));
     }
 
     public final void setHighlightBackgroundColor(int highlightBackgroundColor) {
-        TerraTheme theme = (TerraTheme)Theme.getTheme();
+        TerraTheme theme = (TerraTheme) Theme.getTheme();
         setHighlightBackgroundColor(theme.getColor(highlightBackgroundColor));
     }
 }