001package jmri.jmrit.operations.locations.tools; 002 003import java.awt.event.ActionEvent; 004 005import javax.swing.AbstractAction; 006 007import jmri.jmrit.operations.locations.TrackEditFrame; 008 009/** 010 * Action to create the TrackDestinationEditFrame. 011 * 012 * @author Daniel Boudreau Copyright (C) 2013 013 * 014 */ 015public class TrackDestinationEditAction extends AbstractAction { 016 017 private TrackEditFrame _tef = null; 018 private TrackDestinationEditFrame tdef = null; 019 020 public TrackDestinationEditAction(TrackEditFrame tef) { 021 super(Bundle.getMessage("MenuItemDestinations")); 022 _tef = tef; 023 } 024 025 @Override 026 public void actionPerformed(ActionEvent e) { 027 if (tdef != null) { 028 tdef.dispose(); 029 } 030 tdef = new TrackDestinationEditFrame(); 031 tdef.initComponents(_tef); 032 } 033}