Package org.pushingpixels.trident

Examples of org.pushingpixels.trident.Timeline$UISetter


        }
       
        @Action
        public void fadeIn() {
            if (fadeInTimeline == null) {
                fadeInTimeline = new Timeline(this);
                fadeInTimeline.addPropertyToInterpolate("background",
                        ColorUtil.setAlpha(base, 0), ColorUtil.setAlpha(base, 125));
                fadeInTimeline.setDuration(2000);
                fadeInTimeline.setEase(new Spline(0.7f));
            }
View Full Code Here


    this.add(new JScrollPane(bars), BorderLayout.CENTER);

    JPanel buttons = new JPanel();
    buttons.setLayout(new FlowLayout(FlowLayout.CENTER));

    final Timeline progressTimeline = new Timeline(this);
    @RunOnUIThread
    class ProgressCallback extends TimelineCallbackAdapter {
      @Override
      public void onTimelinePulse(float durationFraction,
          float timelinePosition) {
        delta(ProgressBarPanel.this, 1);
      }
    }
    progressTimeline.addCallback(new ProgressCallback());
    progressTimeline.setDuration(2000);

    this.startButton = new JButton("start");
    this.startButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        progressTimeline.playLoop(RepeatBehavior.LOOP);
        startButton.setEnabled(false);
        stopButton.setEnabled(true);
      }
    });

    this.stopButton = new JButton("stop");
    this.stopButton.setEnabled(false);
    this.stopButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        progressTimeline.cancel();
        stopButton.setEnabled(false);
        startButton.setEnabled(true);
      }
    });
View Full Code Here

        SubstanceLookAndFeel.COLORIZATION_FACTOR, Double.valueOf(1.0));
    this.add(instructional, BorderLayout.NORTH);

    // create a looping animation to change the label foreground
    // from black to blue and back to draw some attention.
    Timeline instructionalTimeline = new Timeline(instructional);
    instructionalTimeline.addPropertyToInterpolate("foreground",
        Color.black, Color.blue);
    instructionalTimeline.setDuration(1000);
    instructionalTimeline.playLoop(RepeatBehavior.REVERSE);

    FormLayout lm = new FormLayout("right:pref, 4dlu, fill:pref:grow", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(lm,
        new ScrollablePanel());
View Full Code Here

                  list, ColorSchemeAssociationKind.HIGHLIGHT,
                  prevState);
        }
      }

      Timeline runningTimeline = ui.getRunningTimeline(index);
      Color color = SubstanceColorUtilities
          .getInterpolatedForegroundColor(list, index, scheme, state,
              prevScheme, prevState, runningTimeline);

      // System.out.println("[row " + index + "] - " + prevState.name()
View Full Code Here

        // }
      }
      Component compForSchemeQuery = (index == -1) ? combo : list;
      // use highlight color scheme for selected and focused
      // elements in the drop down list
      Timeline runningTimeline = listUI.getRunningTimeline(index);
      boolean toUseHighlightKindForCurrState = (index >= 0)
          && ((runningTimeline != null)
              || state.isKindActive(FadeKind.ROLLOVER) || state
              .isKindActive(FadeKind.SELECTION));
      boolean toUseHighlightKindForPrevState = (index >= 0)
View Full Code Here

   */
  private RootPaneDefaultButtonTracker(JButton jbutton) {
    // Create weak reference.
    this.buttonRef = new WeakReference<JButton>(jbutton);
    // Create coalesced timer.
    this.timeline = new Timeline(jbutton);
    this.timeline.addCallback(this);
    // Store event handler and initial cycle count.
    RootPaneDefaultButtonTracker.trackers.put(jbutton, this);
  }
View Full Code Here

    }
    this.timelineMap.clear();
  }

  public synchronized Timeline getPlayingTimeline(Comparable<T> id) {
    Timeline timeline = this.timelineMap.get(id);
    if (timeline == null)
      return null;
    TimelineState state = timeline.getState();
    if ((state == TimelineState.PLAYING_FORWARD)
        || (state == TimelineState.PLAYING_REVERSE)) {
      return timeline;
    }
    return null;
View Full Code Here

      return this.timelineMap.get(id);

    if (creator == null)
      return null;

    final Timeline timeline = creator.create();
    timeline.addCallback(new TimelineCallbackAdapter() {
      @Override
      public void onTimelineStateChanged(TimelineState oldState,
          TimelineState newState, float durationFraction,
          float timelinePosition) {
        // System.out.println("Tracked timeline went from " + oldState
View Full Code Here

    // System.out.println("PREV:" + this.prevState.name() + ", CURR:"
    // + this.currState.name() + ", NEW:" + newState.name());

    if (this.transitionTimeline != null)
      this.transitionTimeline.abort();
    this.transitionTimeline = new Timeline(this);
    this.transitionTimeline.addCallback(new SwingRepaintCallback(
        this.component));
    AnimationConfigurationManager.getInstance().configureTimeline(
        this.transitionTimeline);
    long fullDuration = this.transitionTimeline.getDuration();
View Full Code Here

   */
  @Override
  public void installUI(JComponent c) {
    this.ribbonBand = (AbstractRibbonBand) c;

    this.rolloverTimeline = new Timeline(this);
    this.rolloverTimeline.addPropertyToInterpolate("rolloverAmount", 0.0f,
        1.0f);
    this.rolloverTimeline.addCallback(new SwingRepaintCallback(
        this.ribbonBand));
    this.rolloverTimeline.setDuration(250);
View Full Code Here

TOP

Related Classes of org.pushingpixels.trident.Timeline$UISetter

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.