/** * 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); }
private void paintDragDivider(Graphics g, int x, int y, int w, int h) { SynthContext context = getContext(splitPane, Region.SPLIT_PANE_DIVIDER); context.setComponentState(((context.getComponentState() | MOUSE_OVER) ^ MOUSE_OVER) | PRESSED); Shape oldClip = g.getClip(); g.clipRect(x, y, w, h); context .getPainter() .paintSplitPaneDragDivider(context, g, x, y, w, h, splitPane.getOrientation()); g.setClip(oldClip); context.dispose(); }
@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); }
void paintBackground(SynthContext context, Graphics g, JComponent c) { context.getPainter().paintEditorPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight()); }
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) { context.getPainter().paintPasswordFieldBorder(context, g, x, y, w, h); }
void paintBackground(SynthContext context, Graphics g, JComponent c) { context .getPainter() .paintPasswordFieldBackground(context, g, 0, 0, c.getWidth(), c.getHeight()); }
void paintBackground(SynthContext context, Graphics g, JComponent c) { if (((AbstractButton) c).isContentAreaFilled()) { context.getPainter().paintButtonBackground(context, g, 0, 0, c.getWidth(), c.getHeight()); } }
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) { context.getPainter().paintRadioButtonMenuItemBorder(context, g, x, y, w, h); }
void paintBackground(SynthContext context, Graphics g, JComponent c) { context .getPainter() .paintRadioButtonMenuItemBackground(context, g, 0, 0, c.getWidth(), c.getHeight()); }
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) { context.getPainter().paintEditorPaneBorder(context, g, x, y, w, h); }