diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-10-29 22:49:21 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-10-29 22:49:21 +0000 |
commit | e36d2a50b5a1a677c7ecaf926e73a5dac386c1ef (patch) | |
tree | 9649a7997f35624c829eccad8c84c84e9c8e3fb9 /javax/swing/plaf/metal/MetalSliderUI.java | |
parent | be24db70d4ff66302f560e12913f5b71acf3c12c (diff) | |
download | classpath-e36d2a50b5a1a677c7ecaf926e73a5dac386c1ef.tar.gz |
2006-10-29 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD --> generics for 2006/10/04-2006/10/29.
Diffstat (limited to 'javax/swing/plaf/metal/MetalSliderUI.java')
-rw-r--r-- | javax/swing/plaf/metal/MetalSliderUI.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/javax/swing/plaf/metal/MetalSliderUI.java b/javax/swing/plaf/metal/MetalSliderUI.java index 0f824418c..b3e8707c9 100644 --- a/javax/swing/plaf/metal/MetalSliderUI.java +++ b/javax/swing/plaf/metal/MetalSliderUI.java @@ -352,7 +352,10 @@ public class MetalSliderUI extends BasicSliderUI */ public int getTickLength() { - return tickLength + TICK_BUFFER; + int len = tickLength + TICK_BUFFER + 1; + if (slider.getOrientation() == JSlider.VERTICAL) + len += 2; + return len; } /** @@ -406,9 +409,9 @@ public class MetalSliderUI extends BasicSliderUI // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... if (slider.isEnabled()) - g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); + g.setColor(slider.getForeground()); else - g.setColor(MetalLookAndFeel.getControlDisabled()); + g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength / 2); } @@ -425,10 +428,10 @@ public class MetalSliderUI extends BasicSliderUI // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... if (slider.isEnabled()) - g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); + g.setColor(slider.getForeground()); else - g.setColor(MetalLookAndFeel.getControlDisabled()); - g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength); + g.setColor(MetalLookAndFeel.getControlShadow()); + g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength - 1); } /** @@ -444,10 +447,10 @@ public class MetalSliderUI extends BasicSliderUI // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... if (slider.isEnabled()) - g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); + g.setColor(slider.getForeground()); else - g.setColor(MetalLookAndFeel.getControlDisabled()); - g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength / 2, y); + g.setColor(MetalLookAndFeel.getControlShadow()); + g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength / 2, y); } /** @@ -463,10 +466,10 @@ public class MetalSliderUI extends BasicSliderUI // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... if (slider.isEnabled()) - g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); + g.setColor(slider.getForeground()); else - g.setColor(MetalLookAndFeel.getControlDisabled()); - g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength, y); + g.setColor(MetalLookAndFeel.getControlShadow()); + g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength, y); } } |