use of delta.common.ui.swing.text.dates.DateCodec in project lotro-companion by dmorcellet.
the class LevelHistoryEditionPanelController method buildPanel.
private JPanel buildPanel() {
JPanel panel = GuiFactory.buildPanel(new BorderLayout());
DateCodec codec = DateFormat.getDateTimeCodec();
for (int level = 1; level <= _maxLevel; level++) {
DateEditionController editor = new DateEditionController(codec);
_editors.put(Integer.valueOf(level), editor);
}
JTabbedPane pane = GuiFactory.buildTabbedPane();
int nbLevels = _maxLevel;
int nbTabs = (nbLevels / LEVELS_BY_TAB) + (((nbLevels % LEVELS_BY_TAB) == 0) ? 0 : 1);
int currentLevel = 1;
for (int i = 0; i < nbTabs; i++) {
int endLevel = Math.min(nbLevels, currentLevel + LEVELS_BY_TAB - 1);
initTab(pane, currentLevel, endLevel);
currentLevel = endLevel + 1;
}
panel.add(pane, BorderLayout.CENTER);
return panel;
}
Aggregations