use of delta.games.lotro.character.stats.contribs.StatsContributionsManager in project lotro-companion by dmorcellet.
the class MainTestStatContribsChart method doIt.
private void doIt(CharacterData data) {
StatsContributionsManager contribs = new StatsContributionsManager(data.getCharacterClass());
CharacterStatsComputer statsComputer = new CharacterStatsComputer(contribs);
BasicStatsSet stats = statsComputer.getStats(data);
System.out.println(stats);
contribs.setResolveIndirectContributions(true);
contribs.compute();
JPanel panel = GuiFactory.buildBackgroundPanel(new BorderLayout());
JTabbedPane tabs = GuiFactory.buildTabbedPane();
panel.add(tabs, BorderLayout.CENTER);
for (STAT stat : STAT.values()) {
ContribsByStat contribsForStat = contribs.getContribs(stat);
if (contribsForStat != null) {
StatContribsChartPanelController chartController = new StatContribsChartPanelController();
chartController.setContributions(contribsForStat);
JPanel statPanel = chartController.getPanel();
tabs.add(stat.getName(), statPanel);
}
}
DefaultWindowController w = new DefaultWindowController();
w.getFrame().add(panel);
w.getFrame().pack();
w.show();
}
Aggregations