Search in sources :

Example 26 with Rack

use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.

the class ChangeAzimuthForAllRacksCommand 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.setRelativeAzimuth(newValues[i]);
        r.draw();
    }
    SceneManager.getInstance().refresh();
}
Also used : Rack(org.concord.energy3d.model.Rack)

Example 27 with Rack

use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.

the class ChangeFoundationRackTiltAngleCommand 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.setTiltAngle(newValues[i]);
        r.draw();
    }
    SceneManager.getInstance().refresh();
}
Also used : Rack(org.concord.energy3d.model.Rack)

Example 28 with Rack

use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.

the class ChangeFoundationRackTiltAngleCommand method undo.

@Override
public void undo() throws CannotUndoException {
    super.undo();
    final int n = racks.size();
    newValues = new double[n];
    for (int i = 0; i < n; i++) {
        final Rack r = racks.get(i);
        newValues[i] = r.getTiltAngle();
        r.setTiltAngle(oldValues[i]);
        r.draw();
    }
    SceneManager.getInstance().refresh();
}
Also used : Rack(org.concord.energy3d.model.Rack)

Example 29 with Rack

use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.

the class ChangeMonthlyTiltAnglesForAllRacksCommand method undo.

@Override
public void undo() throws CannotUndoException {
    super.undo();
    final int n = racks.size();
    newValues = new double[n][12];
    for (int i = 0; i < n; i++) {
        final Rack r = racks.get(i);
        newValues[i] = r.getMonthlyTiltAngles();
        r.setMonthlyTiltAngles(oldValues[i]);
        r.draw();
    }
    SceneManager.getInstance().refresh();
}
Also used : Rack(org.concord.energy3d.model.Rack)

Example 30 with Rack

use of org.concord.energy3d.model.Rack in project energy3d by concord-consortium.

the class ChangeMonthlyTiltAnglesForAllRacksCommand 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.setMonthlyTiltAngles(newValues[i]);
        r.draw();
    }
    SceneManager.getInstance().refresh();
}
Also used : Rack(org.concord.energy3d.model.Rack)

Aggregations

Rack (org.concord.energy3d.model.Rack)126 HousePart (org.concord.energy3d.model.HousePart)67 SolarPanel (org.concord.energy3d.model.SolarPanel)66 Foundation (org.concord.energy3d.model.Foundation)45 Window (org.concord.energy3d.model.Window)27 Roof (org.concord.energy3d.model.Roof)25 Wall (org.concord.energy3d.model.Wall)23 Mirror (org.concord.energy3d.model.Mirror)22 Door (org.concord.energy3d.model.Door)20 FresnelReflector (org.concord.energy3d.model.FresnelReflector)16 ParabolicTrough (org.concord.energy3d.model.ParabolicTrough)16 ParabolicDish (org.concord.energy3d.model.ParabolicDish)15 ActionEvent (java.awt.event.ActionEvent)12 ActionListener (java.awt.event.ActionListener)12 Vector3 (com.ardor3d.math.Vector3)10 ReadOnlyVector3 (com.ardor3d.math.type.ReadOnlyVector3)10 JMenuItem (javax.swing.JMenuItem)10 Tree (org.concord.energy3d.model.Tree)10 Floor (org.concord.energy3d.model.Floor)9 ArrayList (java.util.ArrayList)8