use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class G_ScrolledPanel method refresh.
@Override
public void refresh() {
removeAll();
resetComps();
spaceTaken = 0;
if (isArrowShown(false)) {
addArrows(false);
}
for (int i = offset; i < comps.size(); i++) {
G_Panel component = comps.get(i);
int spaceRequired = vertical ? component.getPanelHeight() : component.getPanelWidth();
if (spaceRequired > getSpace() - spaceTaken) {
break;
}
String y = vertical ? "" + spaceTaken : isCentering() ? "@center_y" : "0";
String x = !vertical ? "" + spaceTaken : isCentering() ? "@center_x" : "0";
spaceTaken += spaceRequired;
add(component, "pos " + x + " " + y);
}
if (isArrowShown(true)) {
addArrows(true);
}
refreshComponents();
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class G_TabbedPagePanel method refresh.
// getdefaultY()
@Override
public void refresh() {
super.refresh();
// new G_TabbedPanel();
if (tabs == null) {
tabs = new G_Panel(vertical ? "flowy" : "");
} else {
tabs.removeAll();
}
int i = 0;
for (E sub : getTabData()) {
tabs.add(createTab(sub, i));
i++;
}
add(tabs);
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class BarPanel method initBars.
public void initBars() {
panel = new G_Panel("flowy");
int i = 0;
for (PARAMETER v : vals) {
ValueBar valueBar = new ValueBar(v, colors.get(i)) {
public void refresh() {
super.refresh();
c_val = max_val;
max_val = 100;
percentage = c_val * MathMaster.MULTIPLIER / max_val;
}
protected PARAMETER getPercentageParameter(PARAMETER param) {
return null;
}
};
bars.put(v, valueBar);
panel.add(valueBar, "w " + getWidth() + ",h " + getHeight());
i++;
}
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class FormulaBuilder method initParamTab.
private void initParamTab() {
Collection<PARAMETER> data = ContentManager.getParamList();
G_List<PARAMETER> c = new G_List<>(data);
G_Panel panel = new G_Panel();
panel.add(c, "pos 0 0");
String title = PARAMS;
tabs.addTab(c, title, null);
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class SwingMaster method decorateWithText.
public static G_Panel decorateWithText(String tooltip, Color c, Component box, String constraints) {
G_Panel wrapper = new G_Panel("flowy");
wrapper.add(new TextComp(tooltip, c));
wrapper.add(box, constraints);
return wrapper;
}
Aggregations