use of main.content.VALUE in project Eidolons by IDemiurge.
the class CreationHelper method fillOut.
private static void fillOut(ObjType type) {
List<VALUE> requiredValues = getRequiredValues(type, false);
// TODO
requiredValues = new ListObjChooser<VALUE>().selectMulti(requiredValues);
// TODO allow adding other vals
for (VALUE val : requiredValues) {
String value = type.getValue(val);
if (value.isEmpty()) {
ListChooser.setTooltip("Set " + val.getName());
value = getInput(val, type, type.getValue(val));
}
type.setValue(val, value);
}
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class VersionMaster method getVersionDifferenceMap.
public static Map<VALUE, String> getVersionDifferenceMap(VERSION_PERIOD period, int n, ArcaneEntity type) {
Map<VALUE, String> map = new XLinkedMap<>();
ObjType oldType = getOlderVersion(type, period, n);
for (PARAMETER p : oldType.getParamMap().keySet()) {
int diff = type.getIntParam(p) - oldType.getIntParam(p);
map.put(p, diff + "");
}
return map;
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class DataModel method cloneMapsWithExceptions.
public void cloneMapsWithExceptions(DataModel type, VALUE... exceptions) {
Map<VALUE, String> map = new HashMap<>();
for (VALUE exception : exceptions) {
map.put(exception, getValue(exception));
}
this.propMap = clonePropMap(type.getPropMap().getMap());
this.paramMap = cloneParamMap(type.getParamMap().getMap());
for (VALUE exception : exceptions) {
String value = map.get(exception);
if (exception instanceof PARAMETER) {
paramMap.put(exception.getName(), value);
} else if (exception instanceof PROPERTY) {
propMap.put(exception.getName(), value);
}
}
setDirty(true);
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class DataModel method mergeValues.
public void mergeValues(Entity type, VALUE... vals) {
for (VALUE val : vals) {
if (val instanceof PROPERTY) {
PROPERTY property = (PROPERTY) val;
addProperty(property, type.getProperty(property), true);
} else {
if (val instanceof PARAMETER) {
PARAMETER parameter = (PARAMETER) val;
addParam(parameter, type.getParam(parameter), false);
}
}
}
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class HeaderPanel method initValues.
private G_Panel initValues(VALUE[] values, boolean top) {
G_Panel panel = new G_Panel(// (top) ? "" :
"flowy");
for (VALUE v : values) {
String text = hero.getValue(v);
if (!top) {
text = v.getName() + ": " + text;
}
JLabel lbl = new JLabel(text);
// if (!top)
panel.add(lbl);
}
return panel;
}
Aggregations