/** * Begins recording a macro. After this method is called, all input/caret * events, etc. are recorded until <code>endMacroRecording</code> is * called. If this method is called but the text component is already * recording a macro, nothing happens (but the macro keeps recording). * * @see #isRecordingMacro() * @see #endRecordingMacro() */ public static synchronized void beginRecordingMacro() { if (isRecordingMacro()) { //System.err.println("Macro already being recorded!"); return; } //JOptionPane.showMessageDialog(this, "Now recording a macro"); if (currentMacro!=null) { currentMacro = null; // May help gc? } currentMacro = new Macro(); recordingMacro = true; }
/** * Begins recording a macro. After this method is called, all input/caret * events, etc. are recorded until <code>endMacroRecording</code> is * called. If this method is called but the text component is already * recording a macro, nothing happens (but the macro keeps recording). * * @see #isRecordingMacro() * @see #endRecordingMacro() */ public static synchronized void beginRecordingMacro() { if (isRecordingMacro()) { //System.err.println("Macro already being recorded!"); return; } //JOptionPane.showMessageDialog(this, "Now recording a macro"); if (currentMacro!=null) { currentMacro = null; // May help gc? } currentMacro = new Macro(); recordingMacro = true; }
/** * Begins recording a macro. After this method is called, all input/caret * events, etc. are recorded until <code>endMacroRecording</code> is * called. If this method is called but the text component is already * recording a macro, nothing happens (but the macro keeps recording). * * @see #isRecordingMacro() * @see #endRecordingMacro() */ public static synchronized void beginRecordingMacro() { if (isRecordingMacro()) { //System.err.println("Macro already being recorded!"); return; } //JOptionPane.showMessageDialog(this, "Now recording a macro"); if (currentMacro!=null) currentMacro = null; // May help gc? currentMacro = new Macro(); recordingMacro = true; }
/** * Begins recording a macro. After this method is called, all input/caret * events, etc. are recorded until <code>endMacroRecording</code> is * called. If this method is called but the text component is already * recording a macro, nothing happens (but the macro keeps recording). * * @see #isRecordingMacro() * @see #endRecordingMacro() */ public static synchronized void beginRecordingMacro() { if (isRecordingMacro()) { //System.err.println("Macro already being recorded!"); return; } //JOptionPane.showMessageDialog(this, "Now recording a macro"); if (currentMacro!=null) currentMacro = null; // May help gc? currentMacro = new Macro(); recordingMacro = true; }