public void addTimelineCallback(TimelineCallback callback) { this.progressTl.addCallback(callback); }
/** * Simple constructor. * * @param jbutton */ private RootPaneDefaultButtonTracker(JButton jbutton) { // Create weak reference. this.buttonRef = new WeakReference<JButton>(jbutton); // Create coalesced timer. this.timeline = new Timeline(this); this.timeline.addCallback(this); // Store event handler and initial cycle count. RootPaneDefaultButtonTracker.trackers.put(jbutton, this); }
/** * Simple constructor. * * @param jbutton */ 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); }
private void trackTabModification(int tabIndex, Component tabComponent) { Timeline modifiedTimeline = new Timeline(tabPane); AnimationConfigurationManager.getInstance().configureModifiedTimeline( modifiedTimeline); modifiedTimeline.addCallback(new TabRepaintCallback(tabPane, tabIndex)); modifiedTimeline.playLoop(RepeatBehavior.REVERSE); modifiedTimelines.put(tabComponent, modifiedTimeline); } }
private void trackTabModification(int tabIndex, Component tabComponent) { Timeline modifiedTimeline = new Timeline(tabPane); AnimationConfigurationManager.getInstance().configureModifiedTimeline( modifiedTimeline); modifiedTimeline.addCallback(new TabRepaintCallback(tabPane, tabIndex)); modifiedTimeline.playLoop(RepeatBehavior.REVERSE); modifiedTimelines.put(tabComponent, modifiedTimeline); } }
/** * 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); }
this.rolloverTimeline.addPropertyToInterpolate("zoom", 1.0f, 1.2f); this.rolloverTimeline.addCallback(new SwingRepaintCallback( SwingUtilities.getRootPane(overviewPanel))); this.rolloverTimeline .addCallback(new UIThreadTimelineCallbackAdapter() { @Override public void onTimelineStateChanged(
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); }
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); }
@Override public void onViewInit() { this.setLayout(new GridLayout(1, 1)); this.setPreferredSize(this.descriptor.getSize()); this.captureLabel = new JLabel(); this.setBackground(AppThemeColor.ADR_CAPTURE_BG); this.setBorder(BorderFactory.createLineBorder(AppThemeColor.BORDER, 1)); this.progressTl = new Timeline(this); this.progressTl.addPropertyToInterpolate("captureCount", 0, this.descriptor.getFps()); this.captureLabel.setIcon(new ImageIcon(Scalr.resize(getCapture(), descriptor.getSize().width, descriptor.getSize().height))); this.progressTl.addCallback(new TimelineCallbackAdapter() { @Override public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) { captureLabel.setIcon(new ImageIcon(Scalr.resize(getCapture(), descriptor.getSize().width, descriptor.getSize().height))); } }); this.progressTl.setDuration(1000 / this.descriptor.getFps()); this.add(this.captureLabel); MercuryStoreUI.adrRepaintSubject.onNext(true); }
@Override public void onViewInit() { this.messageLabel = componentsFactory.getTextLabel(FontStyle.BOLD, AppThemeColor.TEXT_DEFAULT, TextAlignment.CENTER, 38, ""); this.showAnimation = new Timeline(this); this.showAnimation.setDuration(1400); this.showAnimation.addPropertyToInterpolate("opacity", 0.9f, 0f); this.showAnimation.addCallback(new TimelineCallback() { @Override public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) { if (newState.equals(Timeline.TimelineState.DONE)) { NotificationAlertFrame.this.setAlwaysOnTop(false); NotificationAlertFrame.this.setVisible(false); NotificationAlertFrame.this.setOpacity(0.9f); messageLabel.setText(""); } } @Override public void onTimelinePulse(float durationFraction, float timelinePosition) { } }); this.add(messageLabel); } }
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)); this.iconGlowTimeline.setName("Icon glow"); }
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)); this.iconGlowTimeline.setName("Icon glow"); }
AnimationConfigurationManager.getInstance().configureTimeline( this.focusTimeline); this.focusTimeline.addCallback(this.repaintCallback .getRepaintCallback()); this.focusTimeline.addCallback(new TimelineCallbackAdapter() { @Override public void onTimelineStateChanged(TimelineState oldState, AnimationConfigurationManager.getInstance().configureTimeline( this.focusLoopTimeline); this.focusLoopTimeline.addCallback(this.repaintCallback .getRepaintCallback());
@Override public void installUI(JComponent c) { //noinspection unchecked this.ribbonBand = (AbstractRibbonBand<AbstractBandControlPanel>) 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); installDefaults(); installComponents(); installListeners(); c.setLayout(createLayoutManager()); AWTRibbonEventListener.install(); }
hideAnimation.setDuration(400); hideAnimation.addPropertyToInterpolate("opacity", 1f, 0f); hideAnimation.addCallback(new TimelineCallback() { @Override public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) {
cycleDuration = 1000; this.indeterminateLoopTimeline.setDuration(cycleDuration); this.indeterminateLoopTimeline.addCallback(new TimelineCallback() { @Override public void onTimelineStateChanged(TimelineState oldState,
public MercuryLoading() { this.setValue(0); this.setMaximum(3000); this.setForeground(AppThemeColor.TEXT_NICKNAME); this.setBackground(AppThemeColor.ADR_FOOTER_BG); this.setUI(new MercuryLoadingUi(this)); this.progressTl = new Timeline(this); this.progressTl.setDuration(2400); this.progressTl.addPropertyToInterpolate("value", this.getMaximum(), 0); this.progressTl.setEase(new Spline(1)); this.progressTl.addCallback(new TimelineCallbackAdapter() { @Override public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) { swapColors(); } }); }
cycleDuration = 1000; this.indeterminateLoopTimeline.setDuration(cycleDuration); this.indeterminateLoopTimeline.addCallback(new TimelineCallback() { @Override public void onTimelineStateChanged(TimelineState oldState,
this.progressTl.addCallback(new TimelineCallbackAdapter() { @Override public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) {