Examples of DecorationAreaType


Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

    // with anti-alias turned on
    graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_OFF);
    graphics.setComposite(TransitionLayout.getAlphaComposite(c, g));

    DecorationAreaType decorationType = SubstanceLookAndFeel
        .getDecorationType(c);
    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(c);
    if ((decorationType != null)
        && (skin.isRegisteredAsDecorationArea(decorationType))) {
      // use the decoration painter
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

   *            Component.
   * @return Decoration area type of the component.
   */
  public static DecorationAreaType getDecorationType(Component comp) {
    Component c = comp;
    DecorationAreaType result = null;
    while (c != null) {
      if (c instanceof JComponent) {
        JComponent jc = (JComponent) c;
        Object prop = jc.getClientProperty(DECORATION_AREA_TYPE);
        if (prop instanceof DecorationAreaType) {
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

   *            If <code>true</code>, the painting of decoration background is
   *            enforced.
   */
  public static void paintDecorationBackground(Graphics g, Component c,
      boolean force) {
    DecorationAreaType decorationType = SubstanceLookAndFeel
        .getDecorationType(c);
    paintDecorationBackground(g, c, decorationType, force);
  }
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

  public final SubstanceColorScheme getColorScheme(Component comp,
      ComponentState componentState) {
    // small optimization - lookup the decoration area only if there
    // are decoration-specific scheme bundles.
    if (this.colorSchemeBundleMap.size() > 1) {
      DecorationAreaType decorationAreaType = SubstanceLookAndFeel
          .getDecorationType(comp);
      // if ((decorationAreaType == DecorationAreaType.NONE)
      // && (componentState == ComponentState.DEFAULT)) {
      // return this.defaultColorScheme;
      // }
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

  public final float getHighlightAlpha(Component comp,
      ComponentState componentState) {
    // small optimization - lookup the decoration area only if there
    // are decoration-specific scheme bundles.
    if (this.colorSchemeBundleMap.size() > 1) {
      DecorationAreaType decorationAreaType = SubstanceLookAndFeel
          .getDecorationType(comp);
      if (this.colorSchemeBundleMap.containsKey(decorationAreaType)) {
        Float registered = this.colorSchemeBundleMap.get(
            decorationAreaType).getHighlightAlpha(comp,
            componentState);
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

      return 1.0f;

    // small optimization - lookup the decoration area only if there
    // are decoration-specific scheme bundles.
    if (this.colorSchemeBundleMap.size() > 1) {
      DecorationAreaType decorationAreaType = SubstanceLookAndFeel
          .getDecorationType(comp);
      if (this.colorSchemeBundleMap.containsKey(decorationAreaType)) {
        Float registered = this.colorSchemeBundleMap.get(
            decorationAreaType).getAlpha(comp, componentState);
        if (registered >= 0.0)
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

      ColorSchemeAssociationKind associationKind,
      ComponentState componentState) {
    // small optimization - lookup the decoration area only if there
    // are decoration-specific scheme bundles.
    if (this.colorSchemeBundleMap.size() > 1) {
      DecorationAreaType decorationAreaType = SubstanceLookAndFeel
          .getDecorationType(comp);
      if (this.colorSchemeBundleMap.containsKey(decorationAreaType)) {
        return this.colorSchemeBundleMap.get(decorationAreaType)
            .getColorScheme(associationKind, componentState);
      }
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

  public SubstanceColorScheme getBorderColorScheme(Component comp,
      ComponentState componentState) {
    // small optimization - lookup the decoration area only if there
    // are decoration-specific scheme bundles.
    if (this.colorSchemeBundleMap.size() > 1) {
      DecorationAreaType decorationAreaType = SubstanceLookAndFeel
          .getDecorationType(comp);
      if (this.colorSchemeBundleMap.containsKey(decorationAreaType)) {
        return this.colorSchemeBundleMap.get(decorationAreaType)
            .getColorScheme(ColorSchemeAssociationKind.BORDER,
                componentState);
View Full Code Here

Examples of org.jvnet.substance.painter.decoration.DecorationAreaType

  public static void paintSeparator(Component c, Graphics g,
      SubstanceColorScheme scheme, int width, int height,
      int orientation, boolean hasShadow, int maxGradLengthStart,
      int maxGradLengthEnd, boolean toEnforceAlphaColors) {

    DecorationAreaType decorationAreaType = SubstanceLookAndFeel
        .getDecorationType(c);
    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(c);
    // use alpha colors when the control is in a painted decoration area
    // (where skin can use different background colors) or in a decoration
    // area that has overlays.
View Full Code Here

Examples of org.pushingpixels.substance.api.DecorationAreaType

      @Override
      public void actionPerformed(ActionEvent e) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            DecorationAreaType tabsType = SubstanceLookAndFeel
                .getDecorationType(tabs);
            DecorationAreaType comboType = SubstanceLookAndFeel
                .getDecorationType(combo);
            JOptionPane.showMessageDialog(GetDecorationType.this,
                "Tabbed pane: " + tabsType.getDisplayName()
                    + "\n" + "Combo box: "
                    + comboType.getDisplayName());

          }
        });
      }
    });
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.