use of org.concord.energy3d.model.FresnelReflector in project energy3d by concord-consortium.
the class ChangeFoundationFresnelReflectorAbsorberCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = reflectors.size();
newValues = new Foundation[n];
for (int i = 0; i < n; i++) {
final FresnelReflector r = reflectors.get(i);
newValues[i] = r.getReceiver();
r.setReceiver(oldValues[i]);
r.draw();
if (oldValues[i] != null) {
oldValues[i].drawSolarReceiver();
}
if (newValues[i] != null) {
newValues[i].drawSolarReceiver();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.FresnelReflector in project energy3d by concord-consortium.
the class ChangeAbsorberForAllFresnelReflectorsCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = reflectors.size();
for (int i = 0; i < n; i++) {
final FresnelReflector r = reflectors.get(i);
r.setReceiver(newValues[i]);
r.draw();
if (oldValues[i] != null) {
oldValues[i].drawSolarReceiver();
}
if (newValues[i] != null) {
newValues[i].drawSolarReceiver();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.FresnelReflector in project energy3d by concord-consortium.
the class SetSizeForAllFresnelReflectorsCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = reflectors.size();
newLengths = new double[n];
newWidths = new double[n];
newModuleLengths = new double[n];
for (int i = 0; i < n; i++) {
final FresnelReflector r = reflectors.get(i);
newLengths[i] = r.getLength();
newWidths[i] = r.getModuleWidth();
newModuleLengths[i] = r.getModuleLength();
r.setLength(oldLengths[i]);
r.setModuleWidth(oldWidths[i]);
r.setModuleLength(olModuleLengths[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.FresnelReflector in project energy3d by concord-consortium.
the class SetSizeForAllFresnelReflectorsCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = reflectors.size();
for (int i = 0; i < n; i++) {
final FresnelReflector r = reflectors.get(i);
r.setLength(newLengths[i]);
r.setModuleWidth(newWidths[i]);
r.setModuleLength(newModuleLengths[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.FresnelReflector in project energy3d by concord-consortium.
the class SetSizeForFresnelReflectorsOnFoundationCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = reflectors.size();
for (int i = 0; i < n; i++) {
final FresnelReflector r = reflectors.get(i);
r.setLength(newLengths[i]);
r.setModuleWidth(newWidths[i]);
r.setModuleLength(newModuleLengths[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
Aggregations