AddExitEdit.java

dw_fluffos_v1/lib/d/admin/mapper/31-10-01/mapmaker/AddExitEdit.java · 609 B

From the archive dw_fluffos_v1.tar.gz

Download the archive   « Back to the archive contents

package mapmaker;

import javax.swing.undo.*;

public class AddExitEdit extends AbstractUndoableEdit
{
    private MapLocation mLocation;
    private Exit mExit;

    public AddExitEdit(MapLocation aLocation, Exit aExit)
    {
        mLocation = aLocation;
        mExit = aExit;
    }

    public void undo()
    {
        mLocation.removeExit(mExit);
    }

    public void redo()
    {
        mLocation.addExit(mExit);
    }

    public String getUndoPresentationName()
    {
        return "Undo Add Exit";
    }

    public String getRedoPresentationName()
    {
        return "Redo Add Exit";
    }
}

Site Stats

Snippets: 1791
Codebases: 571