當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。