use of delta.games.lotro.character.CharacterSummary in project lotro-companion by dmorcellet.
the class CharactersSelectorPanelController method buildToonCheckbox.
private JCheckBox buildToonCheckbox(CharacterFile toon) {
JCheckBox ret = null;
CharacterSummary summary = toon.getSummary();
if (summary != null) {
String name = summary.getName();
ret = GuiFactory.buildCheckbox(name);
String id = toon.getIdentifier();
_checkboxes.put(id, ret);
boolean selected = isSelected(toon);
ret.setSelected(selected);
boolean enabled = _enabledToons.contains(toon);
ret.setEnabled(enabled);
ret.addItemListener(this);
}
return ret;
}
use of delta.games.lotro.character.CharacterSummary in project lotro-companion by dmorcellet.
the class ReputationSynopsisTableController method buildToonHeaderPanel.
private JPanel buildToonHeaderPanel(CharacterFile toon) {
JPanel panel = GuiFactory.buildBackgroundPanel(new GridBagLayout());
// Class icon
GridBagConstraints c = new GridBagConstraints(0, 0, 1, 2, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);
ImageIcon classIcon = null;
CharacterSummary summary = toon.getSummary();
if (summary != null) {
CharacterClass cClass = summary.getCharacterClass();
classIcon = LotroIconsManager.getClassIcon(cClass, LotroIconsManager.COMPACT_SIZE);
}
JLabel classLabel;
if (classIcon != null) {
classLabel = new JLabel(classIcon);
} else {
classLabel = new JLabel("(class)");
}
panel.add(classLabel, c);
// Toon name
String name = toon.getName();
JLabel nameLabel = GuiFactory.buildLabel(name, 16.0f);
c = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 2, 2, 2), 0, 0);
panel.add(nameLabel, c);
return panel;
}
use of delta.games.lotro.character.CharacterSummary in project lotro-companion by dmorcellet.
the class WarbandsTableController method buildToonHeaderPanel.
private JPanel buildToonHeaderPanel(CharacterFile toon) {
JPanel panel = GuiFactory.buildBackgroundPanel(new GridBagLayout());
// Class icon
GridBagConstraints c = new GridBagConstraints(0, 0, 1, 2, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);
ImageIcon classIcon = null;
CharacterSummary summary = toon.getSummary();
if (summary != null) {
CharacterClass cClass = summary.getCharacterClass();
classIcon = LotroIconsManager.getClassIcon(cClass, LotroIconsManager.COMPACT_SIZE);
}
JLabel classLabel;
if (classIcon != null) {
classLabel = new JLabel(classIcon);
} else {
classLabel = new JLabel("(class)");
}
panel.add(classLabel, c);
// Toon name
String name = toon.getName();
JLabel nameLabel = GuiFactory.buildLabel(name, 16.0f);
c = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 2, 2, 2), 0, 0);
panel.add(nameLabel, c);
// Log update
Date logDate = toon.getLastLogUpdate();
String logDateStr = "";
if (logDate != null) {
logDateStr = Formats.getDateString(logDate);
}
JLabel logDateLabel = GuiFactory.buildLabel(logDateStr);
c = new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(2, 2, 5, 2), 0, 0);
panel.add(logDateLabel, c);
return panel;
}
Aggregations