GTKGraphicsUtilspublic class GTKGraphicsUtils extends SynthGraphicsUtils
Methods Summary |
---|
public void | paintText(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, java.lang.String text, int x, int y, int mnemonicIndex)
int componentState = context.getComponentState();
if ((componentState & SynthConstants.DISABLED) ==
SynthConstants.DISABLED){
Color orgColor = g.getColor();
g.setColor(context.getStyle().getColor(context,
GTKColorType.WHITE));
x += 1;
y += 1;
super.paintText(context, g, text, x, y, mnemonicIndex);
g.setColor(orgColor);
x -= 1;
y -= 1;
super.paintText(context, g, text, x, y, mnemonicIndex);
}
else {
super.paintText(context, g, text, x, y, mnemonicIndex);
}
| public void | paintText(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, java.lang.String text, java.awt.Rectangle bounds, int mnemonicIndex)Paints text at the specified location. This will not attempt to
render the text as html nor will it offset by the insets of the
component.
Color color = g.getColor();
Region region = context.getRegion();
if ((region == Region.RADIO_BUTTON || region == Region.CHECK_BOX ||
region == Region.TABBED_PANE_TAB) &&
(context.getComponentState() & SynthConstants.FOCUSED) != 0) {
JComponent source = context.getComponent();
if (!(source instanceof AbstractButton) ||
((AbstractButton)source).isFocusPainted()) {
((GTKStyle)(context.getStyle())).getEngine(context).paintFocus(
context, g, SynthConstants.ENABLED,
"checkbutton", bounds.x - 2, bounds.y - 2,
bounds.width + 4, bounds.height + 4);
g.setColor(color);
}
}
super.paintText(context, g, text, bounds, mnemonicIndex);
|
|