use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.
the class T3InfoPanel method init.
public void init() {
Entity skill = null;
try {
skill = CharacterCreator.getHero().getSkills().get(flipped ? 1 : 0);
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
infoPanel = new DC_PagedInfoPanel(skill);
ImageIcon icon = ImageManager.getEmptyItemIcon(flipped);
if (skill != null) {
icon = skill.getIcon();
}
label = new JLabel(icon);
controlPanel = new G_Panel();
controlPanel.setPanelSize(new Dimension(122, getPanelSize().height));
costPool = new PoolComp(skill, PARAMS.XP_COST, "Experience cost", false);
xpPool = new PoolComp(CharacterCreator.getHero(), PARAMS.XP, "Experience points", true) {
};
addComps();
}
use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.
the class ChoiceView method addInfoPanels.
protected void addInfoPanels() {
Entity entity = null;
if (data.size() > 0) {
if (data.get(0) instanceof Entity) {
entity = (Entity) data.get(0);
}
}
infoPanel = new DC_PagedInfoPanel(entity);
add(infoPanel, IP_POS);
infoPanel.refresh();
}
use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.
the class HeroPanel method init.
private void init() {
xpBar = new SpecialValueBar(false, PARAMS.XP);
xpBar.setObj(hero);
integrityBar = new SpecialValueBar(true, PARAMS.INTEGRITY);
integrityBar.setObj(hero);
values = new ValueIconPanel(hero);
infoPanel = new DC_PagedInfoPanel(hero);
buffPanel = new DC_PagedBuffPanel();
buffPanel.setObj(hero);
itemPanel = new DC_ItemPanel(hero.getGame(), true);
itemPanel.setObj(hero);
lowerPanel = new DC_PagedInfoPanel(hero);
header = new HeroHeader(hero, this);
comps = new G_Component[] { header, values, buffPanel, infoPanel, lowerPanel };
}
use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.
the class CharacterCreator method typeSelected.
public static void typeSelected(final Entity type) {
if (type != null) {
DC_Game.game.getValueHelper().setEntity(type);
}
if (Launcher.getView() == VIEWS.T3) {
HC_Master.getT3View().selected(type);
return;
}
DC_PagedInfoPanel firstPanel = getHeroPanel().getMiddlePanel().getUpperPanel();
Entity entity = firstPanel.getEntity();
firstPanel.setEntity(type);
firstPanel.refresh();
try {
getHeroPanel().getMiddlePanel().getArc().getUpperIcon().setIcon(new ImageIcon(type.getImage()));
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
DC_PagedInfoPanel secondPanel = getHeroPanel().getMiddlePanel().getLowerPanel();
if (secondPanel != null) {
secondPanel.setEntity(entity);
secondPanel.refresh();
try {
getHeroPanel().getMiddlePanel().getArc().getLowerIcon().setIcon(new ImageIcon(entity.getImage()));
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
}
}
Aggregations