/** * Notifies this UI delegate to repaint the specified component. This method paints the component * background, then calls the {@link #paint(SynthContext,Graphics)} method. * * <p>In general, this method does not need to be overridden by subclasses. All Look and Feel * rendering code should reside in the {@code paint} method. * * @param g the {@code Graphics} object used for painting * @param c the component being painted * @see #paint(SynthContext,Graphics) */ @Override public void update(Graphics g, JComponent c) { SynthContext context = getContext(c); SynthLookAndFeel.update(context, g); context.getPainter().paintScrollPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight()); paint(context, g); }
@Override public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { JComponent jc = (JComponent) c; SynthContext context = getContext(jc); SynthStyle style = context.getStyle(); if (style == null) { assert false : "SynthBorder is being used outside after the " + " UI has been uninstalled"; return; } context.getPainter().paintViewportBorder(context, g, x, y, width, height); }
/** @inheritDoc */ @Override public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) { context.getPainter().paintListBorder(context, g, x, y, w, h); }