Exemplo n.º 1
0
  /**
   * Paints the specified component.
   *
   * @param context context for the component being painted
   * @param g the {@code Graphics} object used for painting
   * @see #update(Graphics,JComponent)
   */
  protected void paint(SynthContext context, Graphics g) {
    AbstractButton b = (AbstractButton) context.getComponent();

    g.setColor(context.getStyle().getColor(context, ColorType.TEXT_FOREGROUND));
    g.setFont(style.getFont(context));
    context
        .getStyle()
        .getGraphicsUtils(context)
        .paintText(
            context,
            g,
            b.getText(),
            getIcon(b),
            b.getHorizontalAlignment(),
            b.getVerticalAlignment(),
            b.getHorizontalTextPosition(),
            b.getVerticalTextPosition(),
            b.getIconTextGap(),
            b.getDisplayedMnemonicIndex(),
            getTextShiftOffset(context));
  }