use of main.content.values.parameters.MultiParameter in project Eidolons by IDemiurge.
the class ParamElement method paintParamIcon.
private void paintParamIcon(Graphics g) {
if (value instanceof MultiParameter) {
MultiParameter multiParameter = (MultiParameter) value;
if (image == null) {
image = ImageManager.getValueIcon(multiParameter.getParameters()[0]);
}
if (image == null) {
image = ImageManager.getEmptyEmblem().getImage();
}
g.drawImage(image, x, (getVisuals().getHeight() - image.getHeight(null)) / 2, null);
}
}
use of main.content.values.parameters.MultiParameter in project Eidolons by IDemiurge.
the class DataModel method getValue.
public String getValue(VALUE val, boolean base) {
String value = "";
if (val instanceof MultiParameter) {
MultiParameter multiParameter = (MultiParameter) val;
for (PARAMETER p : multiParameter.getParameters()) {
value += getParamRounded(p, base) + multiParameter.getSeparator();
// % sign?
}
value = StringMaster.cropLast(value, multiParameter.getSeparator().length());
} else if (val instanceof PARAMETER) {
value = getDoubleParam((PARAMETER) val, base);
} else if (val instanceof PROPERTY) {
value = getProperty((PROPERTY) val);
}
if (value == null) {
LogMaster.log(LogMaster.VALUE_DEBUG, "Value not found: " + val.getName());
}
return value;
}
Aggregations