Exemplo n.º 1
0
  /**
   * 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);
  }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 @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);
 }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
0
 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());
 }
Exemplo n.º 8
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());
 }
Exemplo n.º 11
0
 public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
   context.getPainter().paintEditorPaneBorder(context, g, x, y, w, h);
 }