コード例 #1
0
  /*
   * (non-Javadoc)
   *
   * @seeorg.jvnet.flamingo.common.ui.BasicCommandButtonUI#
   * paintButtonVerticalSeparator(java.awt.Graphics, int)
   */
  @Override
  protected void paintButtonVerticalSeparator(Graphics graphics, Rectangle separatorArea) {
    Graphics2D g2d = (Graphics2D) graphics.create();
    g2d.translate(separatorArea.x, 0);

    SubstanceColorScheme colorScheme =
        SubstanceColorSchemeUtilities.getColorScheme(
            this.commandButton,
            ColorSchemeAssociationKind.SEPARATOR,
            ComponentState.getState(this.commandButton.getActionModel(), this.commandButton));

    float fadeAlpha = this.getSeparatorAlpha();
    g2d.setComposite(AlphaComposite.SrcOver.derive(fadeAlpha));

    SeparatorPainterUtils.paintSeparator(
        this.commandButton,
        g2d,
        colorScheme,
        1,
        this.commandButton.getHeight(),
        JSlider.VERTICAL,
        true,
        4,
        4,
        true);

    g2d.dispose();
  }