01: package gnu.jemacs.swing;
02:
03: import javax.swing.*;
04: import javax.swing.text.*;
05:
06: /** A pseudo-action to wrap an integer. */
07:
08: public class TooLongAction extends javax.swing.AbstractAction {
09: int maxValid;
10:
11: public TooLongAction(int maxValid) {
12: //super(Integer.toString(maxValid));
13: this .maxValid = maxValid;
14: }
15:
16: public int getMaxValid() {
17: return maxValid;
18: }
19:
20: public void actionPerformed(java.awt.event.ActionEvent event) {
21: // Should never happen - ignore.
22: ((SwingWindow) SwingWindow.getWindow(event)).flushPending();
23: }
24:
25: }
|