001package jmri.jmrit.decoderdefn; 002 003import java.awt.event.ActionEvent; 004import javax.swing.Icon; 005import jmri.util.swing.JmriAbstractAction; 006import jmri.util.swing.WindowInterface; 007 008/** 009 * Update the decoder index and store 010 * 011 * @author Bob Jacobsen Copyright (C) 2001, 2011 012 * @see jmri.jmrit.XmlFile 013 */ 014public class DecoderIndexCreateAction extends JmriAbstractAction { 015 016 public DecoderIndexCreateAction(String s, WindowInterface wi) { 017 super(s, wi); 018 } 019 020 public DecoderIndexCreateAction(String s, Icon i, WindowInterface wi) { 021 super(s, i, wi); 022 } 023 024 public DecoderIndexCreateAction(String s) { 025 super(s); 026 } 027 028 boolean increment = false; 029 030 public void setIncrement(boolean increment) { 031 this.increment = increment; 032 } 033 034 @Override 035 public void actionPerformed(ActionEvent e) { 036 DecoderIndexFile.forceCreationOfNewIndex(increment); 037 } 038 039 // never invoked, because we overrode actionPerformed above 040 @Override 041 public jmri.util.swing.JmriPanel makePanel() { 042 throw new IllegalArgumentException("Should not be invoked"); 043 } 044}