use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChooseSolarPanelSizeForRackCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final SolarPanel s = rack.getSolarPanel();
s.setPanelWidth(newWidth);
s.setPanelHeight(newHeight);
s.setNumberOfCellsInX(newCellNx);
s.setNumberOfCellsInY(newCellNy);
rack.setRackWidth(newRackWidth);
rack.setRackHeight(newRackHeight);
rack.ensureFullSolarPanels(false);
rack.draw();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class SetSolarPanelArrayOnRackCustomCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final SolarPanel s = rack.getSolarPanel();
copySolarPanelProperties(s, newValue);
rack.ensureFullSolarPanels(false);
rack.draw();
}
use of org.concord.energy3d.model.SolarPanel in project energy3d by concord-consortium.
the class ChangeTiltAngleForAllSolarPanelsCommand 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 ChangeTiltAngleForAllSolarPanelsCommand 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 ChangeTiltAngleForSolarPanelRowCommand 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();
}
Aggregations