Package org.jvnet.substance.api

Examples of org.jvnet.substance.api.SubstanceColorScheme


   *
   * @see org.jvnet.lafwidget.LafWidgetSupport#getNumberIcon(int)
   */
  @Override
  public Icon getNumberIcon(int number) {
    SubstanceColorScheme colorScheme = SubstanceLookAndFeel.getCurrentSkin(
        null).getMainActiveColorScheme(DecorationAreaType.HEADER);
    return SubstanceImageCreator.getHexaMarker(number, colorScheme);
  }
View Full Code Here


  @Override
  public void paintPasswordStrengthMarker(Graphics g, int x, int y,
      int width, int height, PasswordStrength pStrength) {
    Graphics2D g2 = (Graphics2D) g.create();

    SubstanceColorScheme colorScheme = null;

    if (pStrength == PasswordStrength.WEAK)
      colorScheme = SubstanceColorSchemeUtilities.ORANGE;
    if (pStrength == PasswordStrength.MEDIUM)
      colorScheme = SubstanceColorSchemeUtilities.YELLOW;
View Full Code Here

    if (menuItem.getParent() instanceof JPopupMenu) {
      if (menuItem.getComponentOrientation().isLeftToRight()) {
        MenuGutterFillKind fillKind = SubstanceCoreUtilities
            .getMenuGutterFillKind();
        if (fillKind != MenuGutterFillKind.NONE) {
          SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
              .getColorScheme(menuItem, ComponentState.DEFAULT);
          Color leftColor = ((fillKind == MenuGutterFillKind.SOFT_FILL) || (fillKind == MenuGutterFillKind.HARD)) ? scheme
              .getUltraLightColor()
              : scheme.getLightColor();
          Color rightColor = ((fillKind == MenuGutterFillKind.SOFT_FILL) || (fillKind == MenuGutterFillKind.SOFT)) ? scheme
              .getUltraLightColor()
              : scheme.getLightColor();
          LinearGradientPaint gp = new LinearGradientPaint(0, 0,
              textOffset, 0, new float[] { 0.0f, 1.0f },
              new Color[] { leftColor, rightColor },
              CycleMethod.REPEAT);
          graphics.setComposite(TransitionLayout.getAlphaComposite(
              menuItem, 0.7f, g));

          // System.out.println(menuItem.getText()
          // + "["
          // + menuItem.isEnabled()
          // + "] : "
          // + ((AlphaComposite) graphics.getComposite())
          // .getAlpha() + ", " + leftColor + "->"
          // + rightColor);
          //
          graphics.setPaint(gp);
          graphics.fillRect(0, 0, textOffset - 2, menuHeight);
        }
      } else {
        // fix for defect 125 - support of RTL menus
        MenuGutterFillKind fillKind = SubstanceCoreUtilities
            .getMenuGutterFillKind();
        if (fillKind != MenuGutterFillKind.NONE) {
          SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
              .getColorScheme(menuItem, ComponentState.DEFAULT);
          Color leftColor = ((fillKind == MenuGutterFillKind.HARD_FILL) || (fillKind == MenuGutterFillKind.HARD)) ? scheme
              .getLightColor()
              : scheme.getUltraLightColor();
          Color rightColor = ((fillKind == MenuGutterFillKind.HARD_FILL) || (fillKind == MenuGutterFillKind.SOFT)) ? scheme
              .getLightColor()
              : scheme.getUltraLightColor();

          LinearGradientPaint gp = new LinearGradientPaint(
              textOffset, 0, menuWidth, 0, new float[] { 0.0f,
                  1.0f },
              new Color[] { leftColor, rightColor },
View Full Code Here

        .isLeftToRight();

    int width = this.getWidth();
    int height = this.getHeight() + 2;

    SubstanceColorScheme scheme = SubstanceCoreUtilities
        .getSkin(this.frame).getMainDefaultColorScheme(
            DecorationAreaType.SECONDARY_TITLE_PANE);
    JInternalFrame hostFrame = (JInternalFrame) SwingUtilities
        .getAncestorOfClass(JInternalFrame.class, this);
    JComponent hostForColorization = hostFrame;
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.