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