001package jmri.jmrix.loconet.hexfile; 002 003import java.awt.event.ActionEvent; 004import javax.swing.AbstractAction; 005import org.slf4j.Logger; 006import org.slf4j.LoggerFactory; 007 008/** 009 * Swing action to create and register a LnHexFileFrame object 010 * 011 * @author Bob Jacobsen Copyright (C) 2001 012 */ 013public class LnHexFileAction extends AbstractAction { 014 015 public LnHexFileAction(String s) { 016 super(s); 017 } 018 019 @Override 020 public void actionPerformed(ActionEvent e) { 021 // create a LnHexFileFrame 022 HexFileFrame f = new HexFileFrame(); 023 try { 024 f.initComponents(); 025 } catch (Exception ex) { 026 log.error("starting HexFileFrame exception: {}", ex.toString()); 027 } 028 f.pack(); 029 f.setVisible(true); 030 // it connects to the LnTrafficController when the right button is pressed 031 032 } 033 034 private final static Logger log = LoggerFactory.getLogger(LnHexFileAction.class); 035 036}