use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeSolarPanelModelForRacksOnFoundationCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = racks.size();
for (int i = 0; i < n; i++) {
final Rack r = racks.get(i);
r.setRackWidth(newWidths[i]);
r.setRackHeight(newHeights[i]);
final SolarPanel s = r.getSolarPanel();
s.setPvModuleSpecs(newModels[i]);
r.ensureFullSolarPanels(false);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeFoundationSolarPanelModelCommand 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.setPvModuleSpecs(newModels[i]);
p.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeFoundationSolarPanelTiltAngleCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = panels.size();
newValues = new double[n];
for (int i = 0; i < n; i++) {
final SolarPanel p = panels.get(i);
newValues[i] = p.getTiltAngle();
p.setTiltAngle(oldValues[i]);
p.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeModelForAllSolarPanelsCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = panels.size();
newModels = new PvModuleSpecs[n];
for (int i = 0; i < n; i++) {
final SolarPanel p = panels.get(i);
newModels[i] = p.getPvModuleSpecs();
p.setPvModuleSpecs(oldModels[i]);
p.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeModelForAllSolarPanelsCommand 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.setPvModuleSpecs(newModels[i]);
p.draw();
}
SceneManager.getInstance().refresh();
}
Aggregations