• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Spline类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pushingpixels.trident.ease.Spline的典型用法代码示例。如果您正苦于以下问题:Java Spline类的具体用法?Java Spline怎么用?Java Spline使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Spline类属于org.pushingpixels.trident.ease包,在下文中一共展示了Spline类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: MercuryLoading

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
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();
        }
    });
}
 
开发者ID:Exslims,项目名称:MercuryTrade,代码行数:20,代码来源:MercuryLoading.java


示例2: AbstractRadial

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
public AbstractRadial() {
      super();
      lcdTimeline = new Timeline(this);
      lcdValue = 0;
      lcdUnitString = getUnitString();
      ledPosition = new Point2D.Double(0.6, 0.4);
      userLedPosition = new Point2D.Double(0.3, 0.4);
      INNER_BOUNDS = new Rectangle(200, 200);
      GAUGE_BOUNDS = new Rectangle(200, 200);
      FRAMELESS_BOUNDS = new Rectangle(200, 200);
      FRAMELESS_OFFSET = new Point2D.Double(0, 0);
      transparentSectionsEnabled = false;
      transparentAreasEnabled = false;
      expandedSectionsEnabled = false;
      tickmarkDirection = Direction.CLOCKWISE;
      timeline = new Timeline(this);
      STANDARD_EASING = new Spline(0.5f);
      RETURN_TO_ZERO_EASING = new Sine();
horizontalAlignment = SwingConstants.CENTER;
verticalAlignment = SwingConstants.CENTER;
      lcdTextVisible = true;
      LCD_BLINKING_TIMER = new Timer(500, this);
      addComponentListener(this);
  }
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:25,代码来源:AbstractRadial.java


示例3: AbstractLinear

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
public AbstractLinear() {
    super();
    INNER_BOUNDS = new Rectangle(120, 300);
    startingFromZero = false;
    transparentSectionsEnabled = false;
    transparentAreasEnabled = false;
    ledPosition = new Point2D.Double((getInnerBounds().width - 18.0 - 16.0) / getInnerBounds().width, 0.453271028);
    userLedPosition = new Point2D.Double(18.0 / getInnerBounds().width, 0.453271028);
    lcdValue = 0;
    lcdTimeline = new Timeline(this);
    lcdUnitString = getUnitString();
    lcdInfoString = "";
    timeline = new Timeline(this);
    STANDARD_EASING = new Spline(0.5f);
    RETURN_TO_ZERO_EASING = new Sine();
    lcdTextVisible = true;
    LCD_BLINKING_TIMER = new Timer(500, this);
    addComponentListener(this);
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:20,代码来源:AbstractLinear.java


示例4: CardFlowTimeline

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
/**
     * Sets custom pulse behavior - higher frame rate, lower frame rate or dynamic frame rate.
     * <p>
     * By default, Trident timelines are driven by a dedicated thread that wakes up every 40ms and
     * updates all the timelines. When the CPU is not heavily used this results in 25 frames-per-second
     * refresh rate for Trident-driven UI animations - consistent with the frame rate of theatrical films
     * and non-interlaced PAL television standard.
     * <p>
     * (see https://kenai.com/projects/trident/pages/CustomPulseSource)
     *
     * Must be run before any instance of Timeline is created in the application otherwise it will
     * generate the "cannot replace the pulse source thread once it's running..." error.
     */
//    static {
//        try {
//            TridentConfig.getInstance().setPulseSource(() -> {
//                try {
//                    Thread.sleep(30);
//                } catch (InterruptedException ex) {
//                    LOGGER.log(Level.WARNING, null, ex);
//                }
//            });
//        } catch (RuntimeException ex) {
//            LOGGER.log(Level.WARNING, ex.getMessage());
//        }
//    }

    CardFlowTimeline(TimelineCallback aCallback, long durationMs) {
        setDuration(durationMs);
        setEase(new Spline(0.8f));
        addCallback(aCallback);
    }
 
开发者ID:magarena,项目名称:magarena,代码行数:33,代码来源:CardFlowTimeline.java


示例5: showPopup

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private void showPopup() {
    if (MagicAnimations.isOn(AnimationFx.CARD_FADEIN)) {
        if (opacity == 0f) {
            fadeInTimeline = new Timeline();
            fadeInTimeline.setDuration(200);
            fadeInTimeline.setEase(new Spline(0.8f));
            fadeInTimeline.addPropertyToInterpolate(
                Timeline.property("opacity")
                .on(this)
                .from(0.0f)
                .to(1.0f));
            fadeInTimeline.play();
        } else {
            opacity = 1.0f;
        }
    } else {
        opacity = 1.0f;
    }
    setVisible(true);
}
 
开发者ID:magarena,项目名称:magarena,代码行数:21,代码来源:AnnotatedCardPanel.java


示例6: setVisible

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
@Override
public void setVisible(boolean aFlag) {
    super.setVisible(aFlag);
    if (ImageHelper.isWindowTranslucencySupported()) {
        if (aFlag == false) {
            setOpacity(0f);
        } else {
            fadeInTimeline = new Timeline();
            fadeInTimeline.setDuration(200);
            fadeInTimeline.setEase(new Spline(0.8f));
            fadeInTimeline.addPropertyToInterpolate(
                    Timeline.property("opacity")
                    .on(this)
                    .from(0.0f)
                    .to(1.0f));
            fadeInTimeline.play();
        }
    }
}
 
开发者ID:magarena,项目名称:magarena,代码行数:20,代码来源:MagicInfoWindow.java


示例7: initCollapseAnimations

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private void initCollapseAnimations(String state) {
    collapseAnimation = new Timeline(this);
    switch (state) {
        case "expand": {
            collapseAnimation.addPropertyToInterpolate("width", this.getWidth(), MAX_WIDTH);
            break;
        }
        case "collapse": {
            collapseAnimation.addPropertyToInterpolate("width", this.getWidth(), MIN_WIDTH);
        }
    }
    collapseAnimation.setEase(new Spline(1f));
    collapseAnimation.setDuration(150);
}
 
开发者ID:Exslims,项目名称:MercuryTrade,代码行数:15,代码来源:TaskBarFrame.java


示例8: animateBackground

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
public synchronized void animateBackground()   { 
    fadeInTimeline.addPropertyToInterpolate("backgroundLabelD",  0 , 55); 
    fadeInTimeline.setDuration(1500); 
    fadeInTimeline.setEase(new Spline(0.7f)); 
    fadeInTimeline.play(); 
    //fadeInTimeline.playLoop(2, Timeline.RepeatBehavior.LOOP);
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:8,代码来源:DependecyWPanel.java


示例9: getGrowTimeline

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private Timeline getGrowTimeline() {
    final Timeline timeline = new Timeline(this);
    timeline.addPropertyToInterpolate("GrowRectangle", getStart(), getPreviewRectangle());
    timeline.setDuration(GROW_DURATION);
    timeline.setEase(new Spline(0.8f));
    return timeline;
}
 
开发者ID:magarena,项目名称:magarena,代码行数:8,代码来源:CardAnimation.java


示例10: getShrinkTimeline

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private Timeline getShrinkTimeline() {
    final Timeline timeline = new Timeline(this);
    timeline.addPropertyToInterpolate("ShrinkRectangle", getPreviewRectangle(), getEnd());
    timeline.setDuration(SHRINK_DURATION);
    timeline.setEase(new Spline(0.8f));
    timeline.addCallback(new TimelineCallbackAdapter() {
        @Override
        public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition) {
            if (newState == Timeline.TimelineState.DONE) {
                scenario.cancel();
            }
        }
    });
    return timeline;
}
 
开发者ID:magarena,项目名称:magarena,代码行数:16,代码来源:CardAnimation.java


示例11: startPulsingBorderAnimation

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private void startPulsingBorderAnimation() {
    if (GeneralConfig.get(BooleanSetting.ANIMATE_GAMEPLAY)) {
        stopPulsingBorderAnimation();
        pulseBorderTimeline.setDuration(500);
        pulseBorderTimeline.setEase(new Spline(0.8f));
        pulseBorderTimeline.addPropertyToInterpolate(
                Timeline.property("pulsingBorderOpacity").on(this).from(20).to(200));
        pulseBorderTimeline.playLoop(Timeline.RepeatBehavior.REVERSE);
    }
}
 
开发者ID:magarena,项目名称:magarena,代码行数:11,代码来源:AnimationPanel.java


示例12: doHealAnimation

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private void doHealAnimation() {
    if (GeneralConfig.get(BooleanSetting.ANIMATE_GAMEPLAY)) {
        final Timeline timeline = new Timeline();
        timeline.setDuration(1000);
        timeline.setEase(new Spline(0.8f));
        timeline.addPropertyToInterpolate(
                Timeline.property("healColorOpacity").on(this).from(100).to(0));
        timeline.play();
    }
}
 
开发者ID:magarena,项目名称:magarena,代码行数:11,代码来源:PlayerImagePanel.java


示例13: startPulsingBorderAnimation

import org.pushingpixels.trident.ease.Spline; //导入依赖的package包/类
private void startPulsingBorderAnimation() {
    if (MagicAnimations.isOn(AnimationFx.AVATAR_PULSE)) {
        stopPulsingBorderAnimation();
        pulseBorderTimeline.setDuration(500);
        pulseBorderTimeline.setEase(new Spline(0.8f));
        pulseBorderTimeline.addPropertyToInterpolate(
                Timeline.property("ChoiceBorderOpacity").on(this)
                    .from(20).to(CHOICE_BORDER_MAX_OPACITY)
        );
        pulseBorderTimeline.playLoop(Timeline.RepeatBehavior.REVERSE);
    }
}
 
开发者ID:magarena,项目名称:magarena,代码行数:13,代码来源:ChoiceBorderPanelButton.java



注:本文中的org.pushingpixels.trident.ease.Spline类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EdmSimpleTypeKind类代码示例发布时间:2022-05-22
下一篇:
Java CsdlEntityContainerInfo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap