use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeFoundationSolarPanelTiltAngleCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = panels.size();
for (int i = 0; i < n; i++) {
final SolarPanel p = panels.get(i);
p.setTiltAngle(newValues[i]);
p.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class SetShadeToleranceForSolarPanelsOnFoundationCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = solarPanels.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final SolarPanel s = solarPanels.get(i);
newValues[i] = s.getShadeTolerance();
s.setShadeTolerance(oldValues[i]);
}
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class SetShadeToleranceForAllSolarPanelsCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = panels.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final SolarPanel p = panels.get(i);
newValues[i] = p.getShadeTolerance();
p.setShadeTolerance(oldValues[i]);
}
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class SetSolarPanelArrayOnRackByModelCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final SolarPanel s = rack.getSolarPanel();
newModel = s.getPvModuleSpecs();
newRackWidth = rack.getRackWidth();
newRackHeight = rack.getRackHeight();
newRotated = s.isRotated();
newInverterEfficiency = s.getInverterEfficiency();
s.setPvModuleSpecs(oldModel);
s.setRotated(oldRotated);
s.setInverterEfficiency(oldInverterEfficiency);
rack.setRackWidth(oldRackWidth);
rack.setRackHeight(oldRackHeight);
rack.ensureFullSolarPanels(false);
rack.draw();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class SetSolarPanelArrayOnRackByModelCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final SolarPanel s = rack.getSolarPanel();
s.setPvModuleSpecs(newModel);
s.setRotated(newRotated);
s.setInverterEfficiency(newInverterEfficiency);
rack.setRackWidth(newRackWidth);
rack.setRackHeight(newRackHeight);
rack.ensureFullSolarPanels(false);
rack.draw();
}
Aggregations