Search in sources :

Example 1 with ValueBar

use of main.swing.generic.misc.ValueBar in project Eidolons by IDemiurge.

the class BarPanel method refresh.

public void refresh() {
    for (ValueBar bar : bars.values()) {
        bar.setObj(getObj());
        bar.refresh();
    }
}
Also used : ValueBar(main.swing.generic.misc.ValueBar)

Example 2 with ValueBar

use of main.swing.generic.misc.ValueBar 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++;
    }
}
Also used : G_Panel(main.swing.generic.components.G_Panel) ValueBar(main.swing.generic.misc.ValueBar) PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

ValueBar (main.swing.generic.misc.ValueBar)2 PARAMETER (main.content.values.parameters.PARAMETER)1 G_Panel (main.swing.generic.components.G_Panel)1