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 2014/08/01 13:25:28 UTC

svn commit: r1615070 - /pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/

Author: smartini
Date: Fri Aug  1 11:25:28 2014
New Revision: 1615070

URL: http://svn.apache.org/r1615070
Log:
PIVOT-955, last components updated to handle the themeIsFlat; other changes later

Modified:
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserButtonSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSpinnerSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java Fri Aug  1 11:25:28 2014
@@ -167,7 +167,7 @@ public class TerraCalendarButtonSkin ext
 
         // Create the border
         calendarBorder = new Border(calendar);
-        calendarBorder.getStyles().put("padding", 0);
+        calendarBorder.getStyles().put("padding", new Integer(0));
         calendarBorder.getStyles().put("color", borderColor);
 
         // Set the popup content
@@ -268,8 +268,12 @@ public class TerraCalendarButtonSkin ext
         graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
 
-        graphics.setPaint(new GradientPaint(width / 2f, 0, bevelColorLocal, width / 2f,
-            height / 2f, backgroundColorLocal));
+        if (!themeIsFlat()) {
+            graphics.setPaint(new GradientPaint(width / 2f, 0, bevelColorLocal, width / 2f,
+                height / 2f, backgroundColorLocal));
+        } else {
+            graphics.setPaint(backgroundColorLocal);
+        }
         graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1, CORNER_RADIUS,
             CORNER_RADIUS));
 
@@ -294,12 +298,14 @@ public class TerraCalendarButtonSkin ext
         graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
 
-        // Paint the border
-        if (borderColorLocal != null) {
-            graphics.setPaint(borderColorLocal);
-            graphics.setStroke(new BasicStroke(1));
-            graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1,
-                CORNER_RADIUS, CORNER_RADIUS));
+        if (!themeIsFlat()) {
+            // Paint the border
+            if (borderColorLocal != null) {
+                graphics.setPaint(borderColorLocal);
+                graphics.setStroke(new BasicStroke(1));
+                graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1,
+                    CORNER_RADIUS, CORNER_RADIUS));
+            }
         }
 
         // Paint the focus state

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java Fri Aug  1 11:25:28 2014
@@ -148,8 +148,12 @@ public class TerraCalendarSkin extends C
 
             // Paint the background
             if (dateButton.isSelected()) {
-                graphics.setPaint(new GradientPaint(width / 2f, 0, selectionBevelColor, width / 2f,
-                    height, selectionBackgroundColor));
+                if (!themeIsFlat()) {
+                    graphics.setPaint(new GradientPaint(width / 2f, 0, selectionBevelColor, width / 2f,
+                        height, selectionBackgroundColor));
+                } else {
+                    graphics.setPaint(selectionBackgroundColor);
+                }
 
                 graphics.fillRect(0, 0, width, height);
             } else {
@@ -349,7 +353,7 @@ public class TerraCalendarSkin extends C
 
             // Since we're only rendering the month, the year and day do not
             // matter here
-            CalendarDate date = new CalendarDate(2000, (Integer) item, 0);
+            CalendarDate date = new CalendarDate(2000, ((Integer) item).intValue(), 0);
 
             SimpleDateFormat monthFormat = new SimpleDateFormat("MMMM", calendar.getLocale());
             Object itemFromFormat = monthFormat.format(date.toCalendar().getTime());
@@ -362,7 +366,7 @@ public class TerraCalendarSkin extends C
         @Override
         public void render(Object data, Button button, boolean highlighted) {
             CalendarDate date = (CalendarDate) data;
-            super.render(date.day + 1, button, highlighted);
+            super.render(new Integer(date.day + 1), button, highlighted);
 
             if (button.isSelected()) {
                 label.getStyles().put("color", button.getStyles().get("selectionColor"));
@@ -395,6 +399,7 @@ public class TerraCalendarSkin extends C
 
     private Color selectionBevelColor;
 
+    @SuppressWarnings("unused")
     public TerraCalendarSkin() {
         TerraTheme theme = (TerraTheme) Theme.getTheme();
         font = theme.getFont();
@@ -411,7 +416,7 @@ public class TerraCalendarSkin extends C
         // Create the table pane
         calendarTablePane = new TablePane();
         for (int i = 0; i < 7; i++) {
-            new TablePane.Column(calendarTablePane, 1, true);
+            new TablePane.Column(calendarTablePane, 1, true);  // note: this is useful, even if not used directly
         }
 
         // Month spinner
@@ -419,13 +424,13 @@ public class TerraCalendarSkin extends C
         monthSpinner.setSpinnerData(new NumericSpinnerData(0, 11));
         monthSpinner.setItemRenderer(new MonthSpinnerItemRenderer());
         monthSpinner.setCircular(true);
-        monthSpinner.getStyles().put("sizeToContent", true);
+        monthSpinner.getStyles().put("sizeToContent", new Boolean(true));
 
         monthSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener.Adapter() {
             @Override
             public void selectedItemChanged(Spinner spinner, Object previousSelectedItem) {
                 Calendar calendar = (Calendar) getComponent();
-                calendar.setMonth((Integer) spinner.getSelectedItem());
+                calendar.setMonth(((Integer) spinner.getSelectedItem()).intValue());
             }
         });
 
@@ -437,7 +442,7 @@ public class TerraCalendarSkin extends C
             @Override
             public void selectedItemChanged(Spinner spinner, Object previousSelectedItem) {
                 Calendar calendar = (Calendar) getComponent();
-                calendar.setYear((Integer) spinner.getSelectedItem());
+                calendar.setYear(((Integer) spinner.getSelectedItem()).intValue());
             }
         });
 
@@ -455,11 +460,11 @@ public class TerraCalendarSkin extends C
 
         // Add the month/year table pane
         TablePane monthYearTablePane = new TablePane();
-        monthYearTablePane.getStyles().put("padding", 3);
-        monthYearTablePane.getStyles().put("horizontalSpacing", 4);
+        monthYearTablePane.getStyles().put("padding", new Integer(3));
+        monthYearTablePane.getStyles().put("horizontalSpacing", new Integer(4));
 
-        new TablePane.Column(monthYearTablePane, 1, true);
-        new TablePane.Column(monthYearTablePane, -1);
+        new TablePane.Column(monthYearTablePane, 1, true);  // note: this is useful, even if not used directly
+        new TablePane.Column(monthYearTablePane, -1);  // note: this is useful, even if not used directly
 
         TablePane.Row monthYearRow = new TablePane.Row(monthYearTablePane, -1);
         monthYearRow.add(monthSpinner);

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserButtonSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserButtonSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserButtonSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraColorChooserButtonSkin.java Fri Aug  1 11:25:28 2014
@@ -168,7 +168,7 @@ public class TerraColorChooserButtonSkin
         // Create the border
         colorChooserBorder = new Border(colorChooser);
         colorChooserBorder.getStyles().put("color", borderColor);
-        colorChooserBorder.getStyles().put("padding", 2);
+        colorChooserBorder.getStyles().put("padding", new Integer(2));
 
         // Set the popup content
         colorChooserPopup.setContent(colorChooserBorder);
@@ -268,8 +268,12 @@ public class TerraColorChooserButtonSkin
         graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
 
-        graphics.setPaint(new GradientPaint(width / 2f, 0, bevelColorLocal, width / 2f,
-            height / 2f, backgroundColorLocal));
+        if (!themeIsFlat()) {
+            graphics.setPaint(new GradientPaint(width / 2f, 0, bevelColorLocal, width / 2f,
+                height / 2f, backgroundColorLocal));
+        } else {
+            graphics.setPaint(backgroundColorLocal);
+        }
         graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1, CORNER_RADIUS,
             CORNER_RADIUS));
 
@@ -294,22 +298,14 @@ public class TerraColorChooserButtonSkin
         graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
 
-        // Paint the border
-        if (borderColorLocal != null) {
-            graphics.setPaint(borderColorLocal);
-            graphics.setStroke(new BasicStroke(1));
-            graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1,
-                CORNER_RADIUS, CORNER_RADIUS));
-        }
-
-        // Paint the focus state
-        if (colorChooserButton.isFocused()) {
-            BasicStroke dashStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
-                BasicStroke.JOIN_ROUND, 1.0f, new float[] { 0.0f, 2.0f }, 0.0f);
-            graphics.setStroke(dashStroke);
-            graphics.setColor(this.borderColor);
-            graphics.draw(new RoundRectangle2D.Double(2.5, 2.5, Math.max(width - 5, 0), Math.max(
-                height - 5, 0), CORNER_RADIUS / 2, CORNER_RADIUS / 2));
+        if (!themeIsFlat()) {
+            // Paint the border
+            if (borderColorLocal != null) {
+                graphics.setPaint(borderColorLocal);
+                graphics.setStroke(new BasicStroke(1));
+                graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1,
+                    CORNER_RADIUS, CORNER_RADIUS));
+            }
         }
 
         // Paint the focus state

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java Fri Aug  1 11:25:28 2014
@@ -624,12 +624,17 @@ public class TerraScrollBarSkin extends 
         Color brightBackgroundColor = TerraTheme.brighten(backgroundColor);
 
         GradientPaint backgroundPaint;
-        if (scrollBar.getOrientation() == Orientation.HORIZONTAL) {
-            backgroundPaint = new GradientPaint(0, 1, backgroundColor, 0, DEFAULT_THICKNESS - 2,
-                brightBackgroundColor);
+        if (!themeIsFlat()) {
+            if (scrollBar.getOrientation() == Orientation.HORIZONTAL) {
+                backgroundPaint = new GradientPaint(0, 1, backgroundColor, 0, DEFAULT_THICKNESS - 2,
+                    brightBackgroundColor);
+            } else {
+                backgroundPaint = new GradientPaint(1, 0, backgroundColor, DEFAULT_THICKNESS - 2, 0,
+                    brightBackgroundColor);
+            }
         } else {
-            backgroundPaint = new GradientPaint(1, 0, backgroundColor, DEFAULT_THICKNESS - 2, 0,
-                brightBackgroundColor);
+            backgroundPaint = new GradientPaint(0, 0, backgroundColor, 0, DEFAULT_THICKNESS - 2,
+                backgroundColor);  // gradient but with the same colors
         }
 
         setBackgroundPaint(backgroundPaint);

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java Fri Aug  1 11:25:28 2014
@@ -79,16 +79,23 @@ public class TerraSliderSkin extends Sli
             int width = getWidth();
             int height = getHeight();
 
-            graphics.setPaint(new GradientPaint(width / 2f, 0, buttonBevelColor, width / 2f,
-                height, buttonBackgroundColor));
+            if (!themeIsFlat()) {
+                graphics.setPaint(new GradientPaint(width / 2f, 0, buttonBevelColor, width / 2f,
+                    height, buttonBackgroundColor));
+                
+            } else {
+                graphics.setPaint(buttonBackgroundColor);
+            }
             graphics.fillRect(0, 0, width, height);
 
             float alpha = (highlighted || dragOffset != null) ? 0.25f : 0.0f;
             graphics.setPaint(new Color(0, 0, 0, alpha));
             graphics.fillRect(0, 0, width, height);
 
-            graphics.setPaint(buttonBorderColor);
-            GraphicsUtilities.drawRect(graphics, 0, 0, width, height);
+            if (!themeIsFlat()) {
+                graphics.setPaint(buttonBorderColor);
+                GraphicsUtilities.drawRect(graphics, 0, 0, width, height);
+            }
         }
 
         @Override

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=1615070&r1=1615069&r2=1615070&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 Aug  1 11:25:28 2014
@@ -665,16 +665,21 @@ 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.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, buttonHeight + 1,
-            buttonWidth + 1, Orientation.HORIZONTAL);
+        if (!themeIsFlat()) {
+            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, buttonHeight + 1,
+                buttonWidth + 1, Orientation.HORIZONTAL);
+        } else {
+            graphics.setPaint(buttonBackgroundColor);
+            graphics.fillRect(buttonX, 0, buttonWidth, height);
+        }
     }
 
     @Override

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=1615070&r1=1615069&r2=1615070&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 Aug  1 11:25:28 2014
@@ -238,63 +238,85 @@ public class TerraTabPaneSkin extends Ta
             graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                 RenderingHints.VALUE_ANTIALIAS_ON);
 
-            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));
-                    break;
-                }
+            if (!themeIsFlat()) {
+                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));
+                        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));
-                    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));
+                        break;
+                    }
 
-                default: {
-                    break;
+                    default: {
+                        break;
+                    }
                 }
-            }
 
-            // Draw the border
-            graphics.setPaint((tabButton.isSelected() || active) ? borderColor
-                : inactiveBorderColor);
-            graphics.setStroke(new BasicStroke(1));
+                // Draw the border
+                graphics.setPaint((tabButton.isSelected() || active) ? borderColor
+                    : inactiveBorderColor);
+                graphics.setStroke(new BasicStroke(1));
 
-            switch (tabOrientation) {
-                case HORIZONTAL: {
-                    graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height
-                        + buttonCornerRadius - 1, buttonCornerRadius, buttonCornerRadius));
-                    break;
-                }
+                switch (tabOrientation) {
+                    case HORIZONTAL: {
+                        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));
-                    break;
-                }
+                    case VERTICAL: {
+                        graphics.draw(new RoundRectangle2D.Double(0.5, 0.5, width + buttonCornerRadius
+                            - 1, height - 1, buttonCornerRadius, buttonCornerRadius));
+                        break;
+                    }
 
-                default: {
-                    break;
+                    default: {
+                        break;
+                    }
                 }
-            }
 
-            if (!(tabButton.isSelected() || active)) {
-                graphics.setPaint(borderColor);
-                // Draw divider
+                if (!(tabButton.isSelected() || active)) {
+                    graphics.setPaint(borderColor);
+                    // Draw divider
+                    switch (tabOrientation) {
+                        case HORIZONTAL: {
+                            graphics.draw(new Line2D.Double(0.5, height - 0.5, width - 0.5,
+                                height - 0.5));
+                            break;
+                        }
+
+                        case VERTICAL: {
+                            graphics.draw(new Line2D.Double(width - 0.5, 0.5, width - 0.5, height - 0.5));
+                            break;
+                        }
+
+                        default: {
+                            break;
+                        }
+                    }
+                }
+            } else {
                 switch (tabOrientation) {
                     case HORIZONTAL: {
-                        graphics.draw(new Line2D.Double(0.5, height - 0.5, width - 0.5,
-                            height - 0.5));
+                        graphics.setPaint(backgroundColor);
+                        graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1
+                            + buttonCornerRadius, buttonCornerRadius, buttonCornerRadius));
                         break;
                     }
 
                     case VERTICAL: {
-                        graphics.draw(new Line2D.Double(width - 0.5, 0.5, width - 0.5, height - 0.5));
+                        graphics.setPaint(backgroundColor);
+                        graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1
+                            + buttonCornerRadius, height - 1, buttonCornerRadius, buttonCornerRadius));
                         break;
                     }
 
@@ -302,6 +324,7 @@ public class TerraTabPaneSkin extends Ta
                         break;
                     }
                 }
+
             }
 
             // Paint the content
@@ -522,7 +545,6 @@ public class TerraTabPaneSkin extends Ta
     }
 
     private Panorama tabButtonPanorama = new Panorama();
-    // private BoxPane tabButtonBoxPane = new BoxPane();
     private ButtonGroup tabButtonGroup = new ButtonGroup();
 
     private Color activeTabColor;
@@ -579,10 +601,10 @@ public class TerraTabPaneSkin extends Ta
         activeButtonBevelColor = TerraTheme.brighten(activeTabColor);
         inactiveButtonBevelColor = TerraTheme.brighten(inactiveTabColor);
 
-        tabButtonBoxPane.getStyles().put("fill", true);
+        tabButtonBoxPane.getStyles().put("fill", new Boolean(true));
 
         tabButtonPanorama.getStyles().put("buttonBackgroundColor", borderColor);
-        tabButtonPanorama.getStyles().put("buttonPadding", 6);
+        tabButtonPanorama.getStyles().put("buttonPadding", new Integer(6));
         tabButtonPanorama.setView(tabButtonBoxPane);
 
         tabButtonGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
@@ -1079,48 +1101,50 @@ public class TerraTabPaneSkin extends Ta
             graphics.fillRect(contentBounds.x, contentBounds.y, contentBounds.width,
                 contentBounds.height);
 
-            // Draw the border
-            double top = contentBounds.y + 0.5;
-            double left = contentBounds.x + 0.5;
-            double bottom = top + contentBounds.height - 1;
-            double right = left + contentBounds.width - 1;
-
-            graphics.setPaint(borderColor);
-
-            // Draw the right and bottom borders
-            graphics.draw(new Line2D.Double(right, top, right, bottom));
-            graphics.draw(new Line2D.Double(left, bottom, right, bottom));
-
-            // Draw the left and top borders
-            switch (tabOrientation) {
-                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));
-
-                    break;
-                }
-
-                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));
-
-                    break;
-                }
-
-                default: {
-                    break;
+            if (!themeIsFlat()) {
+                // Draw the border
+                double top = contentBounds.y + 0.5;
+                double left = contentBounds.x + 0.5;
+                double bottom = top + contentBounds.height - 1;
+                double right = left + contentBounds.width - 1;
+                
+                graphics.setPaint(borderColor);
+                
+                // Draw the right and bottom borders
+                graphics.draw(new Line2D.Double(right, top, right, bottom));
+                graphics.draw(new Line2D.Double(left, bottom, right, bottom));
+                
+                // Draw the left and top borders
+                switch (tabOrientation) {
+                    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));
+                        
+                        break;
+                    }
+                    
+                    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));
+                        
+                        break;
+                    }
+                    
+                    default: {
+                        break;
+                    }
                 }
             }
         }
@@ -1374,11 +1398,11 @@ public class TerraTabPaneSkin extends Ta
     }
 
     public int getButtonSpacing() {
-        return (Integer) tabButtonBoxPane.getStyles().get("spacing");
+        return ((Integer) tabButtonBoxPane.getStyles().get("spacing")).intValue();
     }
 
     public void setButtonSpacing(int buttonSpacing) {
-        tabButtonBoxPane.getStyles().put("spacing", buttonSpacing);
+        tabButtonBoxPane.getStyles().put("spacing", new Integer(buttonSpacing));
     }
 
     public final void setButtonCornerRadius(int buttonCornerRadius) {

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java?rev=1615070&r1=1615069&r2=1615070&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTextInputSkin.java Fri Aug  1 11:25:28 2014
@@ -336,9 +336,11 @@ public class TerraTextInputSkin extends 
         graphics.setColor(backgroundColorLocal);
         graphics.fillRect(0, 0, width, height);
 
-        // Paint the bevel
-        graphics.setColor(bevelColorLocal);
-        GraphicsUtilities.drawLine(graphics, 0, 0, width, Orientation.HORIZONTAL);
+        if (!themeIsFlat()) {
+            // Paint the bevel
+            graphics.setColor(bevelColorLocal);
+            GraphicsUtilities.drawLine(graphics, 0, 0, width, Orientation.HORIZONTAL);
+        }
 
         // Paint the content
         FontRenderContext fontRenderContext = Platform.getFontRenderContext();
@@ -430,9 +432,11 @@ public class TerraTextInputSkin extends 
             graphics.fill(caret);
         }
 
-        // Paint the border
-        graphics.setColor(borderColorLocal);
-        GraphicsUtilities.drawRect(graphics, 0, 0, width, height);
+        if (!themeIsFlat()) {
+            // Paint the border
+            graphics.setColor(borderColorLocal);
+            GraphicsUtilities.drawRect(graphics, 0, 0, width, height);
+        }
     }
 
     @Override