Package org.pushingpixels.trident

Examples of org.pushingpixels.trident.Timeline$Setter


        tabComponent.removePropertyChangeListener(pcl);
      this.listeners.get(tabComponent).clear();
      this.listeners.remove(tabComponent);

      // has running timeline?
      Timeline timeline = modifiedTimelines.get(tabComponent);
      if (timeline != null) {
        timeline.cancel();
        modifiedTimelines.remove(tabComponent);
      }

      // this.cleanListeners(tabComponent);
    }
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

  private Component component;

  public IconGlowTracker(Component component) {
    this.component = component;

    this.iconGlowTimeline = new Timeline(this.component);
    AnimationConfigurationManager.getInstance().configureTimeline(
        this.iconGlowTimeline);
    this.iconGlowTimeline.setDuration(10 * this.iconGlowTimeline
        .getDuration());
    this.iconGlowTimeline.addCallback(new SwingRepaintCallback(component));
View Full Code Here

      }
    };
    this.isAutoTrackingModelChanges = true;
    this.eventListenerList = new EventListenerList();

    this.focusTimeline = new Timeline(this.component);
    AnimationConfigurationManager.getInstance().configureTimeline(
        this.focusTimeline);
    this.focusTimeline.addCallback(this.repaintCallback
        .getRepaintCallback());
    // notify listeners on focus state transition
    this.focusTimeline.addCallback(new TimelineCallbackAdapter() {
      @Override
      public void onTimelineStateChanged(TimelineState oldState,
          TimelineState newState, float durationFraction,
          float timelinePosition) {
        fireFocusStateTransitionEvent(oldState, newState);
      }
    });

    this.focusLoopTimeline = new Timeline(this.component);
    AnimationConfigurationManager.getInstance().configureTimeline(
        this.focusLoopTimeline);
    this.focusLoopTimeline.addCallback(this.repaintCallback
        .getRepaintCallback());
View Full Code Here

      return;

    if (this.transitionTimeline != null) {
      this.transitionTimeline.abort();
    }
    this.transitionTimeline = new Timeline(this);
    this.transitionTimeline.setName("Model transitions");
    this.transitionTimeline.addCallback(this.repaintCallback
        .getRepaintCallback());
    AnimationConfigurationManager.getInstance().configureTimeline(
        this.transitionTimeline);
View Full Code Here

    // see if need to use attention-drawing animation
    // boolean isWindowModified = false;
    if (button.getUI() instanceof ModificationAwareUI) {
      ModificationAwareUI modificationAwareUI = (ModificationAwareUI) button
          .getUI();
      Timeline modificationTimeline = modificationAwareUI
          .getModificationTimeline();
      if (modificationTimeline != null) {
        if (modificationTimeline.getState() != TimelineState.IDLE) {
          // isWindowModified = true;
          SubstanceColorScheme colorScheme2 = SubstanceColorSchemeUtilities.YELLOW;
          SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities.ORANGE;
          cyclePos = modificationTimeline.getTimelinePosition();

          HashMapKey key1 = SubstanceCoreUtilities.getHashKey(width,
              height, colorScheme.getDisplayName(),
              baseBorderScheme.getDisplayName(), shaper
                  .getDisplayName(), fillPainter
View Full Code Here

            if (Math.abs(finalDelta) > viewportRect.width / 6) {
              if (horizontalScrollTimeline != null) {
                // abort previous horizontal scroll
                horizontalScrollTimeline.abort();
              }
              horizontalScrollTimeline = new Timeline(tree);
              horizontalScrollTimeline
                  .addCallback(new UIThreadTimelineCallbackAdapter() {
                    @Override
                    public void onTimelinePulse(
                        float durationFraction,
View Full Code Here

  public StateTransitionTracker getTransitionTracker() {
    return this.substanceVisualStateTracker.getStateTransitionTracker();
  }

  private void trackModificationFlag() {
    this.modifiedTimeline = new Timeline(this.button);
    AnimationConfigurationManager.getInstance().configureModifiedTimeline(
        modifiedTimeline);
    this.modifiedTimeline
        .addCallback(new SwingRepaintCallback(this.button));
    this.modifiedTimeline.playLoop(RepeatBehavior.REVERSE);
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);
      }
    });

    JButton plus10Button = new JButton("plus 10");
    plus10Button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        delta(ProgressBarPanel.this, 10);
      }
    });
    buttons.add(plus10Button);

    JButton minus10Button = new JButton("minus 10");
    minus10Button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        delta(ProgressBarPanel.this, -10);
      }
    });
    buttons.add(minus10Button);

    JButton plus1Button = new JButton("plus 1");
    plus1Button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        delta(ProgressBarPanel.this, 1);
      }
    });
    buttons.add(plus1Button);

    JButton minus1Button = new JButton("minus 1");
    minus1Button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        delta(ProgressBarPanel.this, -1);
      }
    });
    buttons.add(minus1Button);

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

  /**
   * Installs defaults on the associated color selector component.
   */
  protected void installDefaults() {
    this.rolloverTimeline = new Timeline(this);
    this.rolloverTimeline.addPropertyToInterpolate("rollover", 0.0f, 1.0f);
    this.rolloverTimeline.addCallback(new SwingRepaintCallback(
        this.colorSelectorComponent));
    this.rolloverTimeline.setDuration(150);
  }
View Full Code Here

TOP

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

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.