Examples of SubstanceSkin


Examples of org.pushingpixels.substance.api.SubstanceSkin

   * org.pushingpixels.substance.watermark.SubstanceWatermark#drawWatermarkImage(java
   * .awt.Graphics, int, int, int, int)
   */
  public void drawWatermarkImage(Graphics graphics, Component c, int x,
      int y, int width, int height) {
    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(c);
    Graphics2D g2d = (Graphics2D) graphics.create();
    g2d.setComposite(TransitionLayout.getAlphaComposite(c, 0.2f, graphics));
    g2d.setColor(skin.getWatermarkColorScheme().getWatermarkLightColor());
    g2d.fillRect(x, y, width, height);
    g2d.dispose();
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

    }

    result.add(new JXTitledSeparator("Substance", SwingConstants.CENTER)); //$NON-NLS-1$

    // Substance L&F
    final SubstanceSkin skin = SubstanceLookAndFeel.getCurrentSkin();
    for (final SkinInfo info : SubstanceLookAndFeel.getAllSkins().values()) {
      final JMenuItem item = new MenuItemRadioButton(info.getDisplayName());
      item.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
          SubstanceLookAndFeel.setSkin(info.getClassName());

          data.setLookAndFeel(info.getClassName());
        }
      });
      if (null != skin) {
        item.setSelected(HelperObject.isEquals(info.getClassName(), skin.getClass().getCanonicalName()));
      }
      result.add(item);
      group.add(item);
    }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

      SubstanceLookAndFeel.getTitlePaneComponent(window).setBackground(
          (Color) e.getNewValue());
    }

    if (propertyName.equals(SubstanceLookAndFeel.SKIN_PROPERTY)) {
      SubstanceSkin oldValue = (SubstanceSkin) e.getOldValue();
      SubstanceSkin newValue = (SubstanceSkin) e.getNewValue();
      if ((oldValue == null) && (newValue != null)) {
        rootPanesWithCustomSkin++;
      }
      if ((oldValue != null) && (newValue == null)) {
        rootPanesWithCustomSkin--;
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

   * Returns a metallic skin.
   *
   * @return Metallic skin.
   */
  private static SubstanceSkin getMetallicSkin() {
    SubstanceSkin res = new SubstanceSkin() {
      @Override
      public String getDisplayName() {
        return "Metallic Skin";
      }
    };
    res.registerDecorationAreaSchemeBundle(new SubstanceColorSchemeBundle(
        new MetallicColorScheme(), new MetallicColorScheme(),
        new LightGrayColorScheme()), DecorationAreaType.NONE);
    return res;
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

   * @return The color scheme of the specified tabbed pane tab.
   */
  public static SubstanceColorScheme getColorScheme(final JTabbedPane jtp,
      final int tabIndex, ColorSchemeAssociationKind associationKind,
      ComponentState componentState) {
    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(jtp);
    if (skin == null) {
      SubstanceCoreUtilities
          .traceSubstanceApiUsage(jtp,
              "Substance delegate used when Substance is not the current LAF");
    }
    SubstanceColorScheme nonColorized = skin.getColorScheme(jtp,
        associationKind, componentState);
    if (tabIndex >= 0) {
      Component component = jtp.getComponentAt(tabIndex);
      SubstanceColorScheme colorized = getColorizedScheme(component,
          nonColorized, jtp.getForegroundAt(tabIndex), jtp
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

    if (isButtonThatIsNeverPainted
        || (SubstanceCoreUtilities.hasFlatAppearance(component, false) && (componentState == ComponentState.ENABLED))) {
      component = component.getParent();
    }

    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(component);
    if (skin == null) {
      SubstanceCoreUtilities
          .traceSubstanceApiUsage(component,
              "Substance delegate used when Substance is not the current LAF");
    }
    SubstanceColorScheme nonColorized = skin.getColorScheme(component,
        componentState);

    return getColorizedScheme(orig, nonColorized, !componentState
        .isDisabled());
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

    this.defaultScheme = SubstanceColorSchemeUtilities.getColorScheme(
        this.component, ComponentState.ENABLED);
    this.decorationAreaType = SubstanceLookAndFeel
        .getDecorationType(this.component);

    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(this.component);
    this.isInDecorationArea = (this.decorationAreaType != null)
        && skin.isRegisteredAsDecorationArea(this.decorationAreaType)
        && SubstanceCoreUtilities.isOpaque(this.component);
  }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

    }

    public void actionPerformed(ActionEvent e) {
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          SubstanceSkin newSkin = SubstanceLookAndFeel
              .getCurrentSkin(null).transform(transform, name);
          SubstanceLookAndFeel.setSkin(newSkin);
        }
      });
    }
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

      for (Enumeration i = bundle.getKeys(); i.hasMoreElements();) {
        String key = (String) i.nextElement();
        labelsList.add(key);
        labelsList.add(bundle.getObject(key));
      }
      SubstanceSkin skin = (SubstanceSkin) mSkin;
      final SubstanceColorScheme colorScheme = skin
          .getActiveColorScheme(DecorationAreaType.NONE);
      InsetsUIResource visualMargin = new InsetsUIResource(0, 0, 0, 0);
      Color foregroundColor = new ColorUIResource(colorScheme
          .getForegroundColor());
      Object[] mainDefaults = new Object[] {
View Full Code Here

Examples of org.pushingpixels.substance.api.SubstanceSkin

   * org.pushingpixels.substance.watermark.SubstanceWatermark#drawWatermarkImage
   * (java .awt.Graphics, int, int, int, int)
   */
  public void drawWatermarkImage(Graphics graphics, Component c, int x,
      int y, int width, int height) {
    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(c);
    Graphics2D g2d = (Graphics2D) graphics.create();
    g2d.setComposite(LafWidgetUtilities
        .getAlphaComposite(c, 0.2f, graphics));
    g2d.setColor(skin.getWatermarkColorScheme().getWatermarkLightColor());
    g2d.fillRect(x, y, width, height);
    g2d.dispose();
  }
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.