/**
   * 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);
 }
Beispiel #3
0
 /** @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);
 }
 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().paintEditorPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
 }
 void paintBackground(SynthContext context, Graphics g, JComponent c) {
   context
       .getPainter()
       .paintPasswordFieldBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
 }
Beispiel #7
0
 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);
 }