001package jmri.jmrit.symbolicprog; 002 003import java.awt.event.ActionEvent; 004import javax.swing.AbstractAction; 005import jmri.jmrit.symbolicprog.tabbedframe.PaneProgFrame; 006 007/** 008 * Action to print the information in a VariableTable. 009 * <p> 010 * This uses the older style printing, for compatibility with Java 1.1.8 in 011 * Macintosh MRJ 012 * 013 * @author Bob Jacobsen Copyright (C) 2003 014 * @author Dennis Miller Copyright (C) 2005 015 */ 016public class PrintAction extends AbstractAction { 017 018 public PrintAction(String actionName, PaneProgFrame frame, boolean preview) { 019 super(actionName); 020 mFrame = frame; 021 isPreview = preview; 022 } 023 024 /** 025 * Frame hosting the printing 026 */ 027 PaneProgFrame mFrame; 028 /** 029 * Variable to set whether this is to be printed or previewed 030 */ 031 boolean isPreview; 032 033 @Override 034 public void actionPerformed(ActionEvent e) { 035 mFrame.printPanes(isPreview); 036 } 037}