use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.
the class SetSolarPanelCellTypeForAllRacksCommand 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.getSolarPanel().setCellType(newValues[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.
the class SetSolarPanelCellTypeForAllRacksCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = racks.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final Rack r = racks.get(i);
newValues[i] = r.getSolarPanel().getCellType();
r.getSolarPanel().setCellType(oldValues[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.
the class SetSolarPanelCellTypeForRacksOnFoundationCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = racks.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final Rack r = racks.get(i);
newValues[i] = r.getSolarPanel().getCellType();
r.getSolarPanel().setCellType(oldValues[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.
the class SetSolarPanelColorForAllRacksCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = racks.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final Rack r = racks.get(i);
newValues[i] = r.getSolarPanel().getColorOption();
r.getSolarPanel().setColorOption(oldValues[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.
the class SetSolarPanelColorForRacksOnFoundationCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = racks.size();
newValues = new int[n];
for (int i = 0; i < n; i++) {
final Rack r = racks.get(i);
newValues[i] = r.getSolarPanel().getColorOption();
r.getSolarPanel().setColorOption(oldValues[i]);
r.draw();
}
SceneManager.getInstance().refresh();
}
Aggregations