Examples of SubstanceBorderPainter


Examples of org.jvnet.substance.painter.border.SubstanceBorderPainter

        "Office Silver 2007 Outer", new float[] { 0.0f, 0.5f, 1.0f },
        new ColorSchemeSingleColorQuery[] {
            ColorSchemeSingleColorQuery.LIGHT,
            ColorSchemeSingleColorQuery.ULTRADARK,
            ColorSchemeSingleColorQuery.MID });
    SubstanceBorderPainter innerBorderPainter = new DelegateFractionBasedBorderPainter(
        "Office Silver 2007 Inner", outerBorderPainter, new int[] {
            0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF },
        new ColorSchemeTransform() {
          @Override
          public SubstanceColorScheme transform(
View Full Code Here

Examples of org.jvnet.substance.painter.border.SubstanceBorderPainter

        / UIManager.getInt("ProgressBar.cycleTime");

    float borderThickness = SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(this.progressBar));
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(this.progressBar);
    this.margin = borderPainter.isPaintingInnerContour() ? (int) Math
        .ceil(2.0 * borderThickness) : (int) Math
        .ceil(1.5 * borderThickness);
  }
 
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

   * @see SubstanceSkin#getBorderPainter()
   * @see SubstanceSkin#getHighlightBorderPainter()
   */
  public static SubstanceBorderPainter getHighlightBorderPainter(
      Component comp) {
    SubstanceBorderPainter result = SubstanceCoreUtilities.getSkin(comp)
        .getHighlightBorderPainter();
    if (result != null)
      return result;
    return getBorderPainter(comp);
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

  public static void paintBorder(Component c, Graphics2D graphics, int x,
      int y, int width, int height, float radius,
      SubstanceColorScheme borderScheme1,
      SubstanceColorScheme borderScheme2, float cyclePos) {

    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(c);
    graphics.translate(x, y);
    int componentFontSize = SubstanceSizeUtils.getComponentFontSize(c);
    int borderDelta = (int) Math.floor(SubstanceSizeUtils
        .getBorderStrokeWidth(componentFontSize) / 2.0);
    Shape contour = SubstanceOutlineUtilities.getBaseOutline(width, height,
        radius, null, borderDelta);
    int borderThickness = (int) SubstanceSizeUtils
        .getBorderStrokeWidth(componentFontSize);
    GeneralPath contourInner = (c instanceof JTextComponent) ? null
        : SubstanceOutlineUtilities.getBaseOutline(width, height,
            radius - borderThickness, null, borderThickness
                + borderDelta);
    borderPainter.paintBorder(graphics, c, width, height, contour,
        contourInner, borderScheme1, borderScheme2, cyclePos,
        borderScheme1 != borderScheme2);
    graphics.translate(-x, -y);
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

    dotGraphics.setColor(markColor2);
    dotGraphics.fillOval(0, 0, bumpDotDiameter, bumpDotDiameter);

    dotGraphics.setComposite(AlphaComposite.getInstance(
        AlphaComposite.SRC_OVER, 0.4f));
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(divider);
    borderPainter.paintBorder(dotGraphics, divider, width, height,
        new Ellipse2D.Float(0, 0, bumpDotDiameter - 1,
            bumpDotDiameter - 1), null, colorScheme1, colorScheme2,
        interpolationCyclePos, colorScheme1 != colorScheme2);

    graphics.setComposite(TransitionLayout.getAlphaComposite(divider, 0.8f,
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(button);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(button);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(button);

    BufferedImage bgImage = getFullAlphaBackground(button, button
        .getModel(), shaper, fillPainter, borderPainter, width, height);
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

    int fontSize = SubstanceSizeUtils.getComponentFontSize(button);
    int checkMarkSize = SubstanceSizeUtils.getCheckBoxMarkSize(fontSize);

    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(button);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(button);

    // System.out.println(prevState + " -> [" + cyclePos + "] " +
    // currState);
    // System.out.println("\t" + prevBorderColorScheme.getDisplayName()
    // + " -> " + currBorderColorScheme.getDisplayName());

    HashMapKey key = SubstanceCoreUtilities.getHashKey(fontSize,
        checkMarkSize, currState.name(), prevState.name(), fillPainter
            .getDisplayName(), borderPainter.getDisplayName(),
        currFillColorScheme.getDisplayName(), prevFillColorScheme
            .getDisplayName(),
        currMarkColorScheme.getDisplayName(), prevMarkColorScheme
            .getDisplayName(), currBorderColorScheme
            .getDisplayName(), prevBorderColorScheme
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

      SubstanceColorScheme colorScheme2,
      SubstanceColorScheme borderScheme,
      SubstanceColorScheme borderScheme2, boolean paintOnlyBorder) {
    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);

    int borderDelta = (int) Math.ceil(2.0 * SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(tabPane)));
    int borderInsets = (int) Math.floor(SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(tabPane)) / 2.0);
    int dy = 2 + borderDelta;
    Set<Side> straightSides = EnumSet.of(Side.BOTTOM);

    int cornerRadius = height / 3;
    if (shaper instanceof ClassicButtonShaper) {
      cornerRadius = (int) SubstanceSizeUtils
          .getClassicButtonCornerRadius(SubstanceSizeUtils
              .getComponentFontSize(tabPane));
      if ((tabPlacement == TOP) || (tabPlacement == BOTTOM))
        width -= 1;
      else
        height -= 1;
    }

    GeneralPath contour = SubstanceOutlineUtilities.getBaseOutline(width,
        height + dy, cornerRadius, straightSides, borderInsets);

    BufferedImage result = SubstanceCoreUtilities.getBlankImage(width,
        height);
    Graphics2D resGraphics = result.createGraphics();

    if (!paintOnlyBorder) {
      fillPainter.paintContourBackground(resGraphics, tabPane, width,
          height + dy, contour, false, colorScheme, colorScheme2,
          cyclePos, true, colorScheme != colorScheme2);
    }

    int borderThickness = (int) SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(tabPane));
    GeneralPath contourInner = borderPainter.isPaintingInnerContour() ? SubstanceOutlineUtilities
        .getBaseOutline(width, height + dy, cornerRadius
            - borderThickness, straightSides, borderThickness
            + borderInsets)
        : null;

    borderPainter.paintBorder(resGraphics, tabPane, width, height + dy,
        contour, contourInner, borderScheme, borderScheme2, cyclePos,
        borderScheme != borderScheme2);

    resGraphics.dispose();
    return result;
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

      SubstanceColorScheme borderScheme,
      SubstanceColorScheme borderScheme2) {

    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);
    Component compForBackground = tabPane.getTabComponentAt(tabIndex);
    if (compForBackground == null)
      compForBackground = tabPane.getComponentAt(tabIndex);
    if (compForBackground == null)
      compForBackground = tabPane;
    Color tabColor = compForBackground.getBackground();
    HashMapKey key = SubstanceCoreUtilities.getHashKey(width, height,
        isSelected, cyclePos, tabPlacement, fillPainter
            .getDisplayName(), borderPainter.getDisplayName(),
        shaper.getDisplayName(), tabPlacement == SwingConstants.BOTTOM,
        side.name(), colorScheme.getDisplayName(), colorScheme2
            .getDisplayName(), borderScheme.getDisplayName(),
        borderScheme2.getDisplayName(), tabColor);
View Full Code Here

Examples of org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter

            width, height, 1, null);
        fillPainter.paintContourBackground(finalGraphics, tabPane,
            width, height, contour, false, fillScheme, fillScheme2,
            cyclePos, true, fillScheme != fillScheme2);
        // finalGraphics.drawImage(background, 0, 0, null);
        SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
            .getBorderPainter(tabPane);
        finalGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
        borderPainter.paintBorder(finalGraphics, tabPane, width,
            height, contour, null, markScheme, markScheme2,
            cyclePos, markScheme != markScheme2);
      }

      finalGraphics.setStroke(new BasicStroke(SubstanceSizeUtils
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.