/** * {@inheritDoc} */ @Override protected PinstripePainter createTestingPainter() { return new PinstripePainter(); }
private void setupPainters() { //Tom doesnt like the gloss :) // GlossPainter gloss = new GlossPainter(new Color(1.0f, 1.0f, 1.0f, 0.2f), // GlossPainter.GlossPosition.TOP); PinstripePainter stripes = new PinstripePainter(); stripes.setPaint(new Color(1.0f, 1.0f, 1.0f, 0.17f)); stripes.setSpacing(5.0); MattePainter matte = new MattePainter(COLOR_BASE); setBackgroundPainter(new CompoundPainter(matte, stripes)); }
/** * Gets the compound painter. * * @param color * the color * @param position * the position * @param angle * the angle * @return the compound painter */ @SuppressWarnings("rawtypes") public static CompoundPainter getCompoundPainter(final Color color, final GlossPainter.GlossPosition position, final double angle) { final MattePainter mp = new MattePainter(color); final GlossPainter gp = new GlossPainter(color, position); final PinstripePainter pp = new PinstripePainter(color, angle); final CompoundPainter compoundPainter = new CompoundPainter(mp, pp, gp); return compoundPainter; }
/** * Gets a CompoundPainter object. * * @param matte * the matte color * @param gloss * the gloss color * @param position * the position * @param angle * the angle * @param pinstripe * the pinstripe painter * @return the CompoundPainter object. */ @SuppressWarnings("rawtypes") public static CompoundPainter getCompoundPainter(final Color matte, final Color gloss, final GlossPainter.GlossPosition position, final double angle, final Color pinstripe) { final MattePainter mp = new MattePainter(matte); final GlossPainter gp = new GlossPainter(gloss, position); final PinstripePainter pp = new PinstripePainter(pinstripe, angle); final CompoundPainter compoundPainter = new CompoundPainter(mp, pp, gp); return compoundPainter; }
legendColorPanel.setAlpha(.8f); PinstripePainter stripes = new PinstripePainter(); stripes.setPaint(new Color(1.0f, 1.0f, 1.0f, 0.17f)); stripes.setSpacing(5.0);