Examples of SubstanceColorScheme


Examples of org.jvnet.substance.api.SubstanceColorScheme

     */
    private void initComponents() {
        setLayout(new BorderLayout());
        setFocusable(false);

        SubstanceColorScheme borderColorScheme = SubstanceColorSchemeUtilities.getColorScheme(
                this, ColorSchemeAssociationKind.BORDER, ComponentState.DEFAULT);
        setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1,
                borderColorScheme.getDarkColor()));

        JToolBar tbHeaderBar = new JToolBar();
        tbHeaderBar.setPreferredSize(new Dimension(150, 25));

        JLabel lblCaption = new JLabel(I18n.COMMON.getString("AbstractPreviewPanel.Title"));
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

    // long millis = System.nanoTime();

    Graphics2D graphics = (Graphics2D) g.create();

    SubstanceColorScheme interpolationScheme1 = colorScheme1;
    SubstanceColorScheme interpolationScheme2 = useCyclePosAsInterpolation ? colorScheme2
        : colorScheme1;

    double cycleCoef = 1.0 - cyclePos;

    Color topFillColor = this.getTopFillColor(interpolationScheme1,
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

      SubstanceColorScheme colorScheme1,
      SubstanceColorScheme colorScheme2, float cyclePos,
      boolean hasShine, boolean useCyclePosAsInterpolation) {
    Graphics2D graphics = (Graphics2D) g.create();

    SubstanceColorScheme interpolationScheme1 = colorScheme1;
    SubstanceColorScheme interpolationScheme2 = useCyclePosAsInterpolation ? colorScheme2
        : colorScheme1;

    double cycleCoef = 1.0 - cyclePos;

    Color[] fillColors = new Color[this.fractions.length];
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

        progressBar.isEnabled() ? ComponentState.DEFAULT
            : ComponentState.DISABLED_UNSELECTED);
    g2d.setComposite(TransitionLayout.getAlphaComposite(progressBar,
        stateAlpha, g));

    SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
        .getColorScheme(progressBar,
            progressBar.isEnabled() ? ComponentState.DEFAULT
                : ComponentState.DISABLED_UNSELECTED);

    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(progressBar);
    if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
      BufferedImage back = getDeterminateBackground(progressBar,
          barRectWidth + 1, barRectHeight + 1, scheme, fillPainter,
          progressBar.getOrientation(), this.progressBar
              .getComponentOrientation());
      g2d.drawImage(back, margin, margin, null);
    } else {
      BufferedImage back = getDeterminateBackground(progressBar,
          barRectHeight + 1, barRectWidth + 1, scheme, fillPainter,
          progressBar.getOrientation(), this.progressBar
              .getComponentOrientation());
      g2d.drawImage(back, margin, margin, null);
    }

    if (amountFull > 0) {
      int borderDelta = 0;

      SubstanceColorScheme fillColorScheme = SubstanceColorSchemeUtilities
          .getColorScheme(progressBar,
              progressBar.isEnabled() ? ComponentState.SELECTED
                  : ComponentState.DISABLED_UNSELECTED);
      if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
        int barWidth = amountFull - 2 * borderDelta;
 
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

   *
   * @see javax.swing.plaf.basic.BasicProgressBarUI#getSelectionBackground()
   */
  @Override
  protected Color getSelectionBackground() {
    SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
        .getColorScheme(progressBar,
            progressBar.isEnabled() ? ComponentState.DEFAULT
                : ComponentState.DISABLED_UNSELECTED);
    return SubstanceColorUtilities.getForegroundColor(scheme);
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

   *
   * @see javax.swing.plaf.basic.BasicProgressBarUI#getSelectionForeground()
   */
  @Override
  protected Color getSelectionForeground() {
    SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
        .getColorScheme(progressBar,
            progressBar.isEnabled() ? ComponentState.SELECTED
                : ComponentState.DISABLED_UNSELECTED);
    return SubstanceColorUtilities.getForegroundColor(scheme);
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

        progressBar.isEnabled() ? ComponentState.SELECTED
            : ComponentState.DISABLED_UNSELECTED);
    g2d.setComposite(TransitionLayout.getAlphaComposite(progressBar,
        stateAlpha, g));

    SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
        .getColorScheme(progressBar,
            progressBar.isEnabled() ? ComponentState.SELECTED
                : ComponentState.DISABLED_UNSELECTED);
    if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
      SubstanceImageCreator.paintRectangularStripedBackground(
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

  private boolean drawWatermarkImage(SubstanceSkin skin, Graphics2D graphics,
      int x, int y, int width, int height, boolean isPreview) {
    Color stampColorDark = null;
    Color stampColorAll = null;
    Color stampColorLight = null;
    SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
    if (isPreview) {
      stampColorDark = scheme.isDark() ? Color.white : Color.black;
      stampColorAll = Color.lightGray;
      stampColorLight = scheme.isDark() ? Color.black : Color.white;
    } else {
      stampColorDark = scheme.getWatermarkDarkColor();
      stampColorAll = scheme.getWatermarkStampColor();
      stampColorLight = scheme.getWatermarkLightColor();
    }

    graphics.setColor(stampColorAll);
    graphics.fillRect(0, 0, width, height);
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

   * @return Noise image.
   */
  public static BufferedImage getNoiseImage(SubstanceSkin skin, int width,
      int height, double xFactor, double yFactor, boolean hasConstantZ,
      boolean toBlur, boolean isPreview) {
    SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
    Color c1 = scheme.getWatermarkDarkColor();
    // c1 = new Color(255, 0, 0, 0);
    // System.out.println(c1.getAlpha());
    // Color c2 = scheme.getWatermarkStampColor();
    Color c3 = scheme.getWatermarkLightColor();

    BufferedImage dst = SubstanceCoreUtilities.getBlankImage(width, height);
    //     
    // new BufferedImage(width, height,
    // BufferedImage.TYPE_INT_ARGB);
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceColorScheme

   * @return Indication whether the draw succeeded.
   */
  private boolean drawWatermarkImage(SubstanceSkin skin, Graphics2D graphics,
      int x, int y, int width, int height, boolean isPreview) {
    Color stampColor = null;
    SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
    if (isPreview)
      stampColor = scheme.isDark() ? Color.lightGray : Color.darkGray;
    else {
      stampColor = scheme.getWatermarkStampColor();
    }

    graphics.setColor(stampColor);
    for (int row = y; row < (y + height); row += 2) {
      graphics.drawLine(x, row, x + width, row);
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.