Package org.pushingpixels.substance.internal.utils

Examples of org.pushingpixels.substance.internal.utils.UpdateOptimizationInfo


  public void update(Graphics g, JComponent c) {
    BackgroundPaintingUtils.updateIfOpaque(g, c);

    Graphics2D g2d = (Graphics2D) g.create();
    SubstanceStripingUtils.setup(c);
    this.updateInfo = new UpdateOptimizationInfo(c);
    this.paint(g2d, c);
    SubstanceStripingUtils.tearDown(c);
    g2d.dispose();
    this.updateInfo = null;
  }
View Full Code Here


    return this;
  }

  private SubstanceColorScheme getColorSchemeForState(JList list,
      SubstanceListUI ui, ComponentState state) {
    UpdateOptimizationInfo updateOptimizationInfo = ui
        .getUpdateOptimizationInfo();
    if (state == ComponentState.ENABLED) {
      if (updateOptimizationInfo == null) {
        return SubstanceColorSchemeUtilities
            .getColorScheme(list, state);
      } else {
        return updateOptimizationInfo.getDefaultScheme();
      }
    } else {
      if (updateOptimizationInfo == null) {
        return SubstanceColorSchemeUtilities.getColorScheme(list,
            ColorSchemeAssociationKind.HIGHLIGHT, state);
      } else {
        return updateOptimizationInfo.getHighlightColorScheme(state);
      }
    }
  }
View Full Code Here

  private SubstanceColorScheme getColorSchemeForState(JList list, int index,
      SubstanceListUI listUI, ComponentState state) {
    boolean toUseHighlightKindForCurrState = (index >= 0)
        && (state.isFacetActive(ComponentStateFacet.ROLLOVER) || state
            .isFacetActive(ComponentStateFacet.SELECTION));
    UpdateOptimizationInfo updateOptimizationInfo = listUI
        .getUpdateOptimizationInfo();
    if (toUseHighlightKindForCurrState) {
      if (updateOptimizationInfo == null) {
        return SubstanceColorSchemeUtilities.getColorScheme(list,
            ColorSchemeAssociationKind.HIGHLIGHT, state);
      } else {
        return updateOptimizationInfo.getHighlightColorScheme(state);
      }
    } else {
      if (updateOptimizationInfo == null) {
        return SubstanceColorSchemeUtilities
            .getColorScheme(list, state);
      } else {
        return updateOptimizationInfo.getDefaultScheme();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.pushingpixels.substance.internal.utils.UpdateOptimizationInfo

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.