Examples of ComponentState


Examples of org.jamesii.core.plugins.metadata.ComponentState

  /**
   * Tests state transitions.
   */
  public void testComponentLifeCycleTransitions() {

    ComponentState myState = ComponentState.UNDER_DEVELOPMENT;

    myState = ComponentState.change(myState, ComponentAction.SUBMIT);
    assertEquals(ComponentState.UNTESTED, myState);

    myState = ComponentState.change(myState, ComponentAction.FINISH_TEST);
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    Icon icon = SubstanceCoreUtilities.getIcon(b, null, this.glowingIcon,
        false);

    graphics.setComposite(TransitionLayout.getAlphaComposite(b, g));
    if (fadeTracker.isTracked(b, FadeKind.ROLLOVER)) {
      ComponentState state = ComponentState.getState(b);
      // System.out.println(state.name() + ":" + state.isRollover());
      if (state.isKindActive(FadeKind.ROLLOVER)) {
        // Came from default state
        SubstanceCoreUtilities.getIcon(b, null, this.glowingIcon, true)
            .paintIcon(b, graphics, iconRect.x, iconRect.y);
        graphics.setComposite(TransitionLayout.getAlphaComposite(b,
            fadeTracker.getFade(b, FadeKind.ROLLOVER), g));
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

      int fontSize = SubstanceSizeUtils.getComponentFontSize(this.field);
      int dotDiameter = SubstanceSizeUtils
          .getPasswordDotDiameter(fontSize);
      int dotGap = SubstanceSizeUtils.getPasswordDotGap(fontSize);
      ComponentState state = // isSelected ? ComponentState.SELECTED
      (field.isEnabled() ? ComponentState.DEFAULT
          : ComponentState.DISABLED_UNSELECTED);
      SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
          .getColorScheme(field, state);
      Color topColor = isSelected ? scheme.getSelectionForegroundColor()
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    Graphics2D g2d = (Graphics2D) g.create();
    BackgroundPaintingUtils.updateIfOpaque(g2d, c);
    if (icon != null) {
      icon.paintIcon(c, g2d, paintIconR.x, paintIconR.y);
    }
    ComponentState labelState = label.isEnabled() ? ComponentState.DEFAULT
        : ComponentState.DISABLED_UNSELECTED;
    float labelAlpha = SubstanceColorSchemeUtilities.getAlpha(label,
        labelState);
    if (text != null) {
      final View v = (View) c.getClientProperty(BasicHTML.propertyKey);
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

  @Override
  public void paintCurrentValueBackground(Graphics g, Rectangle bounds,
      boolean hasFocus) {
    ListUI listUI = this.popup.getList().getUI();
    SubstanceListUI ui = (SubstanceListUI) listUI;
    ComponentState state = ui.getCellState(-1, null);
    boolean isEnabled = this.comboBox.isEnabled();
    boolean isSelected = hasFocus;
    if (isSelected && isEnabled) {
      state = ComponentState.SELECTED;
    }
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    // Color background = renderer.getBackground();
    // if (background == null)
    // background = tree.getBackground();

    ComponentState prevState = this.getPrevPathState(pathId);
    ComponentState currState = this.getPathState(pathId);

    // Compute the alpha values for the animation.
    float startAlpha = SubstanceColorSchemeUtilities.getHighlightAlpha(
        this.tree, prevState);
    float endAlpha = SubstanceColorSchemeUtilities.getHighlightAlpha(
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

     */
    @Override
    public void fadeEnded(FadeKind fadeKind) {
      if (SubstanceTreeUI.this.tree == tree) {
        TreePathId pathId = new TreePathId(treePath);
        ComponentState currState = getPathState(pathId);
        if (currState == ComponentState.DEFAULT) {
          prevStateMap.remove(pathId);
          nextStateMap.remove(pathId);
        } else {
          prevStateMap.put(pathId, currState);
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    @Override
    public void fadeReversed(FadeKind fadeKind, boolean isFadingIn,
        float fadeCycle10) {
      if (SubstanceTreeUI.this.tree == tree) {
        TreePathId pathId = new TreePathId(treePath);
        ComponentState nextState = nextStateMap.get(pathId);
        if (nextState == null) {
          prevStateMap.remove(pathId);
        } else {
          prevStateMap.put(pathId, nextState);
        }
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    Icon icon = SubstanceCoreUtilities.getIcon(b, null, this.glowingIcon,
        false);

    graphics.setComposite(TransitionLayout.getAlphaComposite(b, g));
    if (fadeTracker.isTracked(b, FadeKind.ROLLOVER)) {
      ComponentState state = ComponentState.getState(b);
      // System.out.println(state.name() + ":" + state.isRollover());
      if (state.isKindActive(FadeKind.ROLLOVER)) {// ==
        // ComponentState.ROLLOVER_UNSELECTED) {
        // Came from default state
        SubstanceCoreUtilities.getIcon(b, null, this.glowingIcon, true)
            .paintIcon(b, graphics, iconRect.x, iconRect.y);
        graphics.setComposite(TransitionLayout.getAlphaComposite(b,
View Full Code Here

Examples of org.jvnet.substance.api.ComponentState

    ButtonModel model = menuItem.getModel();
    // int menuWidth = menuItem.getWidth();
    // int menuHeight = menuItem.getHeight();

    ComponentState prevState = SubstanceCoreUtilities
        .getPrevComponentState(menuItem);
    ComponentState currState = ComponentState.getState(model, menuItem,
        !(menuItem instanceof JMenu));

    // Compute the alpha values for the animation (the highlights
    // have separate alpha channels, so that rollover animation can start
    // from 0.0 alpha and goes to 0.4 alpha on non-selected cells,
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.