use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class MusicCore method getGroupedView.
public static MusicListPanel getGroupedView(int option, Class<?> constClass) {
if (option == -1) {
return null;
}
PROPERTY filterProp = ContentManager.getPROP(constClass.getSimpleName());
// String[] array = (AHK_Master.qwerty + " " +
// AHK_Master.qwerty.substring(1).toUpperCase() + " 123")
// .split(" ");
String viewName = "All " + StringMaster.getWellFormattedString(constClass.getSimpleName());
Map<String, List<String>> map = new XLinkedMap<>();
List<String> musicConsts = EnumMaster.getEnumConstantNames(constClass);
if (option != 0) {
musicConsts = getMusicConsts(constClass, option);
viewName = getViewName(constClass, option);
}
Map<ObjType, String> multiPropMap = new HashMap<>();
loop: for (String g : musicConsts) {
// map.
List<String> list = new ArrayList<>();
// for (MusicList musList : listTypeMap.values()) {
typeLoop: for (ObjType type : DataManager.getTypes(AT_OBJ_TYPE.MUSIC_LIST)) {
if (type.checkProperty(filterProp, g)) {
if (filterProp.isContainer()) {
containerLoop: for (String sub : StringMaster.open(type.getProperty(filterProp))) {
for (String c : musicConsts) {
if (StringMaster.compare(c, sub)) {
if (c.equalsIgnoreCase(g)) {
break containerLoop;
} else {
multiPropMap.put(type, c);
continue typeLoop;
}
}
}
}
}
list.add(AHK_Master.getScriptLineForList(type));
}
}
map.put(g, list);
}
for (ObjType sub : multiPropMap.keySet()) {
for (String c : map.keySet()) {
if (multiPropMap.get(sub).equals(c)) {
map.get(c).add(AHK_Master.getScriptLineForList(sub));
}
}
}
for (String sub : map.keySet()) {
map.put(sub, new ArrayList<>(new LinkedHashSet<>(map.get(sub))));
}
// TODO adapt to max list size also
int wrap = 5 - map.size() / 2;
MusicListPanel musicListPanel = new MusicListPanel("", null);
G_Panel view = // AHK_Master.getPanel()
musicListPanel.initView(map, false, wrap, musicConsts);
musicListPanel.setView(view);
view.setName(viewName);
return musicListPanel;
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class GoalPages method createPageComponent.
@Override
protected G_Component createPageComponent(List<Goal> list) {
G_Panel goalsPanel = new G_Panel();
for (Goal goal : list) {
if (goal == null) {
continue;
}
GoalPanel goalPanel = new GoalPanel(goal);
goalsPanel.add(goalPanel);
}
return goalsPanel;
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class GatewayWindow method init.
public void init() {
panel = new G_Panel();
G_Panel backgroundPanel = initBackgroundPanel();
String pos = "pos 0 0, id backgroundPanel";
// panel.add(backgroundPanel, pos);
G_Panel buttonPanel = initButtonPanel();
pos = "pos 0 0, id buttonPanel";
panel.add(buttonPanel, pos);
view = new GatewayView();
pos = "pos 0 buttonPanel.y2, id gatewayView";
panel.add(view, pos);
// G_Panel statsPanel; //
// G_Panel sessionInfoPanel;
// G_Panel objEditPanel; // task, goal, ...
// G_Panel boxPanel; // switch style,
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class GatewayWindow method initBackgroundPanel.
private G_Panel initBackgroundPanel() {
Image img = getBackgroundPicture();
G_Panel panel = new G_Panel(new CompVisuals(img));
// img = DC_GameGUI.createBackgroundOverlay();
panel.add(new JLabel(new ImageIcon(img)));
return panel;
}
use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.
the class SessionWindow method initBox.
private JComboBox initBox(Object[] items, String tooltip) {
JComboBox<?> box = new JComboBox<>(items);
box.setSelectedIndex(0);
box.addActionListener(this);
G_Panel wrapper = new G_Panel("flowy");
wrapper.add(new TextComp(tooltip, Color.black));
wrapper.add(box, "pos 0 20");
boxPanel.add(wrapper);
return box;
}
Aggregations