Search in sources :

Example 6 with DesignSpecs

use of org.concord.energy3d.simulation.DesignSpecs in project energy3d by concord-consortium.

the class BuildingCostGraph method updateBudget.

public void updateBudget() {
    if (budgetPanel != null && foundation != null) {
        calculateCost();
        final DesignSpecs specs = Scene.getInstance().getDesignSpecs();
        budgetBar.setEnabled(specs.isBudgetEnabled());
        budgetBar.setMaximum(specs.getMaximumBudget());
        final String t = "Total (" + (specs.isBudgetEnabled() ? "\u2264 $" + noDecimals.format(specs.getMaximumBudget()) : "$") + ")";
        budgetPanel.setBorder(EnergyPanel.createTitledBorder(t, true));
        budgetBar.setValue((float) totalCost);
        budgetBar.repaint();
        budgetPanel.repaint();
    }
}
Also used : DesignSpecs(org.concord.energy3d.simulation.DesignSpecs)

Example 7 with DesignSpecs

use of org.concord.energy3d.simulation.DesignSpecs in project energy3d by concord-consortium.

the class BuildingInfoPanel method updateAreaBounds.

public void updateAreaBounds() {
    final DesignSpecs specs = Scene.getInstance().getDesignSpecs();
    final double r = 3.28084 * 3.28084;
    String t = "Area (";
    switch(Scene.getInstance().getUnit()) {
        case InternationalSystemOfUnits:
            if (specs.isAreaEnabled()) {
                t += twoDecimals.format(specs.getMinimumArea()) + " - " + twoDecimals.format(specs.getMaximumArea()) + " ";
            }
            t += "m\u00B2)";
            areaBar.setMinimum(specs.getMinimumArea());
            areaBar.setMaximum(specs.getMaximumArea());
            break;
        case USCustomaryUnits:
            if (specs.isAreaEnabled()) {
                t += noDecimals.format(specs.getMinimumArea() * r) + " - " + noDecimals.format(specs.getMaximumArea() * r) + " ";
            }
            t += "ft\u00B2)";
            areaBar.setMinimum(specs.getMinimumArea() * r);
            areaBar.setMaximum(specs.getMaximumArea() * r);
            break;
    }
    areaPanel.setBorder(EnergyPanel.createTitledBorder(t, true));
    areaBar.setEnabled(specs.isAreaEnabled());
    areaBar.repaint();
}
Also used : DesignSpecs(org.concord.energy3d.simulation.DesignSpecs)

Example 8 with DesignSpecs

use of org.concord.energy3d.simulation.DesignSpecs in project energy3d by concord-consortium.

the class BuildingInfoPanel method updateWindowNumberBounds.

public void updateWindowNumberBounds() {
    final DesignSpecs specs = Scene.getInstance().getDesignSpecs();
    String t = "Number of windows";
    if (specs.isNumberOfWindowsEnabled()) {
        if (specs.getMinimumNumberOfWindows() == 0) {
            t += " (<" + specs.getMaximumNumberOfWindows() + ")";
        } else {
            t += " (" + specs.getMinimumNumberOfWindows() + " - " + specs.getMaximumNumberOfWindows() + ")";
        }
    }
    windowCountBar.setMinimum(specs.getMinimumNumberOfWindows());
    windowCountBar.setMaximum(specs.getMaximumNumberOfWindows());
    windowCountPanel.setBorder(EnergyPanel.createTitledBorder(t, true));
    windowCountBar.setEnabled(specs.isNumberOfWindowsEnabled());
    windowCountBar.repaint();
}
Also used : DesignSpecs(org.concord.energy3d.simulation.DesignSpecs)

Aggregations

DesignSpecs (org.concord.energy3d.simulation.DesignSpecs)8 ColorRGBA (com.ardor3d.math.ColorRGBA)1 ReadOnlyColorRGBA (com.ardor3d.math.type.ReadOnlyColorRGBA)1 Date (java.util.Date)1 EnergyPanel (org.concord.energy3d.gui.EnergyPanel)1 HousePart (org.concord.energy3d.model.HousePart)1 Human (org.concord.energy3d.model.Human)1 Tree (org.concord.energy3d.model.Tree)1 Atmosphere (org.concord.energy3d.simulation.Atmosphere)1 CspCustomPrice (org.concord.energy3d.simulation.CspCustomPrice)1 CspDesignSpecs (org.concord.energy3d.simulation.CspDesignSpecs)1 Ground (org.concord.energy3d.simulation.Ground)1 LocationData (org.concord.energy3d.simulation.LocationData)1 PvCustomPrice (org.concord.energy3d.simulation.PvCustomPrice)1 PvDesignSpecs (org.concord.energy3d.simulation.PvDesignSpecs)1