Package org.pushingpixels.substance.internal.animation.StateTransitionTracker

Examples of org.pushingpixels.substance.internal.animation.StateTransitionTracker.ModelStateInfo


      // painted using the renderer of the list, and the index
      // is -1.
      if (index == -1) {
        StateTransitionTracker stateTransitionTracker = comboUI
            .getTransitionTracker();
        ModelStateInfo modelStateInfo = stateTransitionTracker
            .getModelStateInfo();
        ComponentState currState = modelStateInfo.getCurrModelState();
        float comboAlpha = SubstanceColorSchemeUtilities.getAlpha(
            combo, currState);
        Color fg = SubstanceTextUtilities
            .getForegroundColor(combo, ((JLabel) result).getText(),
                modelStateInfo, comboAlpha);
        result.setForeground(fg);
      } else {
        // use highlight color scheme for selected and rollover
        // elements in the drop down list
        StateTransitionTracker.ModelStateInfo modelStateInfo = listUI
            .getModelStateInfo(index, result);
        ComponentState currState = listUI.getCellState(index, result);
        if (modelStateInfo == null) {
          SubstanceColorScheme scheme = getColorSchemeForState(list,
              index, listUI, currState);
          // SubstanceColorScheme scheme =
          // SubstanceColorSchemeUtilities
          // .getColorScheme(list, kindForCurr, currState);
          result.setForeground(new ColorUIResource(scheme
              .getForegroundColor()));
        } else {
          Map<ComponentState, StateContributionInfo> activeStates = modelStateInfo
              .getStateContributionMap();
          SubstanceColorScheme colorScheme = getColorSchemeForState(
              list, index, listUI, currState);
          if (currState.isDisabled() || (activeStates == null)
              || (activeStates.size() == 1)) {
            super.setForeground(new ColorUIResource(colorScheme
                .getForegroundColor()));
          } else {
            float aggrRed = 0.0f;
            float aggrGreen = 0.0f;
            float aggrBlue = 0.0f;
            for (Map.Entry<ComponentState, StateTransitionTracker.StateContributionInfo> activeEntry : modelStateInfo
                .getStateContributionMap().entrySet()) {
              ComponentState activeState = activeEntry.getKey();
              float activeContribution = activeEntry.getValue()
                  .getContribution();
              if (activeContribution == 0.0f)
View Full Code Here


      BackgroundPaintingUtils.updateIfOpaque(g, this.splitPane);
    }

    Graphics2D graphics = (Graphics2D) g.create();

    ModelStateInfo modelStateInfo = this.stateTransitionTracker
        .getModelStateInfo();
    ComponentState currState = modelStateInfo.getCurrModelState();
    Map<ComponentState, StateTransitionTracker.StateContributionInfo> activeStates = modelStateInfo
        .getStateContributionMap();

    float alpha = SubstanceColorSchemeUtilities.getAlpha(this.splitPane,
        currState);
View Full Code Here

    TransitionAwareUI transitionAwareUI = (TransitionAwareUI) menuItem
        .getUI();
    StateTransitionTracker stateTransitionTracker = transitionAwareUI
        .getTransitionTracker();
    ModelStateInfo modelStateInfo = stateTransitionTracker
        .getModelStateInfo();

    ComponentState currState = modelStateInfo
        .getCurrModelStateNoSelection();

    if (currState.isDisabled()) {
      // no highlights on disabled menus
      return;
    }
    Map<ComponentState, StateTransitionTracker.StateContributionInfo> activeStates = modelStateInfo
        .getStateNoSelectionContributionMap();
    // if ("Check enabled unselected".equals(menuItem.getText())) {
    // System.out.println("New contribution map");
    // for (Map.Entry<ComponentState,
    // StateTransitionTracker.StateContributionInfo> existing : activeStates
View Full Code Here

TOP

Related Classes of org.pushingpixels.substance.internal.animation.StateTransitionTracker.ModelStateInfo

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.