当前位置: 首页>>代码示例>>Java>>正文


Java DeckMissionDto类代码示例

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


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

示例1: init

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
@Override
public void init() {
    // 遠征
    this.deckmissions = new HashSet<Long>();
    for (DeckMissionDto deckMission : GlobalContext.getDeckMissions()) {
        if ((deckMission.getMission() != null) && (deckMission.getShips() != null)) {
            this.deckmissions.addAll(deckMission.getShips());
        }
    }
    // 入渠
    this.docks = new HashSet<Long>();
    for (NdockDto ndock : GlobalContext.getNdocks()) {
        if (ndock.getNdockid() != 0) {
            this.docks.add(ndock.getNdockid());
        }
    }
}
 
开发者ID:kyuntx,项目名称:logbookpn,代码行数:18,代码来源:CreateReportLogic.java

示例2: ShipTableItemCreator

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
public ShipTableItemCreator(TableWrapper<ShipBean> table, Map<Integer, Image> cache) {
    // 遠征中の艦娘たち
    this.deckmissions = Stream.of(GlobalContext.getDeckMissions())
            .filter(e -> (e.getMission() != null) && (e.getShips() != null))
            .map(DeckMissionDto::getShips)
            .collect(HashSet<Long>::new, Set<Long>::addAll, Set<Long>::addAll);
    // 入渠中の艦娘たち
    this.ndocks = Stream.of(GlobalContext.getNdocks())
            .filter(e -> e.getNdockid() != 0)
            .map(NdockDto::getNdockid)
            .collect(Collectors.toSet());
    this.cache = cache;
    this.indexHp = table.getColumnIndex("HP") + 1;
    this.indexExp = table.getColumnIndex("経験値") + 1;
}
 
开发者ID:sanaehirotaka,项目名称:logbook,代码行数:16,代码来源:ShipTable.java

示例3: getDeckMissionShips

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
/**
 * 遠征中の艦娘を取得します
 * 
 * @return
 */
private Set<Long> getDeckMissionShips() {
    // 遠征
    Set<Long> deckmissions = new HashSet<Long>();
    for (DeckMissionDto deckMission : GlobalContext.getDeckMissions()) {
        if ((deckMission.getMission() != null) && (deckMission.getShips() != null)) {
            deckmissions.addAll(deckMission.getShips());
        }
    }
    return deckmissions;
}
 
开发者ID:kyuntx,项目名称:logbookpn,代码行数:16,代码来源:BathwaterTableDialog.java

示例4: getDeckMissions

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
/**
 * @return 遠征リスト
 */
public static DeckMissionDto[] getDeckMissions() {
    return deckMissions;
}
 
开发者ID:sanaehirotaka,项目名称:logbook,代码行数:7,代码来源:GlobalContext.java

示例5: updateDeck

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
/**
 * 遠征を更新する
 *
 * @param now
 * @param notice
 * @return
 */
private boolean updateDeck(Date now, List<String> notice) {
    boolean noticeflg = false;

    Label[] deckNameLabels = { this.main.getDeck1name(), this.main.getDeck2name(), this.main.getDeck3name() };
    Text[] deckTimeTexts = { this.main.getDeck1time(), this.main.getDeck2time(), this.main.getDeck3time() };

    DeckMissionDto[] deckMissions = GlobalContext.getDeckMissions();

    for (int i = 0; i < deckMissions.length; i++) {
        String time = "";
        String dispname = "";
        if (deckMissions[i].getMission() != null) {
            dispname = deckMissions[i].getName() + " (" + deckMissions[i].getMission() + ")";

            if (deckMissions[i].getTime() != null) {
                long rest = getRest(now, deckMissions[i].getTime());

                // ツールチップテキストで時刻を表示する
                deckTimeTexts[i].setToolTipText(this.format.format(deckMissions[i].getTime()));

                // 20分前、10分前、5分前になったら背景色を変更する
                if (rest <= (ONE_MINUTES * 5)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_5_MIN));
                } else if (rest <= (ONE_MINUTES * 10)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_10_MIN));
                } else if (rest <= (ONE_MINUTES * 20)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_20_MIN));
                } else {
                    deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
                }
                if (this.main.getDeckNotice().getSelection()) {
                    if ((rest <= ONE_MINUTES) && !FLAG_NOTICE_DECK[i]) {
                        notice.add(dispname + " がまもなく帰投します");
                        noticeflg = true;
                        FLAG_NOTICE_DECK[i] = true;
                    } else if (AppConfig.get().isMissionRemind() && (rest < -1)
                            && ((rest % AppConfig.get().getRemindInterbal()) == 0)) {
                        // 定期的にリマインドする
                        notice.add(dispname + " がまもなく帰投します");
                        noticeflg = true;
                    } else if (rest > ONE_MINUTES) {
                        FLAG_NOTICE_DECK[i] = false;
                    }
                } else {
                    FLAG_NOTICE_DECK[i] = false;
                }
                time = TimeLogic.toDateRestString(rest);
                if (time == null) {
                    time = "まもなく帰投します";
                }
            }
        } else {
            deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
            deckTimeTexts[i].setToolTipText(null);
        }
        deckNameLabels[i].setText(dispname);
        deckTimeTexts[i].setText(time);
    }
    return noticeflg;
}
 
开发者ID:sanaehirotaka,项目名称:logbook,代码行数:71,代码来源:AsyncExecApplicationMain.java

示例6: updateDeck

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
/**
 * 遠征を更新する
 * 
 * @param now
 * @param notice
 * @return
 */
private boolean updateDeck(Date now, List<String> notice) {
    boolean noticeflg = false;

    Label[] deckNameLabels = { this.main.getDeck1name(), this.main.getDeck2name(), this.main.getDeck3name() };
    Text[] deckTimeTexts = { this.main.getDeck1time(), this.main.getDeck2time(), this.main.getDeck3time() };

    DeckMissionDto[] deckMissions = GlobalContext.getDeckMissions();

    for (int i = 0; i < deckMissions.length; i++) {
        String time = "";
        String dispname = "";
        if (deckMissions[i].getMission() != null) {
            dispname = deckMissions[i].getName() + " (" + deckMissions[i].getMission() + ")";

            if (deckMissions[i].getTime() != null) {
                long rest = getRest(now, deckMissions[i].getTime());

                // ツールチップテキストで時刻を表示する
                deckTimeTexts[i].setToolTipText(this.format.format(deckMissions[i].getTime()));

                // 20分前、10分前、5分前になったら背景色を変更する
                if (rest <= (ONE_MINUTES * 5)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_5_MIN));
                } else if (rest <= (ONE_MINUTES * 10)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_10_MIN));
                } else if (rest <= (ONE_MINUTES * 20)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_20_MIN));
                } else {
                    deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
                }
                if (this.main.getDeckNotice().getSelection()) {
                    if ((rest <= ONE_MINUTES) && !FLAG_NOTICE_DECK[i]) {
                        notice.add(dispname + " がまもなく帰投します");
                        noticeflg = true;
                        FLAG_NOTICE_DECK[i] = true;
                    } else if (AppConfig.get().isMissionRemind() && (rest < -1)
                            && ((rest % AppConfig.get().getRemindInterbal()) == 0)) {
                        // 定期的にリマインドする
                        notice.add(dispname + " がまもなく帰投します");
                        noticeflg = true;
                    } else if (rest > ONE_MINUTES) {
                        FLAG_NOTICE_DECK[i] = false;
                    }
                } else {
                    FLAG_NOTICE_DECK[i] = false;
                }
                time = TimeLogic.toDateRestString(rest);
                if (time == null) {
                    time = "まもなく帰投します";
                }
            }
        } else {
            deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
            deckTimeTexts[i].setToolTipText(null);
        }
        deckNameLabels[i].setText(dispname);
        deckTimeTexts[i].setText(time);
    }
    return noticeflg;
}
 
开发者ID:kyuntx,项目名称:logbookpn,代码行数:71,代码来源:AsyncExecApplicationMain.java

示例7: updateDeck

import logbook.dto.DeckMissionDto; //导入依赖的package包/类
/**
 * 遠征を更新する
 * 
 * @param now
 * @param notice
 * @return
 */
private boolean updateDeck(Date now, List<String> notice) {
    boolean noticeflg = false;

    Label[] deckNameLabels = { this.main.getDeck1name(), this.main.getDeck2name(), this.main.getDeck3name() };
    Text[] deckTimeTexts = { this.main.getDeck1time(), this.main.getDeck2time(), this.main.getDeck3time() };

    DeckMissionDto[] deckMissions = GlobalContext.getDeckMissions();

    for (int i = 0; i < deckMissions.length; i++) {
        String time = "";
        String dispname = "";
        if (deckMissions[i].getMission() != null) {
            dispname = deckMissions[i].getName() + " (" + deckMissions[i].getMission() + ")";

            if (deckMissions[i].getTime() != null) {
                long rest = getRest(now, deckMissions[i].getTime());

                // ツールチップテキストで時刻を表示する
                deckTimeTexts[i].setToolTipText(this.format.format(deckMissions[i].getTime()));

                // 20分前、10分前、5分前になったら背景色を変更する
                if (rest <= (ONE_MINUTES * 5)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_5_MIN));
                } else if (rest <= (ONE_MINUTES * 10)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_10_MIN));
                } else if (rest <= (ONE_MINUTES * 20)) {
                    deckTimeTexts[i].setBackground(SWTResourceManager
                            .getColor(AppConstants.TIME_IN_20_MIN));
                } else {
                    deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
                }
                if (this.main.getDeckNotice().getSelection()) {
                    if ((rest <= ONE_MINUTES) && !FLAG_NOTICE_DECK[i]) {
                        notice.add(deckMissions[i].getName() + " has returned from " + deckMissions[i].getMission());
                        noticeflg = true;
                        FLAG_NOTICE_DECK[i] = true;
                    } else if (AppConfig.get().isMissionRemind() && (rest < -1)
                            && ((rest % AppConfig.get().getRemindInterbal()) == 0)) {
                        // 定期的にリマインドする
                        notice.add(dispname + "  will arrive soon.");
                        noticeflg = true;
                    } else if (rest > ONE_MINUTES) {
                        FLAG_NOTICE_DECK[i] = false;
                    }
                } else {
                    FLAG_NOTICE_DECK[i] = false;
                }
                time = TimeLogic.toDateRestString(rest);
                if (time == null) {
                    time = "Done";
                }
            }
        } else {
            deckTimeTexts[i].setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
            deckTimeTexts[i].setToolTipText(null);
        }
        deckNameLabels[i].setText(dispname);
        deckTimeTexts[i].setText(time);
    }
    return noticeflg;
}
 
开发者ID:silfumus,项目名称:logbook-EN,代码行数:71,代码来源:AsyncExecApplicationMain.java


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