本文整理匯總了Java中logbook.dto.BattleAggUnitDto.getTotal方法的典型用法代碼示例。如果您正苦於以下問題:Java BattleAggUnitDto.getTotal方法的具體用法?Java BattleAggUnitDto.getTotal怎麽用?Java BattleAggUnitDto.getTotal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類logbook.dto.BattleAggUnitDto
的用法示例。
在下文中一共展示了BattleAggUnitDto.getTotal方法的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();
}
示例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();
}