protected void superPaint(Graphics g) { super.paintComponent(g); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(image, 0, 0, null); // see javadoc for more info on the parameters }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(image, 0, 0, null); // see javadoc for more info on the parameters }
public void paintComponent(Graphics g) { super.paintComponent(g); if(img != null) { g.drawImage(img, 0, 0, null); } }
public void paintComponent(Graphics g) { super.paintComponent(g); if(img != null) { g.drawImage(img, 0, 0, null); } }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (canvas != null) { g.drawImage(canvas, 0, 0, this); } }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (canvas != null) { g.drawImage(canvas, 0, 0, this); } }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (canvas != null) { g.drawImage(canvas, 0, 0, this); } }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (canvas != null) { g.drawImage(canvas, 0, 0, this); } }
protected void paintComponent (Graphics graphics) { super.paintComponent(graphics); Graphics2D g = (Graphics2D)graphics; int width = getWidth(); int height = getHeight(); g.setColor(bgColor); g.fillRect(border, border, width - border * 2, height - border * 2); int maxKnobX = width - border - KNOB_WIDTH; int knobX = (int)((width - border * 2 - KNOB_WIDTH) * (value - sliderMin) / (sliderMax - sliderMin)) + border; g.setColor(knobColor); g.fillRect(Math.max(border, Math.min(maxKnobX, knobX)), 0, KNOB_WIDTH, height); float displayValue = (int)(value * 10) / 10f; String label = displayValue == (int)displayValue ? String.valueOf((int)displayValue) : String.valueOf(displayValue); FontMetrics metrics = g.getFontMetrics(); int labelWidth = metrics.stringWidth(label); g.setColor(Color.white); g.drawString(label, width / 2 - labelWidth / 2, height / 2 + metrics.getAscent() / 2); }
protected void paintComponent (Graphics graphics) { super.paintComponent(graphics); Graphics2D g = (Graphics2D)graphics; int width = getWidth(); int height = getHeight(); g.setColor(bgColor); g.fillRect(border, border, width - border * 2, height - border * 2); int maxKnobX = width - border - KNOB_WIDTH; int knobX = (int)((width - border * 2 - KNOB_WIDTH) * (value - sliderMin) / (sliderMax - sliderMin)) + border; g.setColor(knobColor); g.fillRect(Math.max(border, Math.min(maxKnobX, knobX)), 0, KNOB_WIDTH, height); float displayValue = (int)(value * 10) / 10f; String label = displayValue == (int)displayValue ? String.valueOf((int)displayValue) : String.valueOf(displayValue); FontMetrics metrics = g.getFontMetrics(); int labelWidth = metrics.stringWidth(label); g.setColor(Color.white); g.drawString(label, width / 2 - labelWidth / 2, height / 2 + metrics.getAscent() / 2); }
/** * Paint the component. This will be called by AWT/Swing. * * @param g The <code>Graphics</code> to draw on. */ @Override public void paintComponent(Graphics g) { super.paintComponent(g); if (vu != null) { paintVUMeter(g); } }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); BufferedImage canvas = solutionPainter.getCanvas(); if (canvas != null) { g.drawImage(canvas, 0, 0, this); } }
protected void paintComponent (Graphics graphics) { super.paintComponent(graphics); Graphics2D g = (Graphics2D)graphics; int width = getWidth() - 1;
protected void paintComponent (Graphics graphics) { super.paintComponent(graphics); Graphics2D g = (Graphics2D)graphics; int width = getWidth() - 1;
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(TangoColorFactory.ALUMINIUM_2); int lineX = HEADER_COLUMN_WIDTH + consumedDuration; g.fillRect(HEADER_COLUMN_WIDTH, 0, lineX, getHeight()); g.setColor(Color.WHITE); g.fillRect(lineX, 0, getWidth(), getHeight()); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (image == null) { painter.paintPanel(this, (Graphics2D) g); } else { painter.paintImage(this, image, (Graphics2D) g); } }
@Override public void paintComponent(Graphics g) { super.paintComponent(g); int w = getWidth(); int h = getHeight(); int div = (value * w) / maximumValue; g.setColor(getBackground()); g.fillRect(div, 0, w, h); g.setColor(getForeground()); g.fillRect(0, 0, div, h); } }
@Override public void paintComponent(Graphics g) { super.paintComponent(g); applyRenderHints(g);
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g.create(); // TODO - we should clip these to the visible lines for (SubDiagram subDiagram : subDiagrams.values()) { subDiagram.paintStates(g2, colorMap); } for (SubDiagram subDiagram : subDiagrams.values()) { subDiagram.paintArrows(g2, colorMap); } paintHighlightedComponents(g2, selectedState, new HashSet<LifelineState>()); }