Widening.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2515 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2008-12-29 20:05:28 +00:00
parent 077b3be839
commit 6b21917b25
2 changed files with 6 additions and 11 deletions
@@ -183,8 +183,7 @@ public class RadialLabelSausage extends LabelSausage
} else { } else {
// render the circle // render the circle
gfx.fillOval( gfx.fillOval(x, y, closedBounds.width - 1, closedBounds.height - 1);
x, y, closedBounds.width - 1, closedBounds.height - 1);
} }
} }
@@ -193,19 +192,17 @@ public class RadialLabelSausage extends LabelSausage
*/ */
protected void paint (Graphics2D gfx, int x, int y, RadialMenu menu) protected void paint (Graphics2D gfx, int x, int y, RadialMenu menu)
{ {
paint(gfx, x, y, UIManager.getColor( paint(gfx, x, y, UIManager.getColor("RadialLabelSausage.background"), menu);
"RadialLabelSausage.background"), menu);
} }
/** Indicates whether or not this label is active. */ /** Indicates whether or not this label is active. */
protected boolean _active = false; protected boolean _active;
/** The thickness of the colored active/inactive border. */ /** The thickness of the colored active/inactive border. */
protected static final int BORDER_THICKNESS = 4; protected static final int BORDER_THICKNESS = 4;
/** The stroke to use when drawing the selected/unselected color. */ /** The stroke to use when drawing the selected/unselected color. */
protected static final Stroke BORDER_STROKE = protected static final Stroke BORDER_STROKE = new BasicStroke(BORDER_THICKNESS);
new BasicStroke(BORDER_THICKNESS);
/** The alpha level for how much we dim an inactive menu item by. */ /** The alpha level for how much we dim an inactive menu item by. */
protected static final Composite DISABLED_ALPHA = protected static final Composite DISABLED_ALPHA =
@@ -119,8 +119,7 @@ public class RadialMenuItem extends RadialLabelSausage
/** /**
* Renders this menu item at the specified location. * Renders this menu item at the specified location.
*/ */
public void render ( public void render (Component host, RadialMenu menu, Graphics2D gfx, int x, int y)
Component host, RadialMenu menu, Graphics2D gfx, int x, int y)
{ {
paint(gfx, x, y, menu); paint(gfx, x, y, menu);
} }
@@ -130,8 +129,7 @@ public class RadialMenuItem extends RadialLabelSausage
{ {
super.drawIcon(gfx, x, y, cliData); super.drawIcon(gfx, x, y, cliData);
if (predicate instanceof RadialMenu.IconPredicate) { if (predicate instanceof RadialMenu.IconPredicate) {
Icon icon = ((RadialMenu.IconPredicate) predicate).getIcon( Icon icon = ((RadialMenu.IconPredicate)predicate).getIcon((RadialMenu)cliData, this);
(RadialMenu) cliData, this);
if (icon != null) { if (icon != null) {
icon.paintIcon(null, gfx, x + _xoff, y + _yoff); icon.paintIcon(null, gfx, x + _xoff, y + _yoff);
} }