@Override public void paint(Graphics g, JComponent c) { majorPos = minorPos = 0; super.paint(g, c); }
@Override public void paint( Graphics gr, JComponent c ) { Graphics2D g = (Graphics2D) gr; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); super.paint(g, c); }
@Override public void paint (Graphics g, JComponent c) { super.paint (MaterialDrawingUtils.getAliasedGraphics (g), c); }
super.paint(g, c); Rectangle r = thumbRect; thumbRect = upperThumbRect;
@Override public void paint(Graphics g, JComponent c) super.paint(g, c);
@Override public void paint(Graphics g, JComponent c) super.paint(g, c);
@Override public void paint(Graphics g, JComponent c) super.paint(g, c);
@Override public void paint(Graphics g, JComponent c) { second = false; super.paint(g, c); Rectangle clip = g.getClipBounds(); second = true; Point p = adjustThumbForHighValue(); if (clip.intersects(thumbRect)) { paintThumb(g); } restoreThumbForLowValue(p); second = false; }
/** * Paints the slider. The selected thumb is always painted on top of the * other thumb. */ @Override public void paint(Graphics g, JComponent c) { super.paint(g, c); Rectangle clipRect = g.getClipBounds(); if (upperThumbSelected) { // Paint lower thumb first, then upper thumb. if (clipRect.intersects(thumbRect)) { paintLowerThumb(g); } if (clipRect.intersects(upperThumbRect)) { paintUpperThumb(g); } } else { // Paint upper thumb first, then lower thumb. if (clipRect.intersects(upperThumbRect)) { paintUpperThumb(g); } if (clipRect.intersects(thumbRect)) { paintLowerThumb(g); } } }