use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class HT_View method resetTree.
public void resetTree(String name, boolean forceRebuild) {
panel.removeAll();
panel.setAutoZOrder(true);
if (forceRebuild) {
treeCache.remove(getArg(name));
}
tree = getTree(name);
Component bottom = null;
int bottomY = 45;
int bottomX = 40;
if (!CoreEngine.isArcaneVault()) {
try {
bottom = initBottomPanel();
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
} else {
if (bottomPanel == null) {
bottom = new TreeControlPanel(this);
bottomY += 15;
} else {
bottom = bottomPanel;
}
}
if (bottom != null) {
panel.add(bottom, "pos " + bottomX + " tree.y2-" + bottomY);
// panel.setComponentZOrder(bottom, i);
// i++;
}
tree.refresh();
panel.add(tree.getPanel(), "id tree, pos 40 50");
panel.add(new TextCompDC() {
@Override
protected Font getDefaultFont() {
return FontMaster.getFont(FONT.AVQ, 18, Font.PLAIN);
}
protected String getText() {
// .replace(" Mastery", "")
return arg.toString();
}
}, "id text, pos 45 10");
// panel.setComponentZOrder(controlPanel, 1);
// panel.setComponentZOrder(tree.getPanel(), i);
// i++;
// panel.add(controlPanel, "id cp, pos 70 90");
panel.refreshComponents();
panel.revalidate();
// refreshButtomPanel();
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class SkillBottomPanel method addSpecial.
protected void addSpecial() {
freePoints = new TextCompDC(VISUALS.SPACE_SMALL) {
protected String getText() {
return "Skill Points: " + DC_MathManager.getFreeMasteryPoints(hero, (PARAMETER) arg);
}
};
masteryScore = new TextCompDC(VISUALS.SPACE_SMALL) {
protected String getText() {
return "Final Score: " + hero.getIntParam(ContentManager.getMasteryScore((PARAMETER) arg));
}
};
masteryPoints = new PoolComp(hero, PARAMS.MASTERY_POINTS, "Mastery Points", false);
masteryComp = new HC_PointComp(true, hero, bufferType, (PARAMETER) arg, PARAMS.MASTERY_POINTS) {
public void mouseClicked(MouseEvent e) {
if (e.getSource() == upArrow) {
// sound
upClick();
tree.refresh();
refresh();
} else if (e.getSource() == downArrow) {
// sound
downClick();
// CharacterCreator.refreshGUI();
tree.refresh();
} else if (e.getSource() == lock) {
lockClick(e);
}
}
};
// @center_x
add(freePoints, "id points, pos @center_x-" + VISUALS.SPACE_SMALL.getWidth() / 2 + " 0");
add(masteryScore, "id masteryScore, pos points.x2+1 points.y");
add(masteryComp, "id masteryComp, pos 0 points.y2");
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class UnlockDialog method createComponent.
@Override
public Component createComponent() {
G_Panel panel = new G_Panel(PANEL_WIDE);
CustomButton xpButton = new UnlockButton(true);
xpButton.setToolTipText(XP);
xpButton.setText(xpCost + " xp");
CustomButton goldButton = new UnlockButton(false);
goldButton.setText(goldCost + " gold");
goldButton.setToolTipText(GOLD);
CustomButton cancelButton = new CustomButton(VISUALS.CANCEL) {
@Override
public void handleClick() {
cancel();
}
};
TextCompDC label = new TextCompDC(VISUALS.PROP_BOX);
label.setText("Unlock " + param.getName());
panel.add(label, "pos 20 50");
if (xpCost > 0) {
panel.add(xpButton, "pos 50 100");
}
panel.add(cancelButton, "pos 300 50");
if (goldCost > 0) {
panel.add(goldButton, "pos 300 100");
}
return panel;
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class DirectionHeader method addText.
private void addText() {
TextCompDC textComp = new TextCompDC(null, session.getName(), getFontSize(), FONT.AVQ, getTextColor());
textComp.setDefaultSize(panelSize);
add(textComp, "pos @centered_x centered_y");
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class ListChoiceView method getListCellRendererComponent.
@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value, int index, boolean isSelected, boolean cellHasFocus) {
// size
int fontSize = 16;
int style = Font.PLAIN;
if (isSelected) {
fontSize++;
style = Font.BOLD;
}
// box vs hl_box ++ size
// flexibility/independence?
TextCompDC comp = new TextCompDC(V, value);
comp.setFont(FontMaster.getFont(FONT.NYALA, fontSize, style));
return comp;
}
Aggregations