001package jmri.jmrit.operations.routes.tools; 002 003import java.awt.event.ActionEvent; 004 005import javax.swing.AbstractAction; 006 007import jmri.jmrit.operations.routes.Route; 008 009/** 010 * Action to print a summary of a route. 011 * 012 * @author Bob Jacobsen Copyright (C) 2003 013 * @author Daniel Boudreau Copyright (C) 2009, 2012, 2023 014 */ 015public class PrintRouteAction extends AbstractAction { 016 017 public PrintRouteAction(boolean isPreview, Route route) { 018 super(isPreview? Bundle.getMessage("MenuItemPreview") : Bundle.getMessage("MenuItemPrint")); 019 _isPreview = isPreview; 020 _route = route; 021 } 022 023 boolean _isPreview; 024 Route _route; 025 026 @Override 027 public void actionPerformed(ActionEvent e) { 028 new PrintRoutes(_isPreview, _route); 029 } 030}