summaryrefslogtreecommitdiff
path: root/javax/swing/plaf
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/plaf')
-rw-r--r--javax/swing/plaf/basic/BasicButtonListener.java8
-rw-r--r--javax/swing/plaf/basic/BasicMenuItemUI.java9
-rw-r--r--javax/swing/plaf/metal/MetalLookAndFeel.java12
3 files changed, 22 insertions, 7 deletions
diff --git a/javax/swing/plaf/basic/BasicButtonListener.java b/javax/swing/plaf/basic/BasicButtonListener.java
index fe0365a50..3b4759ae4 100644
--- a/javax/swing/plaf/basic/BasicButtonListener.java
+++ b/javax/swing/plaf/basic/BasicButtonListener.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing.plaf.basic;
+import gnu.classpath.SystemProperties;
+
import java.awt.event.ActionEvent;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
@@ -71,8 +73,10 @@ public class BasicButtonListener implements MouseListener, MouseMotionListener,
// Store the TextLayout for this in a client property for speed-up
// painting of the label.
String property = e.getPropertyName();
- if (property.equals(AbstractButton.TEXT_CHANGED_PROPERTY)
- || property.equals("font"))
+ if ((property.equals(AbstractButton.TEXT_CHANGED_PROPERTY)
+ || property.equals("font"))
+ && SystemProperties.getProperty("gnu.javax.swing.noGraphics2D")
+ == null)
{
AbstractButton b = (AbstractButton) e.getSource();
String text = b.getText();
diff --git a/javax/swing/plaf/basic/BasicMenuItemUI.java b/javax/swing/plaf/basic/BasicMenuItemUI.java
index c5ed2ff7e..bbc08535c 100644
--- a/javax/swing/plaf/basic/BasicMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicMenuItemUI.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing.plaf.basic;
+import gnu.classpath.SystemProperties;
+
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
@@ -256,8 +258,11 @@ public class BasicMenuItemUI extends MenuItemUI
map.put(accelerator, "doClick");
}
// TextLayout caching for speed-up drawing of text.
- else if (property.equals(AbstractButton.TEXT_CHANGED_PROPERTY)
- || property.equals("font"))
+ else if ((property.equals(AbstractButton.TEXT_CHANGED_PROPERTY)
+ || property.equals("font"))
+ && SystemProperties.getProperty("gnu.javax.swing.noGraphics2D")
+ == null)
+
{
AbstractButton b = (AbstractButton) e.getSource();
String text = b.getText();
diff --git a/javax/swing/plaf/metal/MetalLookAndFeel.java b/javax/swing/plaf/metal/MetalLookAndFeel.java
index b496a2b0e..da16159c9 100644
--- a/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -1185,20 +1185,26 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"SplitPaneDivider.draggingColor", Color.DARK_GRAY,
"TabbedPane.background", getControlShadow(),
+ "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
+ "TabbedPane.contentOpaque", Boolean.TRUE,
"TabbedPane.darkShadow", getControlDarkShadow(),
"TabbedPane.focus", getPrimaryControlDarkShadow(),
"TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12),
"TabbedPane.foreground", getControlTextColor(),
"TabbedPane.highlight", getControlHighlight(),
"TabbedPane.light", getControl(),
- "TabbedPane.selected", getControl(),
+ "TabbedPane.selected", getControl(), // overridden in OceanTheme
"TabbedPane.selectHighlight", getControlHighlight(),
"TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
"TabbedPane.shadow", getControlShadow(),
- "TabbedPane.tabAreaBackground", getControl(),
- "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6),
+ "TabbedPane.tabAreaBackground", getControl(), // overridden in OceanTheme
+ "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), // dito
"TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9),
+ // new properties in OceanTheme:
+ // TabbedPane.contentAreaColor
+ // TabbedPane.unselectedBackground
+
"Table.background", getWindowBackground(),
"Table.focusCellBackground", getWindowBackground(),
"Table.focusCellForeground", getControlTextColor(),