// FIXME: overridden to avoid blitting public void fillAndDrawSymbol(double x, double y, double size, int symbol, Color fillColor) { Color color = getColor(); setColor(fillColor); super.fillSymbol(x, y, size, symbol); setColor(color); super.drawSymbol(x, y, size, symbol); }
protected void setHostGraphics(Graphics graphics) { hostGraphics = (Graphics2D) graphics; resolution = (graphics instanceof PrinterGraphics) ? 0 : 1; tagHandler = new GenericTagHandler(hostGraphics); super.setBackground(hostGraphics.getBackground()); super.setColor(hostGraphics.getColor()); super.setPaint(hostGraphics.getPaint()); super.setFont(hostGraphics.getFont()); Stroke s = hostGraphics.getStroke(); if (s instanceof BasicStroke) { lineWidth = ((BasicStroke) s).getLineWidth(); } webColor = WebColor.create(getColor()); setRenderingHint(KEY_SYMBOL_BLIT, VALUE_SYMBOL_BLIT_ON); }
public void setColor(Color color) { if (color == null) return; if (color.equals(getColor())) return; super.setColor(color); hostGraphics.setColor(getPrintColor(color)); webColor = WebColor.create(color); }
public void setFont(Font font) { if (font == null) return; super.setFont(font); if (font.getName().equals("Symbol") || font.getName().equals("ZapfDingbats")) { Font newFont = new Font("Serif", font.getSize(), font.getStyle()); font = newFont.deriveFont(font.getSize2D()); } hostGraphics.setFont(font); }
public void setPaint(Paint paint) { if (paint == null) return; if (paint.equals(getPaint())) return; if (paint instanceof Color) { setColor((Color) paint); } else { super.setPaint(paint); hostGraphics.setPaint(paint); } }
public void fillSymbol(double x, double y, double size, int symbol) { if (size <= 0) return; int intSize = (int) Math.ceil(size); if ((intSize > MAX_BLIT_SIZE) || (lineWidth != 1.0) || !isDisplayLocal() || (getRenderingHint(RenderingHints.KEY_ANTIALIASING) == RenderingHints.VALUE_ANTIALIAS_ON) || (getRenderingHint(KEY_SYMBOL_BLIT) == VALUE_SYMBOL_BLIT_OFF)) { super.fillSymbol(x, y, size, symbol); return; } blitSymbol(x, y, intSize, symbol, true); }
public void setBackground(Color color) { super.setBackground(color); hostGraphics.setBackground(getPrintColor(color)); }
public void setLineWidth(double width) { super.setLineWidth(width); lineWidth = width; }