2021与蓝度共同重构项目,服务端
liuhaonan
2022-08-04 681d31e1de290eebd5f5ecb0a0e07a2a66cd01ae
ximon-admin/src/main/java/com/sandu/ximon/admin/dto/nova/PlayerWidget.java
@@ -19,6 +19,7 @@
    //HTML - 网页媒体
    //STREAM_MEDIA - 流媒体
    //BOX - 窗口
    //WEATHER - 简易天气组件
    private PlayerWidgetType type;
    //  图片和视频为必填项,内容为图片或视频的md5值
    private String md5;
@@ -47,12 +48,52 @@
    //  html组件离线播放媒体(定制功能)
    private PlayerOffline offline;
    public PlayerWidget generateMediaWidget (String widgetName,
             Integer zIndex,
             PlayerWidgetType playerWidgetType,
             LEDProgramFile file,
             PlayerLayout playerLayout,
             PlayerAnimation animation) {
    private String address;
    private Double latitude;
    private Double longitude;
    private Integer width;
    private Integer height;
    private Integer refreshPeriod;
    private Integer fontSize;
    private Boolean bold;
    private Boolean italic;
    private Boolean underline;
    private String color;
    private Integer tempUnit;
    private Integer unitSymbol;
    private Boolean weatherEnable;
    private Boolean tempEnable;
    private Boolean windEnable;
    private Boolean humidEnable;
    private Boolean currentTempEnable;
    private Boolean isShowInOneLine;
    public PlayerWidget generateMediaWidget(String widgetName,
                                            Integer zIndex,
                                            PlayerWidgetType playerWidgetType,
                                            LEDProgramFile file,
                                            PlayerLayout playerLayout,
                                            PlayerAnimation animation) {
        this.setName(widgetName);
        this.setZIndex(zIndex);
        this.setType(playerWidgetType);
@@ -65,13 +106,13 @@
        return this;
    }
    public PlayerWidget generateScrollUpTextWidget (String widgetName,
                                         Integer zIndex,
                                         Long duration,
                                         List<String> content,
                                         String contentColor,
                                         Integer fontSize,
                                         PlayerLayout playerLayout) {
    public PlayerWidget generateScrollUpTextWidget(String widgetName,
                                                   Integer zIndex,
                                                   Long duration,
                                                   List<String> content,
                                                   String contentColor,
                                                   Integer fontSize,
                                                   PlayerLayout playerLayout) {
        this.setName(widgetName);
        this.setZIndex(zIndex);
        this.setType(PlayerWidgetType.ARCH_TEXT);
@@ -79,7 +120,7 @@
        this.setBackgroundColor("#00000000");
        this.setScrollAttribute(
                new PlayerWidgetScrollAttribute(
                        PlayerWidgetScrollAttributeAnimation.MARQUEE_UP,1
                        PlayerWidgetScrollAttributeAnimation.MARQUEE_UP, 1
                )
        );
        this.setDuration(duration);
@@ -87,7 +128,7 @@
        List<PlayerWidgetLine> playerWidgetLineList = new ArrayList<>();
        for(String str: content) {
        for (String str : content) {
            PlayerWidgetLine playerWidgetLine = new PlayerWidgetLine();
            List<PlayerWidgetLineTextAttributes> playerWidgetLineTextAttributesList =
                    new ArrayList<>();
@@ -124,7 +165,7 @@
        this.setBackgroundColor("#00000000");
        this.setScrollAttribute(
                new PlayerWidgetScrollAttribute(
                        PlayerWidgetScrollAttributeAnimation.MARQUEE_LEFT,2
                        PlayerWidgetScrollAttributeAnimation.MARQUEE_LEFT, 2
                )
        );
        this.setDuration(duration);
@@ -150,4 +191,7 @@
        return this;
    }
}