Return-Path: X-Original-To: apmail-pivot-commits-archive@www.apache.org Delivered-To: apmail-pivot-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70F4992FA for ; Mon, 17 Oct 2011 08:40:39 +0000 (UTC) Received: (qmail 61892 invoked by uid 500); 17 Oct 2011 08:40:39 -0000 Delivered-To: apmail-pivot-commits-archive@pivot.apache.org Received: (qmail 61843 invoked by uid 500); 17 Oct 2011 08:40:38 -0000 Mailing-List: contact commits-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pivot.apache.org Delivered-To: mailing list commits@pivot.apache.org Received: (qmail 61833 invoked by uid 99); 17 Oct 2011 08:40:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 08:40:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 08:40:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9061C238890A for ; Mon, 17 Oct 2011 08:40:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1185041 - /pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Date: Mon, 17 Oct 2011 08:40:16 -0000 To: commits@pivot.apache.org From: noelgrandin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111017084016.9061C238890A@eris.apache.org> Author: noelgrandin Date: Mon Oct 17 08:40:16 2011 New Revision: 1185041 URL: http://svn.apache.org/viewvc?rev=1185041&view=rev Log: PIVOT-802 Introduce "inactiveBorderColor" to TabPane to allow greater flexibility for look and feel commit patch from Roger Whitcomb Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java 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=1185041&r1=1185040&r2=1185041&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 Mon Oct 17 08:40:16 2011 @@ -260,7 +260,7 @@ public class TerraTabPaneSkin extends Co } // Draw the border - graphics.setPaint(borderColor); + graphics.setPaint((tabButton.isSelected() || active) ? borderColor : inactiveBorderColor); graphics.setStroke(new BasicStroke(1)); switch(tabOrientation) { @@ -279,6 +279,7 @@ public class TerraTabPaneSkin extends Co if (!(tabButton.isSelected() || active)) { + graphics.setPaint(borderColor); // Draw divider switch(tabOrientation) { case HORIZONTAL: { @@ -507,6 +508,7 @@ public class TerraTabPaneSkin extends Co private Color activeTabColor; private Color inactiveTabColor; private Color borderColor; + private Color inactiveBorderColor; private Insets padding; private Font buttonFont; private Color buttonColor; @@ -546,6 +548,7 @@ public class TerraTabPaneSkin extends Co activeTabColor = theme.getColor(11); inactiveTabColor = theme.getColor(9); borderColor = theme.getColor(7); + inactiveBorderColor = theme.getColor(7); padding = new Insets(6); buttonFont = theme.getFont(); buttonColor = theme.getColor(1); @@ -1151,6 +1154,32 @@ public class TerraTabPaneSkin extends Co setBorderColor(theme.getColor(borderColor)); } + public Color getInactiveBorderColor() { + return inactiveBorderColor; + } + + public void setInactiveBorderColor(Color inactiveBorderColor) { + if (inactiveBorderColor == null) { + throw new IllegalArgumentException("inactiveBorderColor is null."); + } + + this.inactiveBorderColor = inactiveBorderColor; + repaintComponent(); + } + + public final void setInactiveBorderColor(String inactiveBorderColor) { + if (inactiveBorderColor == null) { + throw new IllegalArgumentException("inactiveBorderColor is null."); + } + + setInactiveBorderColor(GraphicsUtilities.decodeColor(inactiveBorderColor)); + } + + public final void setInactiveBorderColor(int inactiveBorderColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setInactiveBorderColor(theme.getColor(inactiveBorderColor)); + } + public Insets getPadding() { return padding; }