BluecurveStylepublic class BluecurveStyle extends GTKStyle implements GTKConstants
Fields Summary |
---|
private static final GTKEngine | BLUECURVE_ENGINEThere should only ever be one pixmap engine. | private static final Color | DEFAULT_COLOR | private Color[] | blueColorsColors specific to blue curve. These don't appear to be specific
to a state, hence they are stored here. |
Constructors Summary |
---|
public BluecurveStyle(DefaultSynthStyle style)Creates a duplicate of the passed in style.
super(style);
| public BluecurveStyle(StateInfo[] states, CircularIdentityList classSpecificValues, Font font, int xThickness, int yThickness, GTKStockIconInfo[] icons)Creates a PixmapStyle from the passed in arguments.
super(states, classSpecificValues, font, xThickness, yThickness,icons);
|
Methods Summary |
---|
public sun.swing.plaf.synth.DefaultSynthStyle | addTo(sun.swing.plaf.synth.DefaultSynthStyle s)Adds the state of this PixmapStyle to that of s
returning a combined SynthStyle.
if (!(s instanceof BluecurveStyle)) {
s = new BluecurveStyle(s);
}
BluecurveStyle style = (BluecurveStyle)super.addTo(s);
return style;
| public java.lang.Object | clone()Creates a copy of the reciever and returns it.
return super.clone();
| java.awt.Color | getDefaultColor(javax.swing.JComponent c, javax.swing.plaf.synth.Region id, int state, javax.swing.plaf.synth.ColorType type)
int colorID = type.getID();
if (colorID >= BluecurveColorType.MIN_ID &&
colorID <= BluecurveColorType.MAX_ID) {
if (blueColors == null) {
int min = BluecurveColorType.MIN_ID;
Color base = getGTKColor(c, id, SynthConstants.SELECTED,
GTKColorType.TEXT_BACKGROUND);
Color bg = getGTKColor(c, id, SynthConstants.ENABLED,
GTKColorType.BACKGROUND);
blueColors = new Color[BluecurveColorType.MAX_ID - min + 1];
blueColors[BluecurveColorType.OUTER.getID() - min] =
GTKColorType.adjustColor(base, 1.0f, .72f, .7f);
blueColors[BluecurveColorType.INNER_LEFT.getID() - min] =
GTKColorType.adjustColor(base, 1.0f, 1.63f, 1.53f);
blueColors[BluecurveColorType.TOP_GRADIENT.getID() - min] =
GTKColorType.adjustColor(base, 1.0f, .93f, .88f);
blueColors[BluecurveColorType.BOTTOM_GRADIENT.getID() - min] =
GTKColorType.adjustColor(base, 1f, 1.16f,1.13f);
blueColors[BluecurveColorType.INNER_RIGHT.getID() - min] =
GTKColorType.adjustColor(base, 1.0f, 1.06f, 1.08f);
blueColors[BluecurveColorType.OUTER2.getID() - min] =
GTKColorType.adjustColor(bg, 1.0f, .67f, .67f);
blueColors[BluecurveColorType.INNER_RIGHT2.getID() - min] =
GTKColorType.adjustColor(bg, 1.0f, .92f, .92f);
blueColors[BluecurveColorType.OUTER3.getID() - min] =
GTKColorType.adjustColor(bg, 1.0f, .4f, .4f);
blueColors[BluecurveColorType.OUTER4.getID() - min] =
GTKColorType.adjustColor(bg, 1.0f, .84f, .84f);
blueColors[BluecurveColorType.OUTER5.getID() - min] =
GTKColorType.adjustColor(bg, 1.0f, .245f, .192f);
}
return blueColors[colorID - BluecurveColorType.MIN_ID];
}
return super.getDefaultColor(c, id, state, type);
| public com.sun.java.swing.plaf.gtk.GTKEngine | getEngine(javax.swing.plaf.synth.SynthContext context)Returns a GTKEngine to use for rendering.
return BLUECURVE_ENGINE;
| public java.lang.String | toString()
StringBuffer buf = new StringBuffer(super.toString());
if (blueColors != null) {
buf.append("\t" + BluecurveColorType.OUTER + "=" +
blueColors[BluecurveColorType.OUTER.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.INNER_LEFT + "=" +
blueColors[BluecurveColorType.INNER_LEFT.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.INNER_RIGHT + "=" +
blueColors[BluecurveColorType.INNER_RIGHT.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.TOP_GRADIENT + "=" +
blueColors[BluecurveColorType.TOP_GRADIENT.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.BOTTOM_GRADIENT + "=" +
blueColors[BluecurveColorType.BOTTOM_GRADIENT.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.OUTER2 + "=" +
blueColors[BluecurveColorType.OUTER2.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.INNER_RIGHT2 + "=" +
blueColors[BluecurveColorType.INNER_RIGHT2.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.OUTER3 + "=" +
blueColors[BluecurveColorType.OUTER3.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.OUTER4 + "=" +
blueColors[BluecurveColorType.OUTER4.getID() -
BluecurveColorType.MIN_ID] + "\n");
buf.append("\t" + BluecurveColorType.OUTER5 + "=" +
blueColors[BluecurveColorType.OUTER5.getID() -
BluecurveColorType.MIN_ID] + "\n");
}
return buf.toString();
|
|