Package org.jvnet.substance.api

Examples of org.jvnet.substance.api.SubstanceColorScheme


    graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
    graphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
        RenderingHints.VALUE_STROKE_NORMALIZE);

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

    double cycleCoef = 1.0 - cyclePos;

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


    graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
    graphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
        RenderingHints.VALUE_STROKE_NORMALIZE);

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

    double cycleCoef = 1.0 - cyclePos;

    Color topBorderColor = getTopBorderColor(interpolationScheme1,
View Full Code Here

  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

          .getPasswordDotDiameter(fontSize);
      int dotGap = SubstanceSizeUtils.getPasswordDotGap(fontSize);
      ComponentState state = // isSelected ? ComponentState.SELECTED
      (field.isEnabled() ? ComponentState.DEFAULT
          : ComponentState.DISABLED_UNSELECTED);
      SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
          .getColorScheme(field, state);
      Color topColor = isSelected ? scheme.getSelectionForegroundColor()
          : SubstanceColorUtilities.getForegroundColor(scheme);
      Color bottomColor = topColor.brighter();
      graphics.setPaint(new GradientPaint(x, y - dotDiameter, topColor,
          x, y, bottomColor));
      int echoPerChar = SubstanceCoreUtilities.getEchoPerChar(field);
View Full Code Here

   * @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

   *            Indication whether the result is a preview image.
   * @return Indication whether the draw succeeded.
   */
  private boolean drawWatermarkImage(SubstanceSkin skin, Graphics2D graphics,
      int x, int y, int width, int height, boolean isPreview) {
    SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
    if (isPreview) {
      graphics.drawImage(NoiseFactory.getNoiseImage(skin, width, height,
          this.xFactor, this.yFactor, this.hasConstantZ,
          this.noiseFilter, this.toBlur, true), x, y, null);
    } else {
      int alpha = scheme.isDark() ? 200 : 140;
      graphics.setComposite(AlphaComposite.getInstance(
          AlphaComposite.SRC_OVER, alpha / 255.0f));
      graphics.drawImage(NoiseFactory.getNoiseImage(skin, width, height,
          this.xFactor, this.yFactor, this.hasConstantZ,
          this.noiseFilter, this.toBlur, false), x, y, null);
View Full Code Here

    // 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

    HashMapKey key = SubstanceCoreUtilities.getHashKey(orig
        .getDisplayName(), backgroundShiftColor == null ? ""
        : backgroundShiftColor.getRGB(), backgroundShiftFactor,
        foregroundShiftColor == null ? "" : foregroundShiftColor
            .getRGB(), foregroundShiftFactor);
    SubstanceColorScheme result = shiftedCache.get(key);
    if (result == null) {
      result = orig.shift(backgroundShiftColor, backgroundShiftFactor,
          foregroundShiftColor, foregroundShiftFactor);
      shiftedCache.put(key, result);
    }
View Full Code Here

      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

      labelsList.add(key);
      labelsList.add(bundle.getObject(key));
    }
    if (this.hasQuaquaColorChooser) {
      SubstanceSkin skin = (SubstanceSkin) mSkin;
      final SubstanceColorScheme colorScheme = skin
          .getMainActiveColorScheme(DecorationAreaType.NONE);
      InsetsUIResource visualMargin = new InsetsUIResource(0, 0, 0, 0);
      Color foregroundColor = new ColorUIResource(colorScheme
          .getForegroundColor());
      Object[] mainDefaults = new Object[] {
          // quaqua
          "Slider.upThumbSmall",
          new UIDefaults.LazyValue() {
View Full Code Here

TOP

Related Classes of org.jvnet.substance.api.SubstanceColorScheme

Copyright © 2018 www.massapicom. 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.