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


Java BattleAggUnitDto类代码示例

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


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

示例1: reloadTable

import logbook.dto.BattleAggUnitDto; //导入依赖的package包/类
/**
 * テーブルをリロードする
 */
private void reloadTable() {
    this.disposeTableBody();
    boolean first = true;
    Map<BattleAggUnit, BattleAggUnitDto> aggMap = this.load();
    for (Entry<BattleAggUnit, BattleAggUnitDto> entry : aggMap.entrySet()) {
        BattleAggUnitDto dto = entry.getValue();
        BattleAggDetailsDto total = dto.getTotal();

        TreeItem root = new TreeItem(this.tree, SWT.NONE);
        // 合計
        root.setText(new String[] { entry.getKey().toString(), Integer.toString(total.getStart()),
                Integer.toString(total.getWin()), Integer.toString(total.getS()), Integer.toString(total.getA()),
                Integer.toString(total.getB()), Integer.toString(total.getC()), Integer.toString(total.getD()) });
        // ボス
        TreeItem boss = new TreeItem(root, SWT.NONE);
        boss.setText(new String[] { "ボス", "-", Integer.toString(total.getBossWin()),
                Integer.toString(total.getBossS()), Integer.toString(total.getBossA()),
                Integer.toString(total.getBossB()), Integer.toString(total.getBossC()),
                Integer.toString(total.getBossD()) });
        // 海域毎
        for (Entry<String, BattleAggDetailsDto> areaEntry : dto.getAreaDetails()) {
            BattleAggDetailsDto area = areaEntry.getValue();

            TreeItem sub = new TreeItem(root, SWT.NONE);
            sub.setText(new String[] { areaEntry.getKey(), Integer.toString(area.getStart()),
                    Integer.toString(area.getWin()), Integer.toString(area.getS()), Integer.toString(area.getA()),
                    Integer.toString(area.getB()), Integer.toString(area.getC()), Integer.toString(area.getD()) });
            // ボス
            TreeItem subBoss = new TreeItem(sub, SWT.NONE);
            subBoss.setText(new String[] { "ボス", "-",
                    Integer.toString(area.getBossWin()), Integer.toString(area.getBossS()),
                    Integer.toString(area.getBossA()), Integer.toString(area.getBossB()),
                    Integer.toString(area.getBossC()), Integer.toString(area.getBossD()) });
        }
        if (first)
            root.setExpanded(true);
        first = false;
    }
    this.packTableHeader();
}
 
开发者ID:sanaehirotaka,项目名称:logbook,代码行数:44,代码来源:BattleAggDialog.java

示例2: reloadTable

import logbook.dto.BattleAggUnitDto; //导入依赖的package包/类
/**
 * テーブルをリロードする
 */
private void reloadTable() {
    this.disposeTableBody();
    boolean first = true;
    Map<BattleAggUnit, BattleAggUnitDto> aggMap = this.load();
    for (Entry<BattleAggUnit, BattleAggUnitDto> entry : aggMap.entrySet()) {
        BattleAggUnitDto dto = entry.getValue();
        BattleAggDetailsDto total = dto.getTotal();

        TreeItem root = new TreeItem(this.tree, SWT.NONE);
        // 合計
        root.setText(new String[] { entry.getKey().toString(), Integer.toString(total.getStart()),
                Integer.toString(total.getWin()), Integer.toString(total.getS()), Integer.toString(total.getA()),
                Integer.toString(total.getB()), Integer.toString(total.getC()), Integer.toString(total.getD()) });
        // ボス
        TreeItem boss = new TreeItem(root, SWT.NONE);
        boss.setText(new String[] { "Boss", "-", Integer.toString(total.getBossWin()),
                Integer.toString(total.getBossS()), Integer.toString(total.getBossA()),
                Integer.toString(total.getBossB()), Integer.toString(total.getBossC()),
                Integer.toString(total.getBossD()) });
        // 海域毎
        for (Entry<String, BattleAggDetailsDto> areaEntry : dto.getAreaDetails()) {
            BattleAggDetailsDto area = areaEntry.getValue();

            TreeItem sub = new TreeItem(root, SWT.NONE);
            sub.setText(new String[] { areaEntry.getKey(), Integer.toString(area.getStart()),
                    Integer.toString(area.getWin()), Integer.toString(area.getS()), Integer.toString(area.getA()),
                    Integer.toString(area.getB()), Integer.toString(area.getC()), Integer.toString(area.getD()) });
            // ボス
            TreeItem subBoss = new TreeItem(sub, SWT.NONE);
            subBoss.setText(new String[] { "Boss", "-",
                    Integer.toString(area.getBossWin()), Integer.toString(area.getBossS()),
                    Integer.toString(area.getBossA()), Integer.toString(area.getBossB()),
                    Integer.toString(area.getBossC()), Integer.toString(area.getBossD()) });
        }
        if (first)
            root.setExpanded(true);
        first = false;
    }
    this.packTableHeader();
}
 
开发者ID:silfumus,项目名称:logbook-EN,代码行数:44,代码来源:BattleAggDialog.java


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