### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java,v retrieving revision 1.118 diff -u -r1.118 CTabItem.java --- Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java 1 Jul 2009 14:49:33 -0000 1.118 +++ Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java 11 Jul 2009 23:05:15 -0000 @@ -44,6 +44,7 @@ // Appearance Font font; + Color foreground; Image disabledImage; Rectangle closeRect = new Rectangle(0, 0, 0, 0); @@ -663,7 +664,7 @@ Point extent = gc.textExtent(shortenedText, FLAGS); int textY = y + (height - extent.y) / 2; textY += parent.onBottom ? -1 : 1; - gc.setForeground(parent.getForeground()); + gc.setForeground(foreground == null ? parent.getForeground() : foreground); gc.drawText(shortenedText, xDraw, textY, FLAGS); gc.setFont(gcFont); } @@ -735,6 +736,22 @@ return parent.getFont(); } /** + * Returns the foreground color that the receiver will use to draw. + * + * @return the receiver's foreground color + * + * @exception SWTException
CTabFolder
.
*
* @return the receiver's parent
@@ -953,6 +970,37 @@
parent.redrawTabs();
}
}
+/**
+ * Sets the receiver's foreground color to the color specified
+ * by the argument, or to the default system color for the item
+ * if the argument is null.
+ *
+ * @param color the new color (or null)
+ *
+ * @exception IllegalArgumentException