SourceForge: jubler/jubler: changeset 1034:fdf7b60c7a0e
Rearrangement of Jubler code, removed all form's action-listeners to external classes and all non-event functions to JublerFunction. Also rearrange the code's organisation and fixed some bugs. development
authorhoang_tran
Thu Oct 22 19:22:17 2009 +0100 (2 months ago)
branchdevelopment
changeset 1034fdf7b60c7a0e
parent 1033 6bd220ea381e
child 1035 4de4e42cb52a
Rearrangement of Jubler code, removed all form's action-listeners to external classes and all non-event functions to JublerFunction. Also rearrange the code's organisation and fixed some bugs.
src/com/panayotis/jubler/JActionMap.java
src/com/panayotis/jubler/Jubler.form
src/com/panayotis/jubler/Jubler.java
src/com/panayotis/jubler/JublerFunction.java
src/com/panayotis/jubler/Main.java
src/com/panayotis/jubler/StaticJubler.java
src/com/panayotis/jubler/events/app/AppCloseAction.java
src/com/panayotis/jubler/events/app/WindowEventHandler.java
src/com/panayotis/jubler/events/menu/edit/ByLineNumberAction.java
src/com/panayotis/jubler/events/menu/edit/ByTimeAction.java
src/com/panayotis/jubler/events/menu/edit/CyanMarkAction.java
src/com/panayotis/jubler/events/menu/edit/DeleteBySelectionAction.java
src/com/panayotis/jubler/events/menu/edit/DeleteSubtitleAction.java
src/com/panayotis/jubler/events/menu/edit/EditCopyAction.java
src/com/panayotis/jubler/events/menu/edit/EditCutAction.java
src/com/panayotis/jubler/events/menu/edit/EditPasteAction.java
src/com/panayotis/jubler/events/menu/edit/EditUndoAction.java
src/com/panayotis/jubler/events/menu/edit/GoToSubtitleAction.java
src/com/panayotis/jubler/events/menu/edit/InsertSubEntryAction.java
src/com/panayotis/jubler/events/menu/edit/MarkSelectionAction.java
src/com/panayotis/jubler/events/menu/edit/NoneMarkAction.java
src/com/panayotis/jubler/events/menu/edit/PasteSpecialAction.java
src/com/panayotis/jubler/events/menu/edit/PinkMarkAction.java
src/com/panayotis/jubler/events/menu/edit/RedoEditAction.java
src/com/panayotis/jubler/events/menu/edit/RemoveEmptyLineAction.java
src/com/panayotis/jubler/events/menu/edit/ReplaceGloballyAction.java
src/com/panayotis/jubler/events/menu/edit/StepwiseAction.java
src/com/panayotis/jubler/events/menu/edit/StyleBySelectionAction.java
src/com/panayotis/jubler/events/menu/edit/YellowMarkAction.java
src/com/panayotis/jubler/events/menu/edit/undo/UndoEntry.java
src/com/panayotis/jubler/events/menu/edit/undo/UndoList.java
src/com/panayotis/jubler/events/menu/file/AppendFromFile.java
src/com/panayotis/jubler/events/menu/file/ChildAction.java
src/com/panayotis/jubler/events/menu/file/FileCloseAction.java
src/com/panayotis/jubler/events/menu/file/FileNewAction.java
src/com/panayotis/jubler/events/menu/file/FileOpenAction.java
src/com/panayotis/jubler/events/menu/file/FileSaveAction.java
src/com/panayotis/jubler/events/menu/file/FileSaveAsAction.java
src/com/panayotis/jubler/events/menu/file/ImportComponent.java
src/com/panayotis/jubler/events/menu/file/InfoAction.java
src/com/panayotis/jubler/events/menu/file/PreferenceSettingAction.java
src/com/panayotis/jubler/events/menu/file/QuitAction.java
src/com/panayotis/jubler/events/menu/file/RetrieveAction.java
src/com/panayotis/jubler/events/menu/file/RevertFileAction.java
src/com/panayotis/jubler/events/menu/help/AboutHelpAction.java
src/com/panayotis/jubler/events/menu/help/FAQAction.java
src/com/panayotis/jubler/events/menu/popup/ShowTableColumnAction.java
src/com/panayotis/jubler/events/menu/toobar/AudioPreviewAction.java
src/com/panayotis/jubler/events/menu/toobar/BalanceText.java
src/com/panayotis/jubler/events/menu/toobar/DoItAction.java
src/com/panayotis/jubler/events/menu/toobar/DropDownActionListAction.java
src/com/panayotis/jubler/events/menu/toobar/DropDownNumberOfLineAction.java
src/com/panayotis/jubler/events/menu/toobar/EnablePreviewToolBarAction.java
src/com/panayotis/jubler/events/menu/toobar/FileSaveToolBarButtonAction.java
src/com/panayotis/jubler/events/menu/toobar/HalfSizeZoomAction.java
src/com/panayotis/jubler/events/menu/toobar/InsertBlankLine.java
src/com/panayotis/jubler/events/menu/toobar/MaxWaveAction.java
src/com/panayotis/jubler/events/menu/toobar/MoveRecord.java
src/com/panayotis/jubler/events/menu/toobar/MoveText.java
src/com/panayotis/jubler/events/menu/toobar/PlayAudioAction.java
src/com/panayotis/jubler/events/menu/toobar/PreviewToolBarAction.java
src/com/panayotis/jubler/events/menu/toobar/SortAction.java
src/com/panayotis/jubler/events/menu/tool/BeginningTimeVideoAction.java
src/com/panayotis/jubler/events/menu/tool/CurrentTimeVideoAction.java
src/com/panayotis/jubler/events/menu/tool/EditTextCaseTranspose.java
src/com/panayotis/jubler/events/menu/tool/EnablePreviewAction.java
src/com/panayotis/jubler/events/menu/tool/FixTimeAction.java
src/com/panayotis/jubler/events/menu/tool/JoinRecordAction.java
src/com/panayotis/jubler/events/menu/tool/JoinSubtitlesAction.java
src/com/panayotis/jubler/events/menu/tool/MergeRecords.java
src/com/panayotis/jubler/events/menu/tool/OCRAllAction.java
src/com/panayotis/jubler/events/menu/tool/OCRSelectedAction.java
src/com/panayotis/jubler/events/menu/tool/RecodeTimeAction.java
src/com/panayotis/jubler/events/menu/tool/RemoveDuplicationAction.java
src/com/panayotis/jubler/events/menu/tool/ReparentAction.java
src/com/panayotis/jubler/events/menu/tool/RoundTimeAction.java
src/com/panayotis/jubler/events/menu/tool/ShiftTimeAction.java
src/com/panayotis/jubler/events/menu/tool/SpellAction.java
src/com/panayotis/jubler/events/menu/tool/SplitRecord.java
src/com/panayotis/jubler/events/menu/tool/SplitRecordAction.java
src/com/panayotis/jubler/events/menu/tool/SplitSubtitleAction.java
src/com/panayotis/jubler/events/menu/tool/SynchronizeAction.java
src/com/panayotis/jubler/events/menu/tool/TextBalancingOnSelectionAction.java
src/com/panayotis/jubler/events/menu/tool/TextBalancingOnTheWholeTableAction.java
src/com/panayotis/jubler/events/menu/tool/TranslateAction.java
src/com/panayotis/jubler/events/menu/tool/VideoPreviewAction.java
src/com/panayotis/jubler/events/menu/tool/ViewHeader.java
src/com/panayotis/jubler/events/menu/tool/duplication/DuplicationGroup.java
src/com/panayotis/jubler/events/menu/tool/duplication/DuplicationList.java
src/com/panayotis/jubler/events/menu/tool/duplication/RemoveBottomTopLineDuplication.java
src/com/panayotis/jubler/events/menu/tool/duplication/RemoveDuplicationBase.java
src/com/panayotis/jubler/events/menu/tool/duplication/RemoveTimeDuplication.java
src/com/panayotis/jubler/events/menu/tool/duplication/RemoveTopLineDuplication.java
src/com/panayotis/jubler/events/menu/tool/duplication/SplitSONSubtitleAction.java
src/com/panayotis/jubler/events/menu/tool/duplication/package-info.java
src/com/panayotis/jubler/events/menu/tool/ocr/JImageIOHelper.java
src/com/panayotis/jubler/events/menu/tool/ocr/JOCR.java
src/com/panayotis/jubler/events/menu/tool/ocr/LanguageFileFilter.java
src/com/panayotis/jubler/events/menu/tool/ocr/LanguageSelection.java
src/com/panayotis/jubler/events/menu/tool/ocr/OCRAction.java
src/com/panayotis/jubler/events/menu/tool/ocr/PackingImageFilesToTiffAction.java
src/com/panayotis/jubler/events/menu/tool/ocr/PackingImagesToTiffAction.java
src/com/panayotis/jubler/events/menu/tool/ocr/package-info.java
src/com/panayotis/jubler/events/menu/tool/replace/JComboBoxEditorAsJTextArea.java
src/com/panayotis/jubler/events/menu/tool/replace/JReplace.form
src/com/panayotis/jubler/events/menu/tool/replace/JReplace.java
src/com/panayotis/jubler/events/menu/tool/replace/JReplaceList.form
src/com/panayotis/jubler/events/menu/tool/replace/JReplaceList.java
src/com/panayotis/jubler/events/menu/tool/replace/ReplaceEntry.java
src/com/panayotis/jubler/events/menu/tool/replace/ReplaceModel.java
src/com/panayotis/jubler/events/menu/tool/spell/JSpellChecker.form
src/com/panayotis/jubler/events/menu/tool/spell/JSpellChecker.java
src/com/panayotis/jubler/events/menu/tool/spell/SpellChecker.java
src/com/panayotis/jubler/events/menu/tool/spell/SpellError.java
src/com/panayotis/jubler/events/menu/tool/spell/checkers/ASpell.java
src/com/panayotis/jubler/events/menu/tool/spell/checkers/AvailSpellCheckers.java
src/com/panayotis/jubler/events/menu/tool/spell/checkers/ZemberekSpellChecker.java
src/com/panayotis/jubler/events/menu/tool/translate/AvailTranslators.java
src/com/panayotis/jubler/events/menu/tool/translate/GenericWebTranslator.java
src/com/panayotis/jubler/events/menu/tool/translate/HTMLTextUtils.java
src/com/panayotis/jubler/events/menu/tool/translate/Language.java
src/com/panayotis/jubler/events/menu/tool/translate/Translator.java
src/com/panayotis/jubler/events/menu/tool/translate/WebTranslator.java
src/com/panayotis/jubler/events/menu/tool/translate/plugins/GoogleHTMLTranslator.java
src/com/panayotis/jubler/events/menu/tool/translate/plugins/GoogleJSONTranslator.java
src/com/panayotis/jubler/i18n/GettextResource.java
src/com/panayotis/jubler/information/HelpBrowser.java
src/com/panayotis/jubler/information/JAbout.java
src/com/panayotis/jubler/media/VideoFile.java
src/com/panayotis/jubler/media/console/JVideoConsole.java
src/com/panayotis/jubler/media/player/AbstractPlayer.java
src/com/panayotis/jubler/media/player/mplayer/MPlayerViewport.java
src/com/panayotis/jubler/media/preview/JSubPreview.java
src/com/panayotis/jubler/media/preview/JSubTimeline.java
src/com/panayotis/jubler/media/preview/decoders/AudioPreview.java
src/com/panayotis/jubler/media/preview/decoders/FFMPEG.java
src/com/panayotis/jubler/media/preview/decoders/NativeDecoder.java
src/com/panayotis/jubler/options/JPreferences.java
src/com/panayotis/jubler/options/Options.java
src/com/panayotis/jubler/options/ShortcutsModel.java
src/com/panayotis/jubler/options/gui/JRateChooser.java
src/com/panayotis/jubler/os/AutoSaver.java
src/com/panayotis/jubler/os/DEBUG.java
src/com/panayotis/jubler/os/Dropper.java
src/com/panayotis/jubler/os/ExceptionHandler.java
src/com/panayotis/jubler/os/FileCommunicator.java
src/com/panayotis/jubler/os/SystemFileFinder.java
src/com/panayotis/jubler/os/TreeWalker.java
src/com/panayotis/jubler/subs/JSubEditor.form
src/com/panayotis/jubler/subs/JSubEditor.java
src/com/panayotis/jubler/subs/StringTransformer.java
src/com/panayotis/jubler/subs/SubEntry.java
src/com/panayotis/jubler/subs/SubtitlePatternProcessor.java
src/com/panayotis/jubler/subs/SubtitleProcessorList.java
src/com/panayotis/jubler/subs/Subtitles.java
src/com/panayotis/jubler/subs/color/ReduceColorDepth.java
src/com/panayotis/jubler/subs/loader/AbstractBinarySubFormat.java
src/com/panayotis/jubler/subs/loader/AbstractTextSubFormat.java
src/com/panayotis/jubler/subs/loader/SubtitleSplitFileFilter.java
src/com/panayotis/jubler/subs/loader/binary/SON/ImageFileListManager.java
src/com/panayotis/jubler/subs/loader/binary/SON/LoadSonImage.java
src/com/panayotis/jubler/subs/loader/binary/SON/WriteSonSubtitle.java
src/com/panayotis/jubler/subs/loader/binary/SON/record/SonSubEntry.java
src/com/panayotis/jubler/subs/loader/binary/SUP/SUPReader.java
src/com/panayotis/jubler/subs/loader/binary/SWT/record/SWTSubEntry.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/TMPGenc.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/processor/TMPGencLayoutDataItem.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/processor/TMPGencLayoutExDataItem.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/processor/TMPGencSubtitleEvent.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/record/LayoutDataExRecord.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/record/LayoutDataExRecordList.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/record/LayoutDataItemRecord.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/record/LayoutDataItemRecordList.java
src/com/panayotis/jubler/subs/loader/binary/TMPGenc/record/TMPGencSubtitleRecord.java
src/com/panayotis/jubler/subs/loader/text/format/StyledTextSubFormat.java
src/com/panayotis/jubler/subs/loader/web/OpenSubtitles.java
src/com/panayotis/jubler/subs/style/JStyleEditor.java
src/com/panayotis/jubler/subs/style/StyleType.java
src/com/panayotis/jubler/subs/style/SubStyle.java
src/com/panayotis/jubler/tools/JComponentSelection.java
src/com/panayotis/jubler/tools/JImage.java
src/com/panayotis/jubler/tools/JReplaceGlobal.java
src/com/panayotis/jubler/tools/JSpeller.java
src/com/panayotis/jubler/tools/JSubtitleSetSplitter.java
src/com/panayotis/jubler/tools/JTool.java
src/com/panayotis/jubler/tools/JTranslate.java
src/com/panayotis/jubler/tools/duplication/DuplicationGroup.java
src/com/panayotis/jubler/tools/duplication/DuplicationList.java
src/com/panayotis/jubler/tools/duplication/RemoveBottomTopLineDuplication.java
src/com/panayotis/jubler/tools/duplication/RemoveDuplicationBase.java
src/com/panayotis/jubler/tools/duplication/RemoveTimeDuplication.java
src/com/panayotis/jubler/tools/duplication/RemoveTopLineDuplication.java
src/com/panayotis/jubler/tools/duplication/SplitSONSubtitleAction.java
src/com/panayotis/jubler/tools/duplication/package-info.java
src/com/panayotis/jubler/tools/editing/BalanceText.java
src/com/panayotis/jubler/tools/editing/EditTextCaseTranspose.java
src/com/panayotis/jubler/tools/editing/InsertBlankLine.java
src/com/panayotis/jubler/tools/editing/MoveRecord.java
src/com/panayotis/jubler/tools/editing/MoveText.java
src/com/panayotis/jubler/tools/editing/package-info.java
src/com/panayotis/jubler/tools/ocr/JImageIOHelper.java
src/com/panayotis/jubler/tools/ocr/JOCR.java
src/com/panayotis/jubler/tools/ocr/LanguageFileFilter.java
src/com/panayotis/jubler/tools/ocr/LanguageSelection.java
src/com/panayotis/jubler/tools/ocr/OCRAction.java
src/com/panayotis/jubler/tools/ocr/PackingImageFilesToTiffAction.java
src/com/panayotis/jubler/tools/ocr/PackingImagesToTiffAction.java
src/com/panayotis/jubler/tools/ocr/package-info.java
src/com/panayotis/jubler/tools/records/AppendFromFile.java
src/com/panayotis/jubler/tools/records/ImportComponent.java
src/com/panayotis/jubler/tools/records/MergeRecords.java
src/com/panayotis/jubler/tools/records/SplitRecord.java
src/com/panayotis/jubler/tools/records/ViewHeader.java
src/com/panayotis/jubler/tools/records/package-info.java
src/com/panayotis/jubler/tools/replace/JComboBoxEditorAsJTextArea.java
src/com/panayotis/jubler/tools/replace/JReplace.form
src/com/panayotis/jubler/tools/replace/JReplace.java
src/com/panayotis/jubler/tools/replace/JReplaceList.form
src/com/panayotis/jubler/tools/replace/JReplaceList.java
src/com/panayotis/jubler/tools/replace/ReplaceEntry.java
src/com/panayotis/jubler/tools/replace/ReplaceModel.java
src/com/panayotis/jubler/tools/spell/JSpellChecker.form
src/com/panayotis/jubler/tools/spell/JSpellChecker.java
src/com/panayotis/jubler/tools/spell/SpellChecker.java
src/com/panayotis/jubler/tools/spell/SpellError.java
src/com/panayotis/jubler/tools/spell/checkers/ASpell.java
src/com/panayotis/jubler/tools/spell/checkers/AvailSpellCheckers.java
src/com/panayotis/jubler/tools/spell/checkers/ZemberekSpellChecker.java
src/com/panayotis/jubler/tools/translate/AvailTranslators.java
src/com/panayotis/jubler/tools/translate/GenericWebTranslator.java
src/com/panayotis/jubler/tools/translate/HTMLTextUtils.java
src/com/panayotis/jubler/tools/translate/Language.java
src/com/panayotis/jubler/tools/translate/Translator.java
src/com/panayotis/jubler/tools/translate/WebTranslator.java
src/com/panayotis/jubler/tools/translate/plugins/GoogleHTMLTranslator.java
src/com/panayotis/jubler/tools/translate/plugins/GoogleJSONTranslator.java
src/com/panayotis/jubler/undo/UndoEntry.java
src/com/panayotis/jubler/undo/UndoList.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/com/panayotis/jubler/JActionMap.java	Thu Oct 22 19:22:17 2009 +0100
     1.3 @@ -0,0 +1,492 @@
     1.4 +/*
     1.5 + *  JActionMap.java
     1.6 + * 
     1.7 + *  Created on: 20-Oct-2009 at 15:00:06
     1.8 + * 
     1.9 + *  
    1.10 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    1.11 + * 
    1.12 + * This file is part of Jubler.
    1.13 + * 
    1.14 + * Jubler is free software; you can redistribute it and/or modify
    1.15 + * it under the terms of the GNU General Public License as published by
    1.16 + * the Free Software Foundation, version 2.
    1.17 + * 
    1.18 + * 
    1.19 + * Jubler is distributed in the hope that it will be useful,
    1.20 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.21 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.22 + * GNU General Public License for more details.
    1.23 + * 
    1.24 + * You should have received a copy of the GNU General Public License
    1.25 + * along with Jubler; if not, write to the Free Software
    1.26 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.27 + * 
    1.28 + * Contributor(s):
    1.29 + * 
    1.30 + */
    1.31 +package com.panayotis.jubler;
    1.32 +
    1.33 +import com.panayotis.jubler.events.menu.tool.VideoPreviewAction;
    1.34 +import com.panayotis.jubler.events.menu.edit.StyleBySelectionAction;
    1.35 +import com.panayotis.jubler.events.menu.edit.StepwiseAction;
    1.36 +import com.panayotis.jubler.events.menu.tool.ShiftTimeAction;
    1.37 +import com.panayotis.jubler.events.menu.file.RetrieveAction;
    1.38 +import com.panayotis.jubler.events.menu.edit.RemoveEmptyLineAction;
    1.39 +import com.panayotis.jubler.events.menu.edit.ByTimeAction;
    1.40 +import com.panayotis.jubler.events.menu.edit.ByLineNumberAction;
    1.41 +import com.panayotis.jubler.events.menu.tool.BeginningTimeVideoAction;
    1.42 +import com.panayotis.jubler.events.menu.toobar.PlayAudioAction;
    1.43 +import com.panayotis.jubler.events.menu.tool.CurrentTimeVideoAction;
    1.44 +import com.panayotis.jubler.events.menu.tool.EnablePreviewAction;
    1.45 +import com.panayotis.jubler.events.menu.toobar.SortAction;
    1.46 +import com.panayotis.jubler.events.menu.tool.RecodeTimeAction;
    1.47 +import com.panayotis.jubler.events.menu.tool.SpellAction;
    1.48 +import com.panayotis.jubler.events.menu.tool.RoundTimeAction;
    1.49 +import com.panayotis.jubler.events.menu.toobar.EnablePreviewToolBarAction;
    1.50 +import com.panayotis.jubler.events.menu.tool.SplitSubtitleAction;
    1.51 +import com.panayotis.jubler.events.menu.tool.SplitRecordAction;
    1.52 +import com.panayotis.jubler.events.menu.toobar.MaxWaveAction;
    1.53 +import com.panayotis.jubler.events.menu.toobar.HalfSizeZoomAction;
    1.54 +import com.panayotis.jubler.events.menu.toobar.AudioPreviewAction;
    1.55 +import com.panayotis.jubler.events.menu.popup.ShowTableColumnAction;
    1.56 +import com.panayotis.jubler.events.menu.edit.MarkSelectionAction;
    1.57 +import com.panayotis.jubler.events.menu.edit.PinkMarkAction;
    1.58 +import com.panayotis.jubler.events.menu.edit.NoneMarkAction;
    1.59 +import com.panayotis.jubler.events.menu.edit.CyanMarkAction;
    1.60 +import com.panayotis.jubler.events.menu.edit.YellowMarkAction;
    1.61 +import com.panayotis.jubler.events.menu.tool.TranslateAction;
    1.62 +import com.panayotis.jubler.events.menu.tool.TextBalancingOnTheWholeTableAction;
    1.63 +import com.panayotis.jubler.events.menu.tool.TextBalancingOnSelectionAction;
    1.64 +import com.panayotis.jubler.events.menu.tool.SynchronizeAction;
    1.65 +import com.panayotis.jubler.events.menu.edit.GoToSubtitleAction;
    1.66 +import com.panayotis.jubler.events.menu.tool.FixTimeAction;
    1.67 +import com.panayotis.jubler.events.menu.tool.JoinSubtitlesAction;
    1.68 +import com.panayotis.jubler.events.menu.edit.InsertSubEntryAction;
    1.69 +import com.panayotis.jubler.events.menu.edit.ReplaceGloballyAction;
    1.70 +import com.panayotis.jubler.events.menu.tool.ReparentAction;
    1.71 +import com.panayotis.jubler.events.menu.edit.DeleteSubtitleAction;
    1.72 +import com.panayotis.jubler.events.menu.edit.DeleteBySelectionAction;
    1.73 +import com.panayotis.jubler.events.menu.file.RevertFileAction;
    1.74 +import com.panayotis.jubler.events.menu.tool.OCRSelectedAction;
    1.75 +import com.panayotis.jubler.events.menu.tool.OCRAllAction;
    1.76 +import com.panayotis.jubler.events.app.AppCloseAction;
    1.77 +import com.panayotis.jubler.events.menu.edit.RedoEditAction;
    1.78 +import com.panayotis.jubler.events.menu.toobar.DropDownNumberOfLineAction;
    1.79 +import com.panayotis.jubler.events.menu.toobar.DropDownActionListAction;
    1.80 +import com.panayotis.jubler.events.menu.toobar.DoItAction;
    1.81 +import com.panayotis.jubler.events.menu.file.QuitAction;
    1.82 +import com.panayotis.jubler.events.menu.toobar.FileSaveToolBarButtonAction;
    1.83 +import com.panayotis.jubler.events.menu.file.FileCloseAction;
    1.84 +import com.panayotis.jubler.events.menu.help.FAQAction;
    1.85 +import com.panayotis.jubler.events.menu.edit.PasteSpecialAction;
    1.86 +import com.panayotis.jubler.events.menu.file.ChildAction;
    1.87 +import com.panayotis.jubler.events.menu.file.PreferenceSettingAction;
    1.88 +import com.panayotis.jubler.events.menu.file.InfoAction;
    1.89 +import com.panayotis.jubler.events.menu.edit.EditPasteAction;
    1.90 +import com.panayotis.jubler.events.menu.edit.EditCutAction;
    1.91 +import com.panayotis.jubler.events.menu.edit.EditUndoAction;
    1.92 +import com.panayotis.jubler.events.menu.edit.EditCopyAction;
    1.93 +import com.panayotis.jubler.events.menu.help.AboutHelpAction;
    1.94 +import com.panayotis.jubler.events.menu.file.FileSaveAsAction;
    1.95 +import com.panayotis.jubler.events.menu.file.FileNewAction;
    1.96 +import com.panayotis.jubler.events.menu.file.FileOpenAction;
    1.97 +import com.panayotis.jubler.events.menu.file.FileSaveAction;
    1.98 +import com.panayotis.jubler.events.*;
    1.99 +import static com.panayotis.jubler.i18n.I18N._;
   1.100 +import com.panayotis.jubler.os.FileCommunicator;
   1.101 +import com.panayotis.jubler.events.menu.tool.duplication.RemoveBottomTopLineDuplication;
   1.102 +import com.panayotis.jubler.events.menu.tool.duplication.RemoveTimeDuplication;
   1.103 +import com.panayotis.jubler.events.menu.tool.duplication.RemoveTopLineDuplication;
   1.104 +import com.panayotis.jubler.events.menu.tool.duplication.SplitSONSubtitleAction;
   1.105 +import com.panayotis.jubler.events.menu.toobar.BalanceText;
   1.106 +import com.panayotis.jubler.events.menu.tool.EditTextCaseTranspose;
   1.107 +import com.panayotis.jubler.events.menu.toobar.InsertBlankLine;
   1.108 +import com.panayotis.jubler.events.menu.toobar.MoveRecord;
   1.109 +import com.panayotis.jubler.events.menu.toobar.MoveText;
   1.110 +import com.panayotis.jubler.events.menu.tool.ocr.OCRAction;
   1.111 +import com.panayotis.jubler.events.menu.tool.ocr.PackingImageFilesToTiffAction;
   1.112 +import com.panayotis.jubler.events.menu.tool.ocr.PackingImagesToTiffAction;
   1.113 +import com.panayotis.jubler.events.menu.file.AppendFromFile;
   1.114 +import com.panayotis.jubler.events.menu.file.ImportComponent;
   1.115 +import com.panayotis.jubler.events.menu.tool.MergeRecords;
   1.116 +import com.panayotis.jubler.events.menu.tool.ViewHeader;
   1.117 +import com.panayotis.jubler.os.DEBUG;
   1.118 +import java.awt.event.ActionEvent;
   1.119 +import java.awt.event.ActionListener;
   1.120 +import java.io.File;
   1.121 +import java.util.HashMap;
   1.122 +import java.util.Iterator;
   1.123 +import java.util.Set;
   1.124 +import java.util.logging.Level;
   1.125 +import javax.swing.AbstractButton;
   1.126 +import javax.swing.DefaultButtonModel;
   1.127 +import javax.swing.JComboBox;
   1.128 +import javax.swing.JComponent;
   1.129 +import javax.swing.JFileChooser;
   1.130 +import javax.swing.JTextField;
   1.131 +import static com.panayotis.jubler.subs.CommonDef.FILE_SEP;
   1.132 +
   1.133 +/**
   1.134 + *
   1.135 + * @author hoang_tran <hoangduytran1960@googlemail.com>
   1.136 + */
   1.137 +public class JActionMap extends HashMap<Object, Object> {
   1.138 +
   1.139 +    private Jubler jb = null;
   1.140 +    private AppCloseAction closeApp;
   1.141 +    private BalanceText balanceText;
   1.142 +    private CurrentTimeVideoAction videoPlayback;
   1.143 +    private CyanMarkAction cyanMark;
   1.144 +    private EditCopyAction copyAction;
   1.145 +    private EditCutAction cutAction;
   1.146 +    private EditPasteAction pasteAction;
   1.147 +    private EditUndoAction undoEdit;
   1.148 +    private FileNewAction fileNew;
   1.149 +    private FileOpenAction fileOpen;
   1.150 +    private GoToSubtitleAction gotoAction;
   1.151 +    private InfoAction info;
   1.152 +    private InsertBlankLine insertBlankLine;
   1.153 +    private InsertSubEntryAction insertSubEntry;
   1.154 +    private MergeRecords mergeRecords;
   1.155 +    private MoveRecord moveRecord;
   1.156 +    private MoveText moveText;
   1.157 +    private NoneMarkAction nonMark;
   1.158 +    private OCRAction ocrAction;
   1.159 +    private PinkMarkAction pinkMark;
   1.160 +    private RedoEditAction redoEdit;
   1.161 +    private ShowTableColumnAction showTableColumn;
   1.162 +    private YellowMarkAction yellowMark;
   1.163 +
   1.164 +    public JActionMap(Jubler parent) {
   1.165 +        jb = parent;
   1.166 +        createlActionHandlers();
   1.167 +        addMap();
   1.168 +    }//end public JActionMap(Jubler parent)
   1.169 +
   1.170 +    private void addMap() {
   1.171 +        put(jb.getAboutHM(), new AboutHelpAction(jb));
   1.172 +        put(jb.getAfterIEM(), insertSubEntry);
   1.173 +        put(jb.getAppendFromFileFM(), new AppendFromFile(jb));
   1.174 +        put(jb.getAudioPreviewC(), new AudioPreviewAction(jb));
   1.175 +        put(jb.getBeforeIEM(), insertSubEntry);
   1.176 +        put(jb.getBeginningTTM(), new BeginningTimeVideoAction(jb));
   1.177 +        put(jb.getBottomGEM(), gotoAction);
   1.178 +        put(jb.getByLineNumberEM(), new ByLineNumberAction(jb));
   1.179 +        put(jb.getBySelectionDEM(), new DeleteBySelectionAction(jb));
   1.180 +        put(jb.getBySelectionMEM(), new MarkSelectionAction(jb));
   1.181 +        put(jb.getBySelectionSEM(), new StyleBySelectionAction(jb));
   1.182 +        put(jb.getByTimeGEM(), new ByTimeAction(jb));
   1.183 +        put(jb.getCaseTranspose(), new EditTextCaseTranspose(jb));
   1.184 +        put(jb.getChildNFM(), new ChildAction(jb));
   1.185 +        put(jb.getCloseFM(), new FileCloseAction(jb));
   1.186 +        put(jb.getCopyEM(), copyAction);
   1.187 +        put(jb.getCopyP(), copyAction);
   1.188 +        put(jb.getCopyTB(), copyAction);
   1.189 +        put(jb.getCurrentTTM(), videoPlayback);
   1.190 +        put(jb.getCutEM(), cutAction);
   1.191 +        put(jb.getCutP(), cutAction);
   1.192 +        put(jb.getCutTB(), cutAction);
   1.193 +        put(jb.getCyanMEM(), cyanMark);
   1.194 +        put(jb.getCyanMP(), cyanMark);
   1.195 +        put(jb.getDeleteP(), new DeleteSubtitleAction(jb));
   1.196 +        put(jb.getDoItTB(), new DoItAction(jb));
   1.197 +        put(jb.getDropDownActionList(), new DropDownActionListAction(jb));
   1.198 +        put(jb.getDropDownActionNumberOfLine(), new DropDownNumberOfLineAction(jb));
   1.199 +        put(jb.getEmptyLinesDEM(), new RemoveEmptyLineAction(jb));
   1.200 +        put(jb.getEnablePreviewC(), new EnablePreviewAction(jb));
   1.201 +        put(jb.getPreviewTB(), new EnablePreviewToolBarAction(jb));
   1.202 +        put(jb.getFAQHM(), new FAQAction(jb));
   1.203 +        put(jb.getFileNFM(), fileNew);
   1.204 +        put(jb.getFixTM(), new FixTimeAction(jb));
   1.205 +        put(jb.getGloballyREM(), new ReplaceGloballyAction(jb));
   1.206 +        put(jb.getHalfSizeC(), new HalfSizeZoomAction(jb));
   1.207 +        put(jb.getImportComponentFM(), new ImportComponent(jb));
   1.208 +        put(jb.getInfoFM(), info);
   1.209 +        put(jb.getInfoTB(), info);
   1.210 +        put(jb.getJoinRecordTM(), mergeRecords);
   1.211 +        put(jb.getJoinTM(), new JoinSubtitlesAction(jb));
   1.212 +        put(jb.getLoadTB(), fileOpen);
   1.213 +        put(jb.getMaxWaveC(), new MaxWaveAction(jb));
   1.214 +        put(jb.getNewTB(), fileNew);
   1.215 +        put(jb.getNextGEM(), gotoAction);
   1.216 +        put(jb.getNextPageGEM(), gotoAction);
   1.217 +        put(jb.getNoneMEM(), nonMark);
   1.218 +        put(jb.getNoneMP(), nonMark);
   1.219 +        put(jb.getOCRAll(), new OCRAllAction(jb));
   1.220 +        put(jb.getOCRSelected(), new OCRSelectedAction(jb));
   1.221 +        put(jb.getOpenFM(), fileOpen);
   1.222 +        put(jb.getPackingImageFilesToTiffFM(), new PackingImageFilesToTiffAction(jb));
   1.223 +        put(jb.getPackingImagesToTiffM(), new PackingImagesToTiffAction(jb));
   1.224 +        put(jb.getPasteEM(), pasteAction);
   1.225 +        put(jb.getPasteP(), pasteAction);
   1.226 +        put(jb.getPasteSpecialEM(), new PasteSpecialAction(jb));
   1.227 +        put(jb.getPasteTB(), pasteAction);
   1.228 +        put(jb.getPinkMEM(), pinkMark);
   1.229 +        put(jb.getPinkMP(), pinkMark);
   1.230 +        put(jb.getPlayAudioC(), new PlayAudioAction(jb));
   1.231 +        put(jb.getPlayVideoP(), videoPlayback);
   1.232 +        put(jb.getPrefsFM(), new PreferenceSettingAction(jb));
   1.233 +        put(jb.getPreviewTB(), new EnablePreviewToolBarAction(jb));
   1.234 +        put(jb.getPreviousGEM(), gotoAction);
   1.235 +        put(jb.getPreviousPageGEM(), gotoAction);
   1.236 +        put(jb.getQuitFM(), new QuitAction(jb));
   1.237 +        put(jb.getRecodeTM(), new RecodeTimeAction(jb));
   1.238 +        put(jb.getRedoEM(), redoEdit);
   1.239 +        put(jb.getRedoTB(), redoEdit);
   1.240 +        put(jb.getRemoveBottomTopLineDuplication(), new RemoveBottomTopLineDuplication(jb));
   1.241 +        put(jb.getRemoveTimeDuplication(), new RemoveTimeDuplication(jb));
   1.242 +        put(jb.getRemoveTopLineDuplication(), new RemoveTopLineDuplication(jb));
   1.243 +        put(jb.getReparentTM(), new ReparentAction(jb));
   1.244 +        put(jb.getRetrieveWFM(), new RetrieveAction(jb));
   1.245 +        put(jb.getRevertFM(), new RevertFileAction(jb));
   1.246 +        put(jb.getRoundTM(), new RoundTimeAction(jb));
   1.247 +        put(jb.getSaveAsFM(), new FileSaveAsAction(jb));
   1.248 +        put(jb.getSaveFM(), new FileSaveAction(jb));
   1.249 +        put(jb.getSaveTB(), new FileSaveToolBarButtonAction(jb));
   1.250 +        put(jb.getShiftTimeTM(), new ShiftTimeAction(jb));
   1.251 +        put(jb.getShowDurationP(), showTableColumn);
   1.252 +        put(jb.getShowEndP(), showTableColumn);
   1.253 +        put(jb.getShowLayerP(), showTableColumn);
   1.254 +        put(jb.getShowNumberP(), showTableColumn);
   1.255 +        put(jb.getShowStartP(), showTableColumn);
   1.256 +        put(jb.getShowStyleP(), showTableColumn);
   1.257 +        put(jb.getSortTB(), new SortAction(jb));
   1.258 +        put(jb.getSpellTM(), new SpellAction(jb));
   1.259 +        put(jb.getSplitRecordTM(), new SplitRecordAction(jb));
   1.260 +        put(jb.getSplitSONSubtitleFile(), new SplitSONSubtitleAction(jb));
   1.261 +        put(jb.getSplitTM(), new SplitSubtitleAction(jb));
   1.262 +        put(jb.getStepwiseREM(), new StepwiseAction(jb));
   1.263 +        put(jb.getSynchronizeTM(), new SynchronizeAction(jb));
   1.264 +        put(jb.getTestTB(), videoPlayback);
   1.265 +        put(jb.getTextBalancingOnSelection(), new TextBalancingOnSelectionAction(jb));
   1.266 +        put(jb.getTextBalancingOnTheWholeTable(), new TextBalancingOnTheWholeTableAction(jb));
   1.267 +        put(jb.getTopGEM(), gotoAction);
   1.268 +        put(jb.getTranslateTM(), new TranslateAction(jb));
   1.269 +        put(jb.getUndoEM(), undoEdit);
   1.270 +        put(jb.getUndoTB(), undoEdit);
   1.271 +        put(jb.getVideoPreviewC(), new VideoPreviewAction(jb));
   1.272 +        put(jb.getViewHeaderTM(), new ViewHeader(jb));
   1.273 +        put(jb.getYellowMEM(), yellowMark);
   1.274 +        put(jb.getYellowMP(), yellowMark);
   1.275 +
   1.276 +        Set keyset = keySet();
   1.277 +        Iterator it = keyset.iterator();
   1.278 +        while (it.hasNext()) {
   1.279 +            Object control = it.next();
   1.280 +            Object handler = get(control);
   1.281 +
   1.282 +            boolean is_button = (control instanceof AbstractButton);
   1.283 +            boolean is_button_model = (control instanceof DefaultButtonModel);
   1.284 +            boolean is_combo_box = (control instanceof JComboBox);
   1.285 +            boolean is_jfile_chooser = (control instanceof JFileChooser);
   1.286 +            boolean is_jtext_field = (control instanceof JTextField);
   1.287 +            boolean is_action_listener =
   1.288 +                    is_button ||
   1.289 +                    is_button_model ||
   1.290 +                    is_combo_box ||
   1.291 +                    is_jfile_chooser ||
   1.292 +                    is_jtext_field;
   1.293 +
   1.294 +            boolean valid =
   1.295 +                    (is_action_listener) &&
   1.296 +                    (handler instanceof ActionListener);
   1.297 +            if (valid) {
   1.298 +                ActionListener al = (ActionListener) handler;
   1.299 +                if (is_button) {
   1.300 +                    AbstractButton b = (AbstractButton) control;
   1.301 +                    b.addActionListener(al);
   1.302 +                } else if (is_button_model) {
   1.303 +                    DefaultButtonModel b = (DefaultButtonModel) control;
   1.304 +                    b.addActionListener(al);
   1.305 +                } else if (is_combo_box) {
   1.306 +                    JComboBox b = (JComboBox) control;
   1.307 +                    b.addActionListener(al);
   1.308 +                } else if (is_jfile_chooser) {
   1.309 +                    JFileChooser b = (JFileChooser) control;
   1.310 +                    b.addActionListener(al);
   1.311 +                } else if (is_jtext_field) {
   1.312 +                    JTextField b = (JTextField) control;
   1.313 +                    b.addActionListener(al);
   1.314 +                }//end if
   1.315 +            } else {
   1.316 +                System.out.println(_("Action listener not attached: " + control.getClass().getName()));
   1.317 +            }//end if (valid)
   1.318 +        }//end while (it.hasNext())
   1.319 +    }//end private void addMap()
   1.320 +
   1.321 +    private void createlActionHandlers() {
   1.322 +        ocrAction = new OCRAction(jb);
   1.323 +        ocrAction.setLanguage("eng");
   1.324 +        String working_dir = FileCommunicator.getCurrentPath();
   1.325 +        File tesseract_path = new File(working_dir, "tesseract");
   1.326 +        String tesseract_path_as_string = tesseract_path.getAbsolutePath();
   1.327 +        ocrAction.setTessPath(tesseract_path_as_string + FILE_SEP);
   1.328 +
   1.329 +        moveRecord =
   1.330 +                new MoveRecord(jb);
   1.331 +        moveText =
   1.332 +                new MoveText(jb);
   1.333 +        insertBlankLine =
   1.334 +                new InsertBlankLine(jb);
   1.335 +        balanceText =
   1.336 +                new BalanceText(jb);
   1.337 +        mergeRecords =
   1.338 +                new MergeRecords(jb);
   1.339 +
   1.340 +        copyAction =
   1.341 +                new EditCopyAction(jb);
   1.342 +        cutAction =
   1.343 +                new EditCutAction(jb);
   1.344 +        pasteAction =
   1.345 +                new EditPasteAction(jb);
   1.346 +        undoEdit =
   1.347 +                new EditUndoAction(jb);
   1.348 +        redoEdit =
   1.349 +                new RedoEditAction(jb);
   1.350 +        insertSubEntry =
   1.351 +                new InsertSubEntryAction(jb);
   1.352 +        gotoAction =
   1.353 +                new GoToSubtitleAction(jb);
   1.354 +        closeApp =
   1.355 +                new AppCloseAction(jb);
   1.356 +        cyanMark =
   1.357 +                new CyanMarkAction(jb);
   1.358 +        pinkMark =
   1.359 +                new PinkMarkAction(jb);
   1.360 +        yellowMark =
   1.361 +                new YellowMarkAction(jb);
   1.362 +        nonMark =
   1.363 +                new NoneMarkAction(jb);
   1.364 +        info =
   1.365 +                new InfoAction(jb);
   1.366 +        fileNew =
   1.367 +                new FileNewAction(jb);
   1.368 +        fileOpen =
   1.369 +                new FileOpenAction(jb);
   1.370 +        videoPlayback =
   1.371 +                new CurrentTimeVideoAction(jb);
   1.372 +        showTableColumn =
   1.373 +                new ShowTableColumnAction(jb);
   1.374 +    }//end private void createlActionHandlers()
   1.375 +
   1.376 +    public boolean action(JComponent control) {
   1.377 +        boolean actioned = false;
   1.378 +        try {
   1.379 +            String name = control.getName();
   1.380 +            Object o = get(control);
   1.381 +            if (o instanceof ActionListener) {
   1.382 +                ActionEvent evt = new ActionEvent(control, ActionEvent.ACTION_PERFORMED, name);
   1.383 +                ActionListener al = (ActionListener) o;
   1.384 +                al.actionPerformed(evt);
   1.385 +                actioned = true;
   1.386 +            }//end if (al instanceof ActionListener){
   1.387 +        } catch (Exception ex) {
   1.388 +            DEBUG.logger.log(Level.WARNING, ex.toString());
   1.389 +        }
   1.390 +        return actioned;
   1.391 +    }//end public void action(JComponent comp)
   1.392 +
   1.393 +    /**
   1.394 +     * @return the moveRecord
   1.395 +     */
   1.396 +    public MoveRecord getMoveRecord() {
   1.397 +        return moveRecord;
   1.398 +    }
   1.399 +
   1.400 +    /**
   1.401 +     * @return the moveText
   1.402 +     */
   1.403 +    public MoveText getMoveText() {
   1.404 +        return moveText;
   1.405 +    }
   1.406 +
   1.407 +    /**
   1.408 +     * @return the insertBlankLine
   1.409 +     */
   1.410 +    public InsertBlankLine getInsertBlankLine() {
   1.411 +        return insertBlankLine;
   1.412 +    }
   1.413 +
   1.414 +    /**
   1.415 +     * @return the balanceText
   1.416 +     */
   1.417 +    public BalanceText getBalanceText() {
   1.418 +        return balanceText;
   1.419 +    }
   1.420 +
   1.421 +    /**
   1.422 +     * @return the mergeRecords
   1.423 +     */
   1.424 +    public MergeRecords getMergeRecords() {
   1.425 +        return mergeRecords;
   1.426 +    }
   1.427 +
   1.428 +    /**
   1.429 +     * @return the insertSubEntry
   1.430 +     */
   1.431 +    public InsertSubEntryAction getInsertSubEntry() {
   1.432 +        return insertSubEntry;
   1.433 +    }
   1.434 +
   1.435 +    /**
   1.436 +     * @return the gotoAction
   1.437 +     */
   1.438 +    public GoToSubtitleAction getGotoAction() {
   1.439 +        return gotoAction;
   1.440 +    }
   1.441 +
   1.442 +    /**
   1.443 +     * @return the closeApp
   1.444 +     */
   1.445 +    public AppCloseAction getCloseApp() {
   1.446 +        return closeApp;
   1.447 +    }
   1.448 +
   1.449 +    /**
   1.450 +     * @return the ocrAction
   1.451 +     */
   1.452 +    public OCRAction getOcrAction() {
   1.453 +        return ocrAction;
   1.454 +    }
   1.455 +
   1.456 +    /**
   1.457 +     * @return the copyAction
   1.458 +     */
   1.459 +    public EditCopyAction getCopyAction() {
   1.460 +        return copyAction;
   1.461 +    }
   1.462 +
   1.463 +    /**
   1.464 +     * @return the cutAction
   1.465 +     */
   1.466 +    public EditCutAction getCutAction() {
   1.467 +        return cutAction;
   1.468 +    }
   1.469 +
   1.470 +    /**
   1.471 +     * @return the pasteAction
   1.472 +     */
   1.473 +    public EditPasteAction getPasteAction() {
   1.474 +        return pasteAction;
   1.475 +    }
   1.476 +
   1.477 +    /**
   1.478 +     * @return the undoEdit
   1.479 +     */
   1.480 +    public EditUndoAction getUndoEdit() {
   1.481 +        return undoEdit;
   1.482 +    }
   1.483 +}//end public class JActionMap extends HashMap<String, Class>
   1.484 +
   1.485 +class blankWrap extends MenuAction {
   1.486 +
   1.487 +    public blankWrap(Jubler jb) {
   1.488 +        jublerParent = jb;
   1.489 +    }
   1.490 +
   1.491 +    public void actionPerformed(ActionEvent evt) {
   1.492 +    }
   1.493 +}
   1.494 +
   1.495 +
     2.1 --- a/src/com/panayotis/jubler/Jubler.form	Tue Oct 20 20:01:52 2009 +0100
     2.2 +++ b/src/com/panayotis/jubler/Jubler.form	Thu Oct 22 19:22:17 2009 +0100
     2.3 @@ -14,9 +14,6 @@
     2.4                <Connection code="_(&quot;Cut&quot;)" type="code"/>
     2.5              </Property>
     2.6            </Properties>
     2.7 -          <Events>
     2.8 -            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CutPActionPerformed"/>
     2.9 -          </Events>
    2.10          </MenuItem>
    2.11          <MenuItem class="javax.swing.JMenuItem" name="CopyP">
    2.12            <Properties>
    2.13 @@ -24,9 +21,6 @@
    2.14                <Connection code="_(&quot;Copy&quot;)" type="code"/>
    2.15              </Property>
    2.16            </Properties>
    2.17 -          <Events>
    2.18 -            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CopyPActionPerformed"/>
    2.19 -          </Events>
    2.20          </MenuItem>
    2.21          <MenuItem class="javax.swing.JMenuItem" name="PasteP">
    2.22            <Properties>
    2.23 @@ -34,9 +28,6 @@
    2.24                <Connection code="_(&quot;Paste&quot;)" type="code"/>
    2.25              </Property>
    2.26            </Properties>
    2.27 -          <Events>
    2.28 -            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PastePActionPerformed"/>
    2.29 -          </Events>
    2.30          </MenuItem>
    2.31          <MenuItem class="javax.swing.JMenuItem" name="DeleteP">
    2.32            <Properties>
    2.33 @@ -44,9 +35,6 @@
    2.34                <Connection code="_(&quot;Delete&quot;)" type="code"/>
    2.35              </Property>
    2.36            </Properties>
    2.37 -          <Events>
    2.38 -            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DeletePActionPerformed"/>
    2.39 -          </Events>
    2.40          </MenuItem>
    2.41          <Menu class="javax.swing.JMenu" name="MarkP">
    2.42            <Properties>
    2.43 @@ -61,9 +49,6 @@
    2.44                    <Connection code="_(&quot;None&quot;)" type="code"/>
    2.45                  </Property>
    2.46                </Properties>
    2.47 -              <Events>
    2.48 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="NoneMPActionPerformed"/>
    2.49 -              </Events>
    2.50              </MenuItem>
    2.51              <MenuItem class="javax.swing.JMenuItem" name="PinkMP">
    2.52                <Properties>
    2.53 @@ -71,9 +56,6 @@
    2.54                    <Connection code="_(&quot;Pink&quot;)" type="code"/>
    2.55                  </Property>
    2.56                </Properties>
    2.57 -              <Events>
    2.58 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PinkMPActionPerformed"/>
    2.59 -              </Events>
    2.60              </MenuItem>
    2.61              <MenuItem class="javax.swing.JMenuItem" name="YellowMP">
    2.62                <Properties>
    2.63 @@ -81,9 +63,6 @@
    2.64                    <Connection code="_(&quot;Yellow&quot;)" type="code"/>
    2.65                  </Property>
    2.66                </Properties>
    2.67 -              <Events>
    2.68 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="YellowMPActionPerformed"/>
    2.69 -              </Events>
    2.70              </MenuItem>
    2.71              <MenuItem class="javax.swing.JMenuItem" name="CyanMP">
    2.72                <Properties>
    2.73 @@ -91,9 +70,6 @@
    2.74                    <Connection code="_(&quot;Cyan&quot;)" type="code"/>
    2.75                  </Property>
    2.76                </Properties>
    2.77 -              <Events>
    2.78 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CyanMPActionPerformed"/>
    2.79 -              </Events>
    2.80              </MenuItem>
    2.81            </SubComponents>
    2.82          </Menu>
    2.83 @@ -120,9 +96,6 @@
    2.84                  </Property>
    2.85                  <Property name="actionCommand" type="java.lang.String" value="0"/>
    2.86                </Properties>
    2.87 -              <Events>
    2.88 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
    2.89 -              </Events>
    2.90                <AuxValues>
    2.91                  <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="Jubler_ShowNumberP"/>
    2.92                </AuxValues>
    2.93 @@ -134,9 +107,6 @@
    2.94                  </Property>
    2.95                  <Property name="actionCommand" type="java.lang.String" value="1"/>
    2.96                </Properties>
    2.97 -              <Events>
    2.98 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
    2.99 -              </Events>
   2.100              </MenuItem>
   2.101              <MenuItem class="javax.swing.JCheckBoxMenuItem" name="ShowEndP">
   2.102                <Properties>
   2.103 @@ -145,9 +115,6 @@
   2.104                  </Property>
   2.105                  <Property name="actionCommand" type="java.lang.String" value="2"/>
   2.106                </Properties>
   2.107 -              <Events>
   2.108 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
   2.109 -              </Events>
   2.110              </MenuItem>
   2.111              <MenuItem class="javax.swing.JCheckBoxMenuItem" name="ShowDurationP">
   2.112                <Properties>
   2.113 @@ -156,9 +123,6 @@
   2.114                  </Property>
   2.115                  <Property name="actionCommand" type="java.lang.String" value="3"/>
   2.116                </Properties>
   2.117 -              <Events>
   2.118 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
   2.119 -              </Events>
   2.120              </MenuItem>
   2.121              <MenuItem class="javax.swing.JCheckBoxMenuItem" name="ShowLayerP">
   2.122                <Properties>
   2.123 @@ -167,9 +131,6 @@
   2.124                  </Property>
   2.125                  <Property name="actionCommand" type="java.lang.String" value="4"/>
   2.126                </Properties>
   2.127 -              <Events>
   2.128 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
   2.129 -              </Events>
   2.130              </MenuItem>
   2.131              <MenuItem class="javax.swing.JCheckBoxMenuItem" name="ShowStyleP">
   2.132                <Properties>
   2.133 @@ -178,9 +139,6 @@
   2.134                  </Property>
   2.135                  <Property name="actionCommand" type="java.lang.String" value="5"/>
   2.136                </Properties>
   2.137 -              <Events>
   2.138 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showTableColumn"/>
   2.139 -              </Events>
   2.140              </MenuItem>
   2.141            </SubComponents>
   2.142          </Menu>
   2.143 @@ -192,9 +150,6 @@
   2.144                <Connection code="_(&quot;Test video&quot;)" type="code"/>
   2.145              </Property>
   2.146            </Properties>
   2.147 -          <Events>
   2.148 -            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CurrentTTMActionPerformed"/>
   2.149 -          </Events>
   2.150          </MenuItem>
   2.151        </SubComponents>
   2.152      </Container>
   2.153 @@ -229,9 +184,6 @@
   2.154                      </Property>
   2.155                      <Property name="name" type="java.lang.String" value="FNF" noResource="true"/>
   2.156                    </Properties>
   2.157 -                  <Events>
   2.158 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FileNFMActionPerformed"/>
   2.159 -                  </Events>
   2.160                  </MenuItem>
   2.161                  <MenuItem class="javax.swing.JMenuItem" name="ChildNFM">
   2.162                    <Properties>
   2.163 @@ -241,9 +193,6 @@
   2.164                      <Property name="enabled" type="boolean" value="false"/>
   2.165                      <Property name="name" type="java.lang.String" value="FNC" noResource="true"/>
   2.166                    </Properties>
   2.167 -                  <Events>
   2.168 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ChildNFMActionPerformed"/>
   2.169 -                  </Events>
   2.170                  </MenuItem>
   2.171                </SubComponents>
   2.172              </Menu>
   2.173 @@ -257,9 +206,6 @@
   2.174                  </Property>
   2.175                  <Property name="name" type="java.lang.String" value="FOP" noResource="true"/>
   2.176                </Properties>
   2.177 -              <Events>
   2.178 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="OpenFMActionPerformed"/>
   2.179 -              </Events>
   2.180              </MenuItem>
   2.181              <Menu class="javax.swing.JMenu" name="WebFM">
   2.182                <Properties>
   2.183 @@ -278,9 +224,6 @@
   2.184                      </Property>
   2.185                      <Property name="name" type="java.lang.String" value="RFW" noResource="true"/>
   2.186                    </Properties>
   2.187 -                  <Events>
   2.188 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RetrieveWFMActionPerformed"/>
   2.189 -                  </Events>
   2.190                  </MenuItem>
   2.191                </SubComponents>
   2.192              </Menu>
   2.193 @@ -292,9 +235,6 @@
   2.194                  <Property name="enabled" type="boolean" value="false"/>
   2.195                  <Property name="name" type="java.lang.String" value="FRE" noResource="true"/>
   2.196                </Properties>
   2.197 -              <Events>
   2.198 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RevertFMActionPerformed"/>
   2.199 -              </Events>
   2.200              </MenuItem>
   2.201              <Menu class="javax.swing.JMenu" name="RecentsFM">
   2.202                <Properties>
   2.203 @@ -317,9 +257,6 @@
   2.204                  <Property name="enabled" type="boolean" value="false"/>
   2.205                  <Property name="name" type="java.lang.String" value="FSV" noResource="true"/>
   2.206                </Properties>
   2.207 -              <Events>
   2.208 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SaveFMActionPerformed"/>
   2.209 -              </Events>
   2.210              </MenuItem>
   2.211              <MenuItem class="javax.swing.JMenuItem" name="SaveAsFM">
   2.212                <Properties>
   2.213 @@ -329,9 +266,6 @@
   2.214                  <Property name="enabled" type="boolean" value="false"/>
   2.215                  <Property name="name" type="java.lang.String" value="FSA" noResource="true"/>
   2.216                </Properties>
   2.217 -              <Events>
   2.218 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SaveAsFMActionPerformed"/>
   2.219 -              </Events>
   2.220              </MenuItem>
   2.221              <MenuItem class="javax.swing.JMenuItem" name="CloseFM">
   2.222                <Properties>
   2.223 @@ -343,9 +277,6 @@
   2.224                  </Property>
   2.225                  <Property name="name" type="java.lang.String" value="FCL" noResource="true"/>
   2.226                </Properties>
   2.227 -              <Events>
   2.228 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CloseFMActionPerformed"/>
   2.229 -              </Events>
   2.230              </MenuItem>
   2.231              <MenuItem class="javax.swing.JSeparator" name="jSeparator7">
   2.232              </MenuItem>
   2.233 @@ -360,9 +291,6 @@
   2.234                  <Property name="enabled" type="boolean" value="false"/>
   2.235                  <Property name="name" type="java.lang.String" value="FIN" noResource="true"/>
   2.236                </Properties>
   2.237 -              <Events>
   2.238 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="InfoFMActionPerformed"/>
   2.239 -              </Events>
   2.240              </MenuItem>
   2.241              <MenuItem class="javax.swing.JMenuItem" name="PrefsFM">
   2.242                <Properties>
   2.243 @@ -374,9 +302,6 @@
   2.244                  </Property>
   2.245                  <Property name="name" type="java.lang.String" value="FPR" noResource="true"/>
   2.246                </Properties>
   2.247 -              <Events>
   2.248 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PrefsFMActionPerformed"/>
   2.249 -              </Events>
   2.250              </MenuItem>
   2.251              <MenuItem class="javax.swing.JSeparator" name="jSeparator20">
   2.252              </MenuItem>
   2.253 @@ -426,9 +351,6 @@
   2.254                  </Property>
   2.255                  <Property name="name" type="java.lang.String" value="FQU" noResource="true"/>
   2.256                </Properties>
   2.257 -              <Events>
   2.258 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="QuitFMActionPerformed"/>
   2.259 -              </Events>
   2.260              </MenuItem>
   2.261            </SubComponents>
   2.262          </Menu>
   2.263 @@ -447,9 +369,6 @@
   2.264                  </Property>
   2.265                  <Property name="name" type="java.lang.String" value="ECU" noResource="true"/>
   2.266                </Properties>
   2.267 -              <Events>
   2.268 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CutEMActionPerformed"/>
   2.269 -              </Events>
   2.270              </MenuItem>
   2.271              <MenuItem class="javax.swing.JMenuItem" name="CopyEM">
   2.272                <Properties>
   2.273 @@ -458,9 +377,6 @@
   2.274                  </Property>
   2.275                  <Property name="name" type="java.lang.String" value="ECO" noResource="true"/>
   2.276                </Properties>
   2.277 -              <Events>
   2.278 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CopyEMActionPerformed"/>
   2.279 -              </Events>
   2.280              </MenuItem>
   2.281              <MenuItem class="javax.swing.JMenuItem" name="PasteEM">
   2.282                <Properties>
   2.283 @@ -469,9 +385,6 @@
   2.284                  </Property>
   2.285                  <Property name="name" type="java.lang.String" value="EPA" noResource="true"/>
   2.286                </Properties>
   2.287 -              <Events>
   2.288 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PasteEMActionPerformed"/>
   2.289 -              </Events>
   2.290              </MenuItem>
   2.291              <MenuItem class="javax.swing.JMenuItem" name="PasteSpecialEM">
   2.292                <Properties>
   2.293 @@ -480,9 +393,6 @@
   2.294                  </Property>
   2.295                  <Property name="name" type="java.lang.String" value="EPS" noResource="true"/>
   2.296                </Properties>
   2.297 -              <Events>
   2.298 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PasteSpecialEMActionPerformed"/>
   2.299 -              </Events>
   2.300              </MenuItem>
   2.301              <MenuItem class="javax.swing.JSeparator" name="jSeparator9">
   2.302              </MenuItem>
   2.303 @@ -500,9 +410,6 @@
   2.304                      </Property>
   2.305                      <Property name="name" type="java.lang.String" value="EDS" noResource="true"/>
   2.306                    </Properties>
   2.307 -                  <Events>
   2.308 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bySelectionDEMActionPerformed"/>
   2.309 -                  </Events>
   2.310                  </MenuItem>
   2.311                  <MenuItem class="javax.swing.JMenuItem" name="EmptyLinesDEM">
   2.312                    <Properties>
   2.313 @@ -511,9 +418,6 @@
   2.314                      </Property>
   2.315                      <Property name="name" type="java.lang.String" value="EDE" noResource="true"/>
   2.316                    </Properties>
   2.317 -                  <Events>
   2.318 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="EmptyLinesDEMActionPerformed"/>
   2.319 -                  </Events>
   2.320                  </MenuItem>
   2.321                </SubComponents>
   2.322              </Menu>
   2.323 @@ -534,9 +438,6 @@
   2.324                      </Property>
   2.325                      <Property name="name" type="java.lang.String" value="ERS" noResource="true"/>
   2.326                    </Properties>
   2.327 -                  <Events>
   2.328 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="StepwiseREMActionPerformed"/>
   2.329 -                  </Events>
   2.330                  </MenuItem>
   2.331                  <MenuItem class="javax.swing.JMenuItem" name="GloballyREM">
   2.332                    <Properties>
   2.333 @@ -548,9 +449,6 @@
   2.334                      </Property>
   2.335                      <Property name="name" type="java.lang.String" value="ERG" noResource="true"/>
   2.336                    </Properties>
   2.337 -                  <Events>
   2.338 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="GloballyREMActionPerformed"/>
   2.339 -                  </Events>
   2.340                  </MenuItem>
   2.341                </SubComponents>
   2.342              </Menu>
   2.343 @@ -572,9 +470,6 @@
   2.344                      <Property name="actionCommand" type="java.lang.String" value="b"/>
   2.345                      <Property name="name" type="java.lang.String" value="EIB" noResource="true"/>
   2.346                    </Properties>
   2.347 -                  <Events>
   2.348 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="insertSubEntry"/>
   2.349 -                  </Events>
   2.350                  </MenuItem>
   2.351                  <MenuItem class="javax.swing.JMenuItem" name="AfterIEM">
   2.352                    <Properties>
   2.353 @@ -587,9 +482,6 @@
   2.354                      <Property name="actionCommand" type="java.lang.String" value="a"/>
   2.355                      <Property name="name" type="java.lang.String" value="EIA" noResource="true"/>
   2.356                    </Properties>
   2.357 -                  <Events>
   2.358 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="insertSubEntry"/>
   2.359 -                  </Events>
   2.360                  </MenuItem>
   2.361                </SubComponents>
   2.362              </Menu>
   2.363 @@ -611,9 +503,6 @@
   2.364                      <Property name="actionCommand" type="java.lang.String" value="p"/>
   2.365                      <Property name="name" type="java.lang.String" value="EGP" noResource="true"/>
   2.366                    </Properties>
   2.367 -                  <Events>
   2.368 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.369 -                  </Events>
   2.370                  </MenuItem>
   2.371                  <MenuItem class="javax.swing.JMenuItem" name="NextGEM">
   2.372                    <Properties>
   2.373 @@ -626,9 +515,6 @@
   2.374                      <Property name="actionCommand" type="java.lang.String" value="n"/>
   2.375                      <Property name="name" type="java.lang.String" value="EGN" noResource="true"/>
   2.376                    </Properties>
   2.377 -                  <Events>
   2.378 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.379 -                  </Events>
   2.380                  </MenuItem>
   2.381                  <MenuItem class="javax.swing.JMenuItem" name="PreviousPageGEM">
   2.382                    <Properties>
   2.383 @@ -641,9 +527,6 @@
   2.384                      <Property name="actionCommand" type="java.lang.String" value="u"/>
   2.385                      <Property name="name" type="java.lang.String" value="EGU" noResource="true"/>
   2.386                    </Properties>
   2.387 -                  <Events>
   2.388 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.389 -                  </Events>
   2.390                  </MenuItem>
   2.391                  <MenuItem class="javax.swing.JMenuItem" name="NextPageGEM">
   2.392                    <Properties>
   2.393 @@ -656,9 +539,6 @@
   2.394                      <Property name="actionCommand" type="java.lang.String" value="d"/>
   2.395                      <Property name="name" type="java.lang.String" value="EGD" noResource="true"/>
   2.396                    </Properties>
   2.397 -                  <Events>
   2.398 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.399 -                  </Events>
   2.400                  </MenuItem>
   2.401                  <MenuItem class="javax.swing.JMenuItem" name="TopGEM">
   2.402                    <Properties>
   2.403 @@ -671,9 +551,6 @@
   2.404                      <Property name="actionCommand" type="java.lang.String" value="t"/>
   2.405                      <Property name="name" type="java.lang.String" value="EGT" noResource="true"/>
   2.406                    </Properties>
   2.407 -                  <Events>
   2.408 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.409 -                  </Events>
   2.410                  </MenuItem>
   2.411                  <MenuItem class="javax.swing.JMenuItem" name="BottomGEM">
   2.412                    <Properties>
   2.413 @@ -686,9 +563,6 @@
   2.414                      <Property name="actionCommand" type="java.lang.String" value="b"/>
   2.415                      <Property name="name" type="java.lang.String" value="EGB" noResource="true"/>
   2.416                    </Properties>
   2.417 -                  <Events>
   2.418 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goToSubtitle"/>
   2.419 -                  </Events>
   2.420                  </MenuItem>
   2.421                  <MenuItem class="javax.swing.JSeparator" name="jSeparator2">
   2.422                  </MenuItem>
   2.423 @@ -699,9 +573,6 @@
   2.424                      </Property>
   2.425                      <Property name="name" type="java.lang.String" value="EGM" noResource="true"/>
   2.426                    </Properties>
   2.427 -                  <Events>
   2.428 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="byTimeGEMActionPerformed"/>
   2.429 -                  </Events>
   2.430                  </MenuItem>
   2.431                  <MenuItem class="javax.swing.JMenuItem" name="byLineNumberEM">
   2.432                    <Properties>
   2.433 @@ -713,9 +584,6 @@
   2.434                      </Property>
   2.435                      <Property name="name" type="java.lang.String" value="EGL" noResource="true"/>
   2.436                    </Properties>
   2.437 -                  <Events>
   2.438 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="byLineNumberEMActionPerformed"/>
   2.439 -                  </Events>
   2.440                  </MenuItem>
   2.441                </SubComponents>
   2.442              </Menu>
   2.443 @@ -735,9 +603,6 @@
   2.444                      </Property>
   2.445                      <Property name="name" type="java.lang.String" value="EMN" noResource="true"/>
   2.446                    </Properties>
   2.447 -                  <Events>
   2.448 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="NoneMEMActionPerformed"/>
   2.449 -                  </Events>
   2.450                  </MenuItem>
   2.451                  <MenuItem class="javax.swing.JMenuItem" name="PinkMEM">
   2.452                    <Properties>
   2.453 @@ -746,9 +611,6 @@
   2.454                      </Property>
   2.455                      <Property name="name" type="java.lang.String" value="EMP" noResource="true"/>
   2.456                    </Properties>
   2.457 -                  <Events>
   2.458 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PinkMEMActionPerformed"/>
   2.459 -                  </Events>
   2.460                  </MenuItem>
   2.461                  <MenuItem class="javax.swing.JMenuItem" name="YellowMEM">
   2.462                    <Properties>
   2.463 @@ -757,9 +619,6 @@
   2.464                      </Property>
   2.465                      <Property name="name" type="java.lang.String" value="EMY" noResource="true"/>
   2.466                    </Properties>
   2.467 -                  <Events>
   2.468 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="YellowMEMActionPerformed"/>
   2.469 -                  </Events>
   2.470                  </MenuItem>
   2.471                  <MenuItem class="javax.swing.JMenuItem" name="CyanMEM">
   2.472                    <Properties>
   2.473 @@ -768,9 +627,6 @@
   2.474                      </Property>
   2.475                      <Property name="name" type="java.lang.String" value="EMC" noResource="true"/>
   2.476                    </Properties>
   2.477 -                  <Events>
   2.478 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CyanMEMActionPerformed"/>
   2.479 -                  </Events>
   2.480                  </MenuItem>
   2.481                  <MenuItem class="javax.swing.JSeparator" name="MarkSep">
   2.482                  </MenuItem>
   2.483 @@ -781,9 +637,6 @@
   2.484                      </Property>
   2.485                      <Property name="name" type="java.lang.String" value="EMS" noResource="true"/>
   2.486                    </Properties>
   2.487 -                  <Events>
   2.488 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bySelectionMEMActionPerformed"/>
   2.489 -                  </Events>
   2.490                  </MenuItem>
   2.491                </SubComponents>
   2.492              </Menu>
   2.493 @@ -803,9 +656,6 @@
   2.494                      </Property>
   2.495                      <Property name="name" type="java.lang.String" value="ESS" noResource="true"/>
   2.496                    </Properties>
   2.497 -                  <Events>
   2.498 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bySelectionSEMActionPerformed"/>
   2.499 -                  </Events>
   2.500                  </MenuItem>
   2.501                </SubComponents>
   2.502              </Menu>
   2.503 @@ -822,9 +672,6 @@
   2.504                  <Property name="enabled" type="boolean" value="false"/>
   2.505                  <Property name="name" type="java.lang.String" value="EUN" noResource="true"/>
   2.506                </Properties>
   2.507 -              <Events>
   2.508 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="UndoEMActionPerformed"/>
   2.509 -              </Events>
   2.510              </MenuItem>
   2.511              <MenuItem class="javax.swing.JMenuItem" name="RedoEM">
   2.512                <Properties>
   2.513 @@ -837,9 +684,6 @@
   2.514                  <Property name="enabled" type="boolean" value="false"/>
   2.515                  <Property name="name" type="java.lang.String" value="ERE" noResource="true"/>
   2.516                </Properties>
   2.517 -              <Events>
   2.518 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RedoEMActionPerformed"/>
   2.519 -              </Events>
   2.520              </MenuItem>
   2.521            </SubComponents>
   2.522          </Menu>
   2.523 @@ -866,9 +710,6 @@
   2.524                  </Property>
   2.525                  <Property name="name" type="java.lang.String" value="TSP" noResource="true"/>
   2.526                </Properties>
   2.527 -              <Events>
   2.528 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SplitTMActionPerformed"/>
   2.529 -              </Events>
   2.530              </MenuItem>
   2.531              <MenuItem class="javax.swing.JMenuItem" name="JoinTM">
   2.532                <Properties>
   2.533 @@ -878,9 +719,6 @@
   2.534                  <Property name="enabled" type="boolean" value="false"/>
   2.535                  <Property name="name" type="java.lang.String" value="TJO" noResource="true"/>
   2.536                </Properties>
   2.537 -              <Events>
   2.538 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="JoinTMActionPerformed"/>
   2.539 -              </Events>
   2.540              </MenuItem>
   2.541              <MenuItem class="javax.swing.JMenuItem" name="ReparentTM">
   2.542                <Properties>
   2.543 @@ -890,9 +728,6 @@
   2.544                  <Property name="enabled" type="boolean" value="false"/>
   2.545                  <Property name="name" type="java.lang.String" value="TPA" noResource="true"/>
   2.546                </Properties>
   2.547 -              <Events>
   2.548 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ReparentTMActionPerformed"/>
   2.549 -              </Events>
   2.550              </MenuItem>
   2.551              <MenuItem class="javax.swing.JMenuItem" name="SynchronizeTM">
   2.552                <Properties>
   2.553 @@ -901,9 +736,6 @@
   2.554                  </Property>
   2.555                  <Property name="name" type="java.lang.String" value="TSY" noResource="true"/>
   2.556                </Properties>
   2.557 -              <Events>
   2.558 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SynchronizeTMActionPerformed"/>
   2.559 -              </Events>
   2.560              </MenuItem>
   2.561              <MenuItem class="javax.swing.JSeparator" name="jSeparator8">
   2.562              </MenuItem>
   2.563 @@ -914,9 +746,6 @@
   2.564                  </Property>
   2.565                  <Property name="name" type="java.lang.String" value="TSH" noResource="true"/>
   2.566                </Properties>
   2.567 -              <Events>
   2.568 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ShiftTimeTMActionPerformed"/>
   2.569 -              </Events>
   2.570              </MenuItem>
   2.571              <MenuItem class="javax.swing.JMenuItem" name="RecodeTM">
   2.572                <Properties>
   2.573 @@ -925,9 +754,6 @@
   2.574                  </Property>
   2.575                  <Property name="name" type="java.lang.String" value="TCO" noResource="true"/>
   2.576                </Properties>
   2.577 -              <Events>
   2.578 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RecodeTMActionPerformed"/>
   2.579 -              </Events>
   2.580              </MenuItem>
   2.581              <MenuItem class="javax.swing.JMenuItem" name="FixTM">
   2.582                <Properties>
   2.583 @@ -936,9 +762,6 @@
   2.584                  </Property>
   2.585                  <Property name="name" type="java.lang.String" value="TFI" noResource="true"/>
   2.586                </Properties>
   2.587 -              <Events>
   2.588 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FixTMActionPerformed"/>
   2.589 -              </Events>
   2.590              </MenuItem>
   2.591              <MenuItem class="javax.swing.JMenuItem" name="RoundTM">
   2.592                <Properties>
   2.593 @@ -947,9 +770,6 @@
   2.594                  </Property>
   2.595                  <Property name="name" type="java.lang.String" value="TRO" noResource="true"/>
   2.596                </Properties>
   2.597 -              <Events>
   2.598 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RoundTMActionPerformed"/>
   2.599 -              </Events>
   2.600              </MenuItem>
   2.601              <MenuItem class="javax.swing.JSeparator" name="jSeparator5">
   2.602              </MenuItem>
   2.603 @@ -963,9 +783,6 @@
   2.604                  </Property>
   2.605                  <Property name="name" type="java.lang.String" value="TLL" noResource="true"/>
   2.606                </Properties>
   2.607 -              <Events>
   2.608 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SpellTMActionPerformed"/>
   2.609 -              </Events>
   2.610              </MenuItem>
   2.611              <MenuItem class="javax.swing.JMenuItem" name="TranslateTM">
   2.612                <Properties>
   2.613 @@ -974,9 +791,6 @@
   2.614                  </Property>
   2.615                  <Property name="name" type="java.lang.String" value="TTM" noResource="true"/>
   2.616                </Properties>
   2.617 -              <Events>
   2.618 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TranslateTMActionPerformed"/>
   2.619 -              </Events>
   2.620              </MenuItem>
   2.621              <MenuItem class="javax.swing.JSeparator" name="jSeparator3">
   2.622              </MenuItem>
   2.623 @@ -997,9 +811,6 @@
   2.624                      </Property>
   2.625                      <Property name="name" type="java.lang.String" value="TTB" noResource="true"/>
   2.626                    </Properties>
   2.627 -                  <Events>
   2.628 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="BeginningTTMActionPerformed"/>
   2.629 -                  </Events>
   2.630                  </MenuItem>
   2.631                  <MenuItem class="javax.swing.JMenuItem" name="CurrentTTM">
   2.632                    <Properties>
   2.633 @@ -1011,9 +822,6 @@
   2.634                      </Property>
   2.635                      <Property name="name" type="java.lang.String" value="TTC" noResource="true"/>
   2.636                    </Properties>
   2.637 -                  <Events>
   2.638 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CurrentTTMActionPerformed"/>
   2.639 -                  </Events>
   2.640                  </MenuItem>
   2.641                </SubComponents>
   2.642              </Menu>
   2.643 @@ -1034,9 +842,6 @@
   2.644                      </Property>
   2.645                      <Property name="name" type="java.lang.String" value="TPE" noResource="true"/>
   2.646                    </Properties>
   2.647 -                  <Events>
   2.648 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="EnablePreviewCActionPerformed"/>
   2.649 -                  </Events>
   2.650                  </MenuItem>
   2.651                  <MenuItem class="javax.swing.JSeparator" name="jSeparator6">
   2.652                  </MenuItem>
   2.653 @@ -1048,9 +853,6 @@
   2.654                      </Property>
   2.655                      <Property name="name" type="java.lang.String" value="TPV" noResource="true"/>
   2.656                    </Properties>
   2.657 -                  <Events>
   2.658 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="VideoPreviewCActionPerformed"/>
   2.659 -                  </Events>
   2.660                    <AuxValues>
   2.661                      <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
   2.662                    </AuxValues>
   2.663 @@ -1062,9 +864,6 @@
   2.664                      </Property>
   2.665                      <Property name="name" type="java.lang.String" value="TPH" noResource="true"/>
   2.666                    </Properties>
   2.667 -                  <Events>
   2.668 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="HalfSizeCActionPerformed"/>
   2.669 -                  </Events>
   2.670                    <AuxValues>
   2.671                      <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
   2.672                    </AuxValues>
   2.673 @@ -1079,9 +878,6 @@
   2.674                      </Property>
   2.675                      <Property name="name" type="java.lang.String" value="TAP" noResource="true"/>
   2.676                    </Properties>
   2.677 -                  <Events>
   2.678 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="AudioPreviewCActionPerformed"/>
   2.679 -                  </Events>
   2.680                    <AuxValues>
   2.681                      <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
   2.682                    </AuxValues>
   2.683 @@ -1093,9 +889,6 @@
   2.684                      </Property>
   2.685                      <Property name="name" type="java.lang.String" value="TPM" noResource="true"/>
   2.686                    </Properties>
   2.687 -                  <Events>
   2.688 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="MaxWaveCActionPerformed"/>
   2.689 -                  </Events>
   2.690                    <AuxValues>
   2.691                      <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
   2.692                    </AuxValues>
   2.693 @@ -1107,9 +900,6 @@
   2.694                      </Property>
   2.695                      <Property name="name" type="java.lang.String" value="TPP" noResource="true"/>
   2.696                    </Properties>
   2.697 -                  <Events>
   2.698 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PlayAudioCActionPerformed"/>
   2.699 -                  </Events>
   2.700                  </MenuItem>
   2.701                </SubComponents>
   2.702              </Menu>
   2.703 @@ -1132,9 +922,6 @@
   2.704                      </Property>
   2.705                      <Property name="name" type="java.lang.String" value="TRJ" noResource="true"/>
   2.706                    </Properties>
   2.707 -                  <Events>
   2.708 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="JoinRecordTMActionPerformed"/>
   2.709 -                  </Events>
   2.710                  </MenuItem>
   2.711                  <MenuItem class="javax.swing.JMenuItem" name="SplitRecordTM">
   2.712                    <Properties>
   2.713 @@ -1146,9 +933,6 @@
   2.714                      </Property>
   2.715                      <Property name="name" type="java.lang.String" value="TRS" noResource="true"/>
   2.716                    </Properties>
   2.717 -                  <Events>
   2.718 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SplitRecordTMActionPerformed"/>
   2.719 -                  </Events>
   2.720                  </MenuItem>
   2.721                  <MenuItem class="javax.swing.JMenuItem" name="ViewHeaderTM">
   2.722                    <Properties>
   2.723 @@ -1222,9 +1006,6 @@
   2.724                      </Property>
   2.725                      <Property name="name" type="java.lang.String" value="TBT" noResource="true"/>
   2.726                    </Properties>
   2.727 -                  <Events>
   2.728 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TextBalancingOnSelectionActionPerformed"/>
   2.729 -                  </Events>
   2.730                  </MenuItem>
   2.731                  <MenuItem class="javax.swing.JMenuItem" name="TextBalancingOnTheWholeTable">
   2.732                    <Properties>
   2.733 @@ -1236,9 +1017,6 @@
   2.734                      </Property>
   2.735                      <Property name="name" type="java.lang.String" value="TTW" noResource="true"/>
   2.736                    </Properties>
   2.737 -                  <Events>
   2.738 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TextBalancingOnTheWholeTableActionPerformed"/>
   2.739 -                  </Events>
   2.740                  </MenuItem>
   2.741                </SubComponents>
   2.742              </Menu>
   2.743 @@ -1256,9 +1034,6 @@
   2.744                      </Property>
   2.745                      <Property name="name" type="java.lang.String" value="TOS" noResource="true"/>
   2.746                    </Properties>
   2.747 -                  <Events>
   2.748 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="OCRSelectedActionPerformed"/>
   2.749 -                  </Events>
   2.750                  </MenuItem>
   2.751                  <MenuItem class="javax.swing.JMenuItem" name="OCRAll">
   2.752                    <Properties>
   2.753 @@ -1267,9 +1042,6 @@
   2.754                      </Property>
   2.755                      <Property name="name" type="java.lang.String" value="TOA" noResource="true"/>
   2.756                    </Properties>
   2.757 -                  <Events>
   2.758 -                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="OCRAllActionPerformed"/>
   2.759 -                  </Events>
   2.760                  </MenuItem>
   2.761                  <MenuItem class="javax.swing.JMenuItem" name="PackingImagesToTiffM">
   2.762                    <Properties>
   2.763 @@ -1297,9 +1069,6 @@
   2.764                  </Property>
   2.765                  <Property name="name" type="java.lang.String" value="HFQ" noResource="true"/>
   2.766                </Properties>
   2.767 -              <Events>
   2.768 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FAQHMActionPerformed"/>
   2.769 -              </Events>
   2.770              </MenuItem>
   2.771              <MenuItem class="javax.swing.JMenuItem" name="AboutHM">
   2.772                <Properties>
   2.773 @@ -1311,9 +1080,6 @@
   2.774                  </Property>
   2.775                  <Property name="name" type="java.lang.String" value="HAB" noResource="true"/>
   2.776                </Properties>
   2.777 -              <Events>
   2.778 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="AboutHMActionPerformed"/>
   2.779 -              </Events>
   2.780              </MenuItem>
   2.781            </SubComponents>
   2.782          </Menu>
   2.783 @@ -1331,15 +1097,13 @@
   2.784      <SyntheticProperty name="menuBar" type="java.lang.String" value="JublerMenuBar"/>
   2.785      <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
   2.786    </SyntheticProperties>
   2.787 -  <Events>
   2.788 -    <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
   2.789 -  </Events>
   2.790    <AuxValues>
   2.791      <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   2.792      <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   2.793      <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
   2.794      <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   2.795      <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
   2.796 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
   2.797      <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="1"/>
   2.798      <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   2.799      <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   2.800 @@ -1464,14 +1228,14 @@
   2.801                <SubComponents>
   2.802                  <Component class="javax.swing.JTable" name="SubTable">
   2.803                    <Properties>
   2.804 +                    <Property name="autoResizeMode" type="int" value="3"/>
   2.805                      <Property name="componentPopupMenu" type="javax.swing.JPopupMenu" editor="org.netbeans.modules.form.ComponentChooserEditor">
   2.806                        <ComponentRef name="SubsPop"/>
   2.807                      </Property>
   2.808 -                    <Property name="autoResizeMode" type="int" value="3"/>
   2.809                    </Properties>
   2.810                    <AuxValues>
   2.811                      <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new JTable () {&#xa;            public void columnMarginChanged(ChangeEvent e)  {&#xa;                super.columnMarginChanged(e);&#xa;                setcolumnchange(true);&#xa;            }&#xa;        };"/>
   2.812 -                    <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="        SubTable.setDefaultRenderer(Object.class, TableRenderer);&#xa;        SubTable.getTableHeader().addMouseListener(new MouseAdapter(){&#xa;            public void mousePressed(MouseEvent e) {&#xa;                setcolumnchange(false);&#xa;            }&#xa;            public void mouseReleased(MouseEvent e) {&#xa;                if (getcolumnchange()) subs.updateColumnWidth(SubTable);&#xa;                setcolumnchange(false);&#xa;            }&#xa;        });&#xa;        SubTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {&#xa;            public void valueChanged(ListSelectionEvent e) {&#xa;                if (e.getValueIsAdjusting()) return; //Ignore extra messages&#xa;                ListSelectionModel lsm = (ListSelectionModel)e.getSource();&#xa;                if (!lsm.isSelectionEmpty()) {&#xa;                    displaySubData();&#xa;                }&#xa;            }&#xa;        });&#xa;"/>
   2.813 +                    <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="        SubTable.setDefaultRenderer(Object.class, TableRenderer);&#xa;        SubTable.getTableHeader().addMouseListener(new MouseAdapter(){&#xa;            public void mousePressed(MouseEvent e) {&#xa;                setcolumnchange(false);&#xa;            }&#xa;            public void mouseReleased(MouseEvent e) {&#xa;                if (getcolumnchange()) subs.updateColumnWidth(SubTable);&#xa;                setcolumnchange(false);&#xa;            }&#xa;        });&#xa;        SubTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {&#xa;            public void valueChanged(ListSelectionEvent e) {&#xa;                if (e.getValueIsAdjusting()) return; //Ignore extra messages&#xa;                ListSelectionModel lsm = (ListSelectionModel)e.getSource();&#xa;                if (!lsm.isSelectionEmpty()) {&#xa;                    fn.displaySubData();&#xa;                }&#xa;            }&#xa;        });&#xa;"/>
   2.814                    </AuxValues>
   2.815                  </Component>
   2.816                </SubComponents>
   2.817 @@ -1502,9 +1266,6 @@
   2.818                    <Connection code="_(&quot;New&quot;)" type="code"/>
   2.819                  </Property>
   2.820                </Properties>
   2.821 -              <Events>
   2.822 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="FileNFMActionPerformed"/>
   2.823 -              </Events>
   2.824              </Component>
   2.825              <Component class="javax.swing.JButton" name="LoadTB">
   2.826                <Properties>
   2.827 @@ -1515,9 +1276,6 @@
   2.828                    <Connection code="_(&quot;Load&quot;)" type="code"/>
   2.829                  </Property>
   2.830                </Properties>
   2.831 -              <Events>
   2.832 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="OpenFMActionPerformed"/>
   2.833 -              </Events>
   2.834              </Component>
   2.835              <Component class="javax.swing.JButton" name="SaveTB">
   2.836                <Properties>
   2.837 @@ -1529,9 +1287,6 @@
   2.838                  </Property>
   2.839                  <Property name="enabled" type="boolean" value="false"/>
   2.840                </Properties>
   2.841 -              <Events>
   2.842 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SaveTBActionPerformed"/>
   2.843 -              </Events>
   2.844              </Component>
   2.845              <Component class="javax.swing.JButton" name="InfoTB">
   2.846                <Properties>
   2.847 @@ -1543,9 +1298,6 @@
   2.848                  </Property>
   2.849                  <Property name="enabled" type="boolean" value="false"/>
   2.850                </Properties>
   2.851 -              <Events>
   2.852 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="InfoFMActionPerformed"/>
   2.853 -              </Events>
   2.854              </Component>
   2.855            </SubComponents>
   2.856          </Container>
   2.857 @@ -1579,9 +1331,6 @@
   2.858                  </Property>
   2.859                  <Property name="enabled" type="boolean" value="false"/>
   2.860                </Properties>
   2.861 -              <Events>
   2.862 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CutTBActionPerformed"/>
   2.863 -              </Events>
   2.864              </Component>
   2.865              <Component class="javax.swing.JButton" name="CopyTB">
   2.866                <Properties>
   2.867 @@ -1593,9 +1342,6 @@
   2.868                  </Property>
   2.869                  <Property name="enabled" type="boolean" value="false"/>
   2.870                </Properties>
   2.871 -              <Events>
   2.872 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CopyTBActionPerformed"/>
   2.873 -              </Events>
   2.874              </Component>
   2.875              <Component class="javax.swing.JButton" name="PasteTB">
   2.876                <Properties>
   2.877 @@ -1607,9 +1353,6 @@
   2.878                  </Property>
   2.879                  <Property name="enabled" type="boolean" value="false"/>
   2.880                </Properties>
   2.881 -              <Events>
   2.882 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PasteTBActionPerformed"/>
   2.883 -              </Events>
   2.884              </Component>
   2.885            </SubComponents>
   2.886          </Container>
   2.887 @@ -1629,9 +1372,6 @@
   2.888                  </Property>
   2.889                  <Property name="enabled" type="boolean" value="false"/>
   2.890                </Properties>
   2.891 -              <Events>
   2.892 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="UndoEMActionPerformed"/>
   2.893 -              </Events>
   2.894              </Component>
   2.895              <Component class="javax.swing.JButton" name="RedoTB">
   2.896                <Properties>
   2.897 @@ -1643,9 +1383,6 @@
   2.898                  </Property>
   2.899                  <Property name="enabled" type="boolean" value="false"/>
   2.900                </Properties>
   2.901 -              <Events>
   2.902 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RedoEMActionPerformed"/>
   2.903 -              </Events>
   2.904              </Component>
   2.905            </SubComponents>
   2.906          </Container>
   2.907 @@ -1685,9 +1422,6 @@
   2.908                  <Property name="horizontalTextPosition" type="int" value="0"/>
   2.909                  <Property name="verticalTextPosition" type="int" value="3"/>
   2.910                </Properties>
   2.911 -              <Events>
   2.912 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SortTBActionPerformed"/>
   2.913 -              </Events>
   2.914              </Component>
   2.915            </SubComponents>
   2.916          </Container>
   2.917 @@ -1707,9 +1441,6 @@
   2.918                  </Property>
   2.919                  <Property name="enabled" type="boolean" value="false"/>
   2.920                </Properties>
   2.921 -              <Events>
   2.922 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CurrentTTMActionPerformed"/>
   2.923 -              </Events>
   2.924              </Component>
   2.925              <Component class="javax.swing.JButton" name="PreviewTB">
   2.926                <Properties>
   2.927 @@ -1724,9 +1455,6 @@
   2.928                    <Image iconType="3" name="/icons/preview.png"/>
   2.929                  </Property>
   2.930                </Properties>
   2.931 -              <Events>
   2.932 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PreviewTBCurrentTTMActionPerformed"/>
   2.933 -              </Events>
   2.934                <AuxValues>
   2.935                  <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="        PreviewTB.setModel(new ToggleButtonModel()); "/>
   2.936                </AuxValues>
   2.937 @@ -1767,9 +1495,6 @@
   2.938                    <Dimension value="[150, 22]"/>
   2.939                  </Property>
   2.940                </Properties>
   2.941 -              <Events>
   2.942 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DropDownActionListActionPerformed"/>
   2.943 -              </Events>
   2.944                <Constraints>
   2.945                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   2.946                    <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
   2.947 @@ -1792,9 +1517,6 @@
   2.948                    <Dimension value="[50, 22]"/>
   2.949                  </Property>
   2.950                </Properties>
   2.951 -              <Events>
   2.952 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DropDownActionNumberOfLineActionPerformed"/>
   2.953 -              </Events>
   2.954                <Constraints>
   2.955                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   2.956                    <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
   2.957 @@ -1820,9 +1542,6 @@
   2.958                    <Dimension value="[57, 32]"/>
   2.959                  </Property>
   2.960                </Properties>
   2.961 -              <Events>
   2.962 -                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DoItTBActionPerformed"/>
   2.963 -              </Events>
   2.964                <Constraints>
   2.965                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   2.966                    <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
     3.1 --- a/src/com/panayotis/jubler/Jubler.java	Tue Oct 20 20:01:52 2009 +0100
     3.2 +++ b/src/com/panayotis/jubler/Jubler.java	Thu Oct 22 19:22:17 2009 +0100
     3.3 @@ -22,104 +22,50 @@
     3.4   */
     3.5  package com.panayotis.jubler;
     3.6  
     3.7 -import com.panayotis.jubler.os.JIDialog;
     3.8 +import com.panayotis.jubler.events.app.WindowEventHandler;
     3.9 +import com.panayotis.jubler.information.HelpBrowser;
    3.10  import static com.panayotis.jubler.i18n.I18N._;
    3.11 -
    3.12  import com.panayotis.jubler.subs.loader.SubFileFilter;
    3.13 -import com.panayotis.jubler.information.HelpBrowser;
    3.14 -import com.panayotis.jubler.information.JInformation;
    3.15  import com.panayotis.jubler.media.MediaFile;
    3.16  import com.panayotis.jubler.options.JPreferences;
    3.17 -import com.panayotis.jubler.os.Dropper;
    3.18 -import com.panayotis.jubler.os.SystemDependent;
    3.19  import com.panayotis.jubler.media.console.JVideoConsole;
    3.20  import com.panayotis.jubler.media.preview.JSubPreview;
    3.21  import com.panayotis.jubler.options.IntegerComboBoxModel;
    3.22  import com.panayotis.jubler.options.ShortcutsModel;
    3.23 -import com.panayotis.jubler.os.AutoSaver;
    3.24  import com.panayotis.jubler.os.FileCommunicator;
    3.25 -import com.panayotis.jubler.subs.CommonDef;
    3.26  import com.panayotis.jubler.subs.DropDownFunctionList;
    3.27  import com.panayotis.jubler.subs.DropDownFunctionList.FunctionList;
    3.28  import com.panayotis.jubler.subs.JSubEditor;
    3.29  import com.panayotis.jubler.subs.JublerList;
    3.30  import com.panayotis.jubler.subs.RecordComponent;
    3.31 -import com.panayotis.jubler.subs.SubAttribs;
    3.32  import com.panayotis.jubler.subs.SubEntry;
    3.33 -import com.panayotis.jubler.subs.SubMetrics;
    3.34  import com.panayotis.jubler.subs.SubRenderer;
    3.35  import com.panayotis.jubler.subs.Subtitles;
    3.36 -import com.panayotis.jubler.subs.loader.SubFormat;
    3.37 -import com.panayotis.jubler.subs.loader.web.OpenSubtitles;
    3.38 -import com.panayotis.jubler.subs.style.SubStyle;
    3.39 -import com.panayotis.jubler.subs.style.SubStyleList;
    3.40 -import com.panayotis.jubler.time.Time;
    3.41 -import com.panayotis.jubler.time.gui.JTimeSingleSelection;
    3.42  import com.panayotis.jubler.tools.JDelSelection;
    3.43  import com.panayotis.jubler.tools.JFixer;
    3.44  import com.panayotis.jubler.tools.JMarker;
    3.45 -import com.panayotis.jubler.tools.JPaster;
    3.46  import com.panayotis.jubler.tools.JRecodeTime;
    3.47 -import com.panayotis.jubler.tools.JReparent;
    3.48  import com.panayotis.jubler.tools.JReplaceGlobal;
    3.49  import com.panayotis.jubler.tools.JRounder;
    3.50  import com.panayotis.jubler.tools.JShiftTime;
    3.51  import com.panayotis.jubler.tools.JSpeller;
    3.52 -import com.panayotis.jubler.tools.JStyler;
    3.53 -import com.panayotis.jubler.tools.JSubJoin;
    3.54  import com.panayotis.jubler.tools.JSubSplit;
    3.55 -import com.panayotis.jubler.tools.JSynchronize;
    3.56  import com.panayotis.jubler.tools.JToolRealTime;
    3.57  import com.panayotis.jubler.tools.JTranslate;
    3.58 -import com.panayotis.jubler.tools.duplication.RemoveBottomTopLineDuplication;
    3.59 -import com.panayotis.jubler.tools.duplication.RemoveTimeDuplication;
    3.60 -import com.panayotis.jubler.tools.duplication.RemoveTopLineDuplication;
    3.61 -import com.panayotis.jubler.tools.duplication.SplitSONSubtitleAction;
    3.62 -import com.panayotis.jubler.tools.editing.BalanceText;
    3.63 -import com.panayotis.jubler.tools.editing.EditTextCaseTranspose;
    3.64 -import com.panayotis.jubler.tools.editing.InsertBlankLine;
    3.65 -import com.panayotis.jubler.tools.editing.MoveRecord;
    3.66 -import com.panayotis.jubler.tools.editing.MoveText;
    3.67 -import com.panayotis.jubler.tools.ocr.OCRAction;
    3.68 -import com.panayotis.jubler.tools.ocr.PackingImageFilesToTiffAction;
    3.69 -import com.panayotis.jubler.tools.ocr.PackingImagesToTiffAction;
    3.70 -import com.panayotis.jubler.tools.records.AppendFromFile;
    3.71 -import com.panayotis.jubler.tools.records.ImportComponent;
    3.72 -import com.panayotis.jubler.tools.records.MergeRecords;
    3.73 -import com.panayotis.jubler.tools.records.SplitRecord;
    3.74 -import com.panayotis.jubler.tools.records.ViewHeader;
    3.75 -import com.panayotis.jubler.tools.replace.JReplace;
    3.76 -import com.panayotis.jubler.undo.UndoEntry;
    3.77 -import com.panayotis.jubler.undo.UndoList;
    3.78 -import java.awt.Color;
    3.79 -import java.awt.EventQueue;
    3.80 +import com.panayotis.jubler.events.menu.edit.undo.UndoList;
    3.81  import java.awt.Image;
    3.82 -import java.awt.SystemColor;
    3.83 -import java.awt.Toolkit;
    3.84 -import java.awt.event.ActionEvent;
    3.85 -import java.awt.event.ActionListener;
    3.86 -import java.awt.event.KeyEvent;
    3.87  import java.awt.event.MouseAdapter;
    3.88  import java.awt.event.MouseEvent;
    3.89 -import java.io.File;
    3.90  import java.util.ArrayList;
    3.91  import java.util.Vector;
    3.92 -import javax.swing.AbstractButton;
    3.93 -import javax.swing.Action;
    3.94  import javax.swing.ComboBoxModel;
    3.95 -import javax.swing.DropMode;
    3.96  import javax.swing.ImageIcon;
    3.97 -import javax.swing.JButton;
    3.98  import javax.swing.JFileChooser;
    3.99  import javax.swing.JFrame;
   3.100 -import javax.swing.JMenu;
   3.101 -import javax.swing.JMenuItem;
   3.102  import javax.swing.JSplitPane;
   3.103  import javax.swing.JTable;
   3.104  import javax.swing.JToggleButton.ToggleButtonModel;
   3.105 -import javax.swing.KeyStroke;
   3.106  import javax.swing.ListSelectionModel;
   3.107 -import javax.swing.TransferHandler;
   3.108  import javax.swing.event.ChangeEvent;
   3.109  import javax.swing.event.ListSelectionEvent;
   3.110  import javax.swing.event.ListSelectionListener;
   3.111 @@ -128,12 +74,19 @@
   3.112   * The main GUI entrance into the application.
   3.113   * @author  teras
   3.114   */
   3.115 -public class Jubler extends JFrame implements CommonDef {
   3.116 -
   3.117 +public class Jubler extends JFrame {
   3.118      public static JublerList windows;
   3.119      public static ArrayList<SubEntry> copybuffer;
   3.120      public static int selectedComponent = RecordComponent.CP_RECORD;
   3.121      public static JPreferences prefs;
   3.122 +    //This is the default copy/cut option, since this is the first item
   3.123 +    //on the combo-box list.
   3.124 +    public static HelpBrowser faqbrowse;
   3.125 +    /* Window frame icon */
   3.126 +    public final static Image FrameIcon;
   3.127 +    private final static SubRenderer TableRenderer = new SubRenderer();
   3.128 +
   3.129 +
   3.130      /** File chooser dialog to open/ save subtitles */
   3.131      private JFileChooser filedialog;
   3.132      /*
   3.133 @@ -164,14 +117,13 @@
   3.134      /* This flag is used to refrain from updating the video console. This is used
   3.135       * when the videoconsole itself has performed this change and we dont want it
   3.136       * to have back this event */
   3.137 -    boolean disable_consoles_update = false;
   3.138 +    private boolean disable_consoles_update = false;
   3.139      /* Whether this file needs saving or not */
   3.140      private boolean unsaved_data = false;
   3.141      private int numberOfLine = 1;
   3.142      private FunctionList fnOption = FunctionList.FN_GOTO_LINE;
   3.143      private ComboBoxModel fnComboboxModel = new javax.swing.DefaultComboBoxModel(DropDownFunctionList.fnNames);
   3.144      /* Jubler tools */
   3.145 -    private JStyler styler;
   3.146      private JShiftTime shift;
   3.147      private JSpeller spell;
   3.148      private JRounder round;
   3.149 @@ -180,32 +132,11 @@
   3.150      private JDelSelection dels;
   3.151      private JMarker mark;
   3.152      private JRecodeTime recode;
   3.153 -    private JSynchronize sync;
   3.154      private JSubSplit split;
   3.155      private JTranslate translate;
   3.156 -    //This is the default copy/cut option, since this is the first item
   3.157 -    //on the combo-box list.
   3.158 -    private static HelpBrowser faqbrowse;
   3.159 -    /* Window frame icon */
   3.160 -    public final static Image FrameIcon;
   3.161 -    private RemoveTimeDuplication removeTimeDuplicationAction = new RemoveTimeDuplication(this);
   3.162 -    private RemoveBottomTopLineDuplication removeBottomTopLineDuplicationAction = new RemoveBottomTopLineDuplication(this);
   3.163 -    private RemoveTopLineDuplication removeTopLineDuplicationAction = new RemoveTopLineDuplication(this);
   3.164 -    private MergeRecords mergeRecords = new MergeRecords(this);
   3.165 -    private AppendFromFile appendFromFile = new AppendFromFile(this);
   3.166 -    private SplitRecord splitRecord = new SplitRecord();
   3.167 -    private ImportComponent importComponent = new ImportComponent(this);
   3.168 -    private MoveRecord moveRecord = new MoveRecord(this);
   3.169 -    private MoveText moveText = new MoveText(this);
   3.170 -    private InsertBlankLine insertBlankLine = new InsertBlankLine(this);
   3.171 -    private BalanceText balanceText = new BalanceText(this);
   3.172 -    private ViewHeader viewHeader = new ViewHeader(this);
   3.173 -    private OCRAction ocrAction = new OCRAction(this);
   3.174 -    private SplitSONSubtitleAction splitSONSubtitleAction = new SplitSONSubtitleAction(this);
   3.175 -    private PackingImagesToTiffAction packingImagesToTiffAction = new PackingImagesToTiffAction(this);
   3.176 -    private PackingImageFilesToTiffAction packingImageFilesToTiffAction = new PackingImageFilesToTiffAction(this);
   3.177 -    private EditTextCaseTranspose caseTransposeAction = new EditTextCaseTranspose(this);
   3.178 -
   3.179 +    private boolean column_change;
   3.180 +    private JActionMap actionMap = null;
   3.181 +    
   3.182      static {
   3.183          windows = new JublerList();
   3.184          copybuffer = new ArrayList<SubEntry>();
   3.185 @@ -219,16 +150,38 @@
   3.186          FrameIcon = new ImageIcon(Jubler.class.getResource("/icons/frame.png")).getImage();
   3.187      }
   3.188  
   3.189 -    /** Creates new form JubEdit */
   3.190 +    public JublerFunction fn  = null;
   3.191 +    
   3.192 +    /** Creates new this JubEdit */
   3.193      public Jubler() {
   3.194 +        initComponents();
   3.195 +        fn  = new JublerFunction(this);
   3.196 +        initApp();
   3.197 +    }
   3.198 +
   3.199 +    public void initApp(){
   3.200          subs = null;
   3.201          mfile = new MediaFile();
   3.202          connected_consoles = new Vector<JVideoConsole>();
   3.203  
   3.204          undo = new UndoList(this);
   3.205 +        /* Initialize Tools */
   3.206 +        shift = new JShiftTime();
   3.207 +        spell = new JSpeller();
   3.208 +        round = new JRounder();
   3.209 +        fix = new JFixer();
   3.210 +        repg = new JReplaceGlobal();
   3.211 +        dels = new JDelSelection();
   3.212 +        mark = new JMarker();
   3.213 +        recode = new JRecodeTime();
   3.214 +        split = new JSubSplit();
   3.215 +        translate = new JTranslate();
   3.216  
   3.217 -
   3.218 -        initComponents();
   3.219 +        /* Set JFileChooser properties */
   3.220 +        filedialog = new JFileChooser();
   3.221 +        filedialog.setMultiSelectionEnabled(false);
   3.222 +        filedialog.addChoosableFileFilter(new SubFileFilter());
   3.223 +        FileCommunicator.getDefaultDialogPath(filedialog);
   3.224  
   3.225          setIconImage(FrameIcon);
   3.226          preview = new JSubPreview(this);
   3.227 @@ -236,48 +189,13 @@
   3.228          subeditor = new JSubEditor(this);
   3.229          subeditor.setAttached(true);
   3.230  
   3.231 -        ImportComponentFM.addActionListener(importComponent);
   3.232 -        AppendFromFileFM.addActionListener(appendFromFile);
   3.233 -
   3.234 -        RemoveTimeDuplication.addActionListener(removeTimeDuplicationAction);
   3.235 -        RemoveBottomTopLineDuplication.addActionListener(removeBottomTopLineDuplicationAction);
   3.236 -        RemoveTimeDuplication.addActionListener(removeTopLineDuplicationAction);
   3.237 -
   3.238 -        JoinRecordTM.addActionListener(mergeRecords);
   3.239 -        SplitRecordTM.addActionListener(splitRecord);
   3.240 -        ViewHeaderTM.addActionListener(viewHeader);
   3.241 -
   3.242 -        ocrAction.setLanguage("eng");
   3.243 -        String working_dir = FileCommunicator.getCurrentPath();
   3.244 -        File tesseract_path = new File(working_dir, "tesseract");
   3.245 -        String tesseract_path_as_string = tesseract_path.getAbsolutePath();
   3.246 -
   3.247 -        ocrAction.setTessPath(tesseract_path_as_string + FILE_SEP);
   3.248 -
   3.249 -        SplitSONSubtitleFile.addActionListener(splitSONSubtitleAction);
   3.250 -        PackingImagesToTiffM.addActionListener(packingImagesToTiffAction);
   3.251 -        PackingImageFilesToTiffFM.addActionListener(packingImageFilesToTiffAction);
   3.252 -
   3.253 -        CaseTranspose.addActionListener(caseTransposeAction);
   3.254 -        /**
   3.255 -         * This is to make sure that the combo-box index matches the currently
   3.256 -         * selected options, especially when new instance is created.
   3.257 -         */
   3.258 -        int sel_index = DropDownFunctionList.getFunctionIndex(fnOption);
   3.259 -        DropDownActionList.setSelectedIndex(sel_index);
   3.260 -
   3.261 +        //this must be run after all control's initialisation has been done.        
   3.262          SubSplitPane.add(preview, JSplitPane.TOP);
   3.263 -        enablePreview(false);
   3.264 -
   3.265 -        /* Set JFileChooser properties */
   3.266 -        filedialog = new JFileChooser();
   3.267 -        filedialog.setMultiSelectionEnabled(false);
   3.268 -        filedialog.addChoosableFileFilter(new SubFileFilter());
   3.269 -        FileCommunicator.getDefaultDialogPath(filedialog);
   3.270 +        fn.enablePreview(false);
   3.271  
   3.272          WebFM.setVisible(false);
   3.273 -        setDropHandler();
   3.274 -        hideSystemMenus();
   3.275 +        fn.setDropHandler();
   3.276 +        fn.hideSystemMenus();
   3.277  
   3.278          /* If this is the first Jubler instance, initialize preferences */
   3.279          /* We have to do this AFTER we process the menu items (since some would be missing */
   3.280 @@ -286,148 +204,26 @@
   3.281          }
   3.282          StaticJubler.updateMenus(this);
   3.283          ShortcutsModel.updateMenuNames(JublerMenuBar);
   3.284 -
   3.285 -        /* Initialize Tools */
   3.286 -        shift = new JShiftTime();
   3.287 -        styler = new JStyler();  //
   3.288 -
   3.289 -        spell = new JSpeller();
   3.290 -        round = new JRounder();
   3.291 -        fix = new JFixer();
   3.292 -        repg = new JReplaceGlobal();
   3.293 -        dels = new JDelSelection();
   3.294 -        mark = new JMarker();
   3.295 -        recode = new JRecodeTime();
   3.296 -        sync = new JSynchronize();
   3.297 -        split = new JSubSplit();
   3.298 -        translate = new JTranslate();
   3.299 -
   3.300          StaticJubler.putWindowPosition(this);
   3.301 -        openWindow();
   3.302 -        updateRecentFile(null);
   3.303 -
   3.304 +        fn.openWindow();
   3.305 +        fn.updateRecentFile(null);
   3.306 +        actionMap = new JActionMap(this);
   3.307 +        /**
   3.308 +         * This is to make sure that the combo-box index matches the currently
   3.309 +         * selected options, especially when new instance is created.
   3.310 +         */
   3.311 +        int sel_index = DropDownFunctionList.getFunctionIndex(this.getFnOption());
   3.312 +        DropDownActionList.setSelectedIndex(sel_index);
   3.313 +        addWindowListener(new WindowEventHandler(this));
   3.314      }
   3.315 -
   3.316 +    
   3.317      public Jubler(Subtitles data) {
   3.318          this();
   3.319 -        setSubs(data);
   3.320 -    }
   3.321 -
   3.322 -    /* This method is called EVERY time an undo option is added.
   3.323 -     * It is used in order to inform the system that a new undo command is added.
   3.324 -     *
   3.325 -     * The only useful approach up to now is to reset the last_changed_sub pointer.
   3.326 -     * This has the effect of keeping up to date this pointer even if something happens
   3.327 -     * while changing a single subentry.
   3.328 -     */
   3.329 -    public void resetUndoMark() {
   3.330 -        last_changed_sub = null;
   3.331 -    }
   3.332 -
   3.333 -    public void keepUndo(SubEntry newsub) {
   3.334 -        if (newsub == last_changed_sub) {
   3.335 -            return;
   3.336 -        }
   3.337 -        undo.addUndo(new UndoEntry(subs, _("Change subtitle")));
   3.338 -        /* The next command sould be last in order to be synchronized with resetUndoMark */
   3.339 -        last_changed_sub = newsub;
   3.340 -    }
   3.341 -
   3.342 -    public void setPreviewOrientation(boolean horizontal) {
   3.343 -        if (horizontal) {
   3.344 -            SubSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
   3.345 -        } else {
   3.346 -            SubSplitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
   3.347 -        }
   3.348 -    }
   3.349 -
   3.350 -    public void resetPreviewPanels() {
   3.351 -        SubSplitPane.resetToPreferredSizes();
   3.352 -    }
   3.353 -
   3.354 -    public void subTextChanged() {
   3.355 -        if (subeditor.shouldIgnoreSubChanges()) {
   3.356 -            return;
   3.357 -        }
   3.358 -
   3.359 -        int row = SubTable.getSelectedRow();
   3.360 -        if (row < 0) {
   3.361 -            return;
   3.362 -        }
   3.363 -        SubEntry entry = subs.elementAt(row);
   3.364 -        keepUndo(entry);
   3.365 -        String subtext = subeditor.getSubText();
   3.366 -        entry.setText(subtext);
   3.367 -        updateStatsLabel(entry);
   3.368 -        rowHasChanged(row, false);
   3.369 -    }
   3.370 -
   3.371 -    private void updateStatsLabel(SubEntry entry) {
   3.372 -        /* Update information label */
   3.373 -        SubMetrics m = entry.getMetrics();
   3.374 -        StringBuffer lbl = new StringBuffer();
   3.375 -        lbl.append("T:").append(m.length);
   3.376 -        lbl.append(" L:").append(m.lines);
   3.377 -        lbl.append(" C:").append(m.maxlength);
   3.378 -        Stats.setText(lbl.toString());
   3.379 -
   3.380 -        if (entry.updateMaxCharStatus(subs.getAttribs(), m.maxlength)) {
   3.381 -            Stats.setForeground(Color.RED);
   3.382 -        } else {
   3.383 -            Stats.setForeground(SystemColor.controlText);
   3.384 -        }
   3.385 -    }
   3.386 -
   3.387 -    public int addSubEntry(SubEntry entry) {
   3.388 -        int where;
   3.389 -
   3.390 -        undo.addUndo(new UndoEntry(subs, _("Insert subtitle")));
   3.391 -        SubEntry[] selected = getSelectedSubs();
   3.392 -        where = subs.addSorted(entry);
   3.393 -        tableHasChanged(selected);
   3.394 -        return where;
   3.395 -    }
   3.396 -
   3.397 -    private void initNewFile(String fname) {
   3.398 -        undo.invalidateSaveMark();
   3.399 -        setFile(new File(fname), true);
   3.400 -        SaveFM.setEnabled(false);
   3.401 -        RevertFM.setEnabled(false);
   3.402 -        subeditor.focusOnText();
   3.403 -    }
   3.404 -
   3.405 -    private void setDropHandler() {
   3.406 -        Dropper r = new Dropper(this);
   3.407 -        BasicPanel.setTransferHandler(r);
   3.408 -        JublerTools.setTransferHandler(r);
   3.409 -        SubTable.setTransferHandler(r);
   3.410 -        SubTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
   3.411 -        SubTable.setDropMode(DropMode.INSERT_ROWS);
   3.412 -        SubTable.setDragEnabled(true);
   3.413 -        //SubTable.setDropTarget(new DropTarget(SubTable, r));
   3.414 -    }
   3.415 -
   3.416 -    private void updateRecentFile(File recent) {
   3.417 -        if (subs != null) {
   3.418 -            subs.setLastOpenedFile(recent);
   3.419 -        }
   3.420 -        FileCommunicator.updateRecentsList(recent);
   3.421 -        FileCommunicator.updateRecentsMenu();
   3.422 -    }
   3.423 -
   3.424 -    /* This method is called when an item in the recent menu is clicked */
   3.425 -    public void recentMenuCallback(String filename) {
   3.426 -        if (filename == null) {
   3.427 -            Jubler jub = new Jubler(new Subtitles(subs));
   3.428 -            jub.initNewFile(subs.getCurrentFile().getPath() + _("_clone"));
   3.429 -            /* The user wants to clone current file */
   3.430 -        } else {
   3.431 -            loadFileFromHere(new File(filename), false);
   3.432 -        }
   3.433 +        fn.setSubs(data);
   3.434      }
   3.435  
   3.436      /** This method is called from within the constructor to
   3.437 -     * initialize the form.
   3.438 +     * initialize the this.
   3.439       * WARNING: Do NOT modify this code. The content of this method is
   3.440       * always regenerated by the Form Editor.
   3.441       */
   3.442 @@ -608,40 +404,30 @@
   3.443          FAQHM = new javax.swing.JMenuItem();
   3.444          AboutHM = new javax.swing.JMenuItem();
   3.445  
   3.446 -        FormListener formListener = new FormListener();
   3.447 -
   3.448          CutP.setText(_("Cut"));
   3.449 -        CutP.addActionListener(formListener);
   3.450          SubsPop.add(CutP);
   3.451  
   3.452          CopyP.setText(_("Copy"));
   3.453 -        CopyP.addActionListener(formListener);
   3.454          SubsPop.add(CopyP);
   3.455  
   3.456          PasteP.setText(_("Paste"));
   3.457 -        PasteP.addActionListener(formListener);
   3.458          SubsPop.add(PasteP);
   3.459  
   3.460          DeleteP.setText(_("Delete"));
   3.461 -        DeleteP.addActionListener(formListener);
   3.462          SubsPop.add(DeleteP);
   3.463  
   3.464          MarkP.setText(_("Mark"));
   3.465  
   3.466          NoneMP.setText(_("None"));
   3.467 -        NoneMP.addActionListener(formListener);
   3.468          MarkP.add(NoneMP);
   3.469  
   3.470          PinkMP.setText(_("Pink"));
   3.471 -        PinkMP.addActionListener(formListener);
   3.472          MarkP.add(PinkMP);
   3.473  
   3.474          YellowMP.setText(_("Yellow"));
   3.475 -        YellowMP.addActionListener(formListener);
   3.476          MarkP.add(YellowMP);
   3.477  
   3.478          CyanMP.setText(_("Cyan"));
   3.479 -        CyanMP.addActionListener(formListener);
   3.480          MarkP.add(CyanMP);
   3.481  
   3.482          SubsPop.add(MarkP);
   3.483 @@ -654,45 +440,37 @@
   3.484  
   3.485          ShowNumberP.setText(_("Index"));
   3.486          ShowNumberP.setActionCommand("0");
   3.487 -        ShowNumberP.addActionListener(formListener);
   3.488          ShowColP.add(ShowNumberP);
   3.489  
   3.490          ShowStartP.setText(_("Start"));
   3.491          ShowStartP.setActionCommand("1");
   3.492 -        ShowStartP.addActionListener(formListener);
   3.493          ShowColP.add(ShowStartP);
   3.494  
   3.495          ShowEndP.setText(_("End"));
   3.496          ShowEndP.setActionCommand("2");
   3.497 -        ShowEndP.addActionListener(formListener);
   3.498          ShowColP.add(ShowEndP);
   3.499  
   3.500          ShowDurationP.setText(_("Duration"));
   3.501          ShowDurationP.setActionCommand("3");
   3.502 -        ShowDurationP.addActionListener(formListener);
   3.503          ShowColP.add(ShowDurationP);
   3.504  
   3.505          ShowLayerP.setText(_("Layer"));
   3.506          ShowLayerP.setActionCommand("4");
   3.507 -        ShowLayerP.addActionListener(formListener);
   3.508          ShowColP.add(ShowLayerP);
   3.509  
   3.510          ShowStyleP.setText(_("Style"));
   3.511          ShowStyleP.setActionCommand("5");
   3.512 -        ShowStyleP.addActionListener(formListener);
   3.513          ShowColP.add(ShowStyleP);
   3.514  
   3.515          SubsPop.add(ShowColP);
   3.516          SubsPop.add(jSeparator11);
   3.517  
   3.518          PlayVideoP.setText(_("Test video"));
   3.519 -        PlayVideoP.addActionListener(formListener);
   3.520          SubsPop.add(PlayVideoP);
   3.521  
   3.522          setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
   3.523          setTitle("Jubler");
   3.524          setForeground(java.awt.Color.white);
   3.525 -        addWindowListener(formListener);
   3.526  
   3.527          BasicPanel.setLayout(new java.awt.BorderLayout());
   3.528  
   3.529 @@ -721,8 +499,8 @@
   3.530  
   3.531          SubsScrollPane.setPreferredSize(new java.awt.Dimension(600, 450));
   3.532  
   3.533 +        SubTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
   3.534          SubTable.setComponentPopupMenu(SubsPop);
   3.535 -        SubTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
   3.536          SubTable.setDefaultRenderer(Object.class, TableRenderer);
   3.537          SubTable.getTableHeader().addMouseListener(new MouseAdapter(){
   3.538              public void mousePressed(MouseEvent e) {
   3.539 @@ -738,7 +516,7 @@
   3.540                  if (e.getValueIsAdjusting()) return; //Ignore extra messages
   3.541                  ListSelectionModel lsm = (ListSelectionModel)e.getSource();
   3.542                  if (!lsm.isSelectionEmpty()) {
   3.543 -                    displaySubData();
   3.544 +                    fn.displaySubData();
   3.545                  }
   3.546              }
   3.547          });
   3.548 @@ -754,24 +532,20 @@
   3.549  
   3.550          NewTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/new.png"))); // NOI18N
   3.551          NewTB.setToolTipText(_("New"));
   3.552 -        NewTB.addActionListener(formListener);
   3.553          FileTP.add(NewTB);
   3.554  
   3.555          LoadTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/load.png"))); // NOI18N
   3.556          LoadTB.setToolTipText(_("Load"));
   3.557 -        LoadTB.addActionListener(formListener);
   3.558          FileTP.add(LoadTB);
   3.559  
   3.560          SaveTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/save.png"))); // NOI18N
   3.561          SaveTB.setToolTipText(_("Save"));
   3.562          SaveTB.setEnabled(false);
   3.563 -        SaveTB.addActionListener(formListener);
   3.564          FileTP.add(SaveTB);
   3.565  
   3.566          InfoTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/info.png"))); // NOI18N
   3.567          InfoTB.setToolTipText(_("Project Information"));
   3.568          InfoTB.setEnabled(false);
   3.569 -        InfoTB.addActionListener(formListener);
   3.570          FileTP.add(InfoTB);
   3.571  
   3.572          JublerTools.add(FileTP);
   3.573 @@ -785,19 +559,16 @@
   3.574          CutTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/cut.png"))); // NOI18N
   3.575          CutTB.setToolTipText(_("Cut"));
   3.576          CutTB.setEnabled(false);
   3.577 -        CutTB.addActionListener(formListener);
   3.578          EditTP.add(CutTB);
   3.579  
   3.580          CopyTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/copy.png"))); // NOI18N
   3.581          CopyTB.setToolTipText(_("Copy"));
   3.582          CopyTB.setEnabled(false);
   3.583 -        CopyTB.addActionListener(formListener);
   3.584          EditTP.add(CopyTB);
   3.585  
   3.586          PasteTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/paste.png"))); // NOI18N
   3.587          PasteTB.setToolTipText(_("Paste"));
   3.588          PasteTB.setEnabled(false);
   3.589 -        PasteTB.addActionListener(formListener);
   3.590          EditTP.add(PasteTB);
   3.591  
   3.592          JublerTools.add(EditTP);
   3.593 @@ -808,13 +579,11 @@
   3.594          UndoTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/undo.png"))); // NOI18N
   3.595          UndoTB.setToolTipText(_("Undo"));
   3.596          UndoTB.setEnabled(false);
   3.597 -        UndoTB.addActionListener(formListener);
   3.598          UndoTP.add(UndoTB);
   3.599  
   3.600          RedoTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/redo.png"))); // NOI18N
   3.601          RedoTB.setToolTipText(_("Redo"));
   3.602          RedoTB.setEnabled(false);
   3.603 -        RedoTB.addActionListener(formListener);
   3.604          UndoTP.add(RedoTB);
   3.605  
   3.606          JublerTools.add(UndoTP);
   3.607 @@ -833,7 +602,6 @@
   3.608          SortTB.setFocusable(false);
   3.609          SortTB.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
   3.610          SortTB.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
   3.611 -        SortTB.addActionListener(formListener);
   3.612          SortTP.add(SortTB);
   3.613  
   3.614          JublerTools.add(SortTP);
   3.615 @@ -844,7 +612,6 @@
   3.616          TestTB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/test.png"))); // NOI18N
   3.617          TestTB.setToolTipText(_("Test subtitles from current position"));
   3.618          TestTB.setEnabled(false);
   3.619 -        TestTB.addActionListener(formListener);
   3.620          TestTP.add(TestTB);
   3.621  
   3.622          PreviewTB.setModel(new ToggleButtonModel());
   3.623 @@ -852,7 +619,6 @@
   3.624          PreviewTB.setToolTipText(_("Enable preview"));
   3.625          PreviewTB.setEnabled(false);
   3.626          PreviewTB.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/preview.png"))); // NOI18N
   3.627 -        PreviewTB.addActionListener(formListener);
   3.628          TestTP.add(PreviewTB);
   3.629  
   3.630          JublerTools.add(TestTP);
   3.631 @@ -869,7 +635,6 @@
   3.632          DropDownActionList.setEnabled(false);
   3.633          DropDownActionList.setMaximumSize(new java.awt.Dimension(100, 22));
   3.634          DropDownActionList.setPreferredSize(new java.awt.Dimension(150, 22));
   3.635 -        DropDownActionList.addActionListener(formListener);
   3.636          gridBagConstraints = new java.awt.GridBagConstraints();
   3.637          gridBagConstraints.gridx = 0;
   3.638          gridBagConstraints.gridy = 0;
   3.639 @@ -883,7 +648,6 @@
   3.640          DropDownActionNumberOfLine.setEnabled(false);
   3.641          DropDownActionNumberOfLine.setMaximumSize(new java.awt.Dimension(50, 22));
   3.642          DropDownActionNumberOfLine.setPreferredSize(new java.awt.Dimension(50, 22));
   3.643 -        DropDownActionNumberOfLine.addActionListener(formListener);
   3.644          gridBagConstraints = new java.awt.GridBagConstraints();
   3.645          gridBagConstraints.gridx = 1;
   3.646          gridBagConstraints.gridy = 0;
   3.647 @@ -899,7 +663,6 @@
   3.648          DoItTB.setMaximumSize(new java.awt.Dimension(60, 32));
   3.649          DoItTB.setMinimumSize(new java.awt.Dimension(40, 32));
   3.650          DoItTB.setPreferredSize(new java.awt.Dimension(57, 32));
   3.651 -        DoItTB.addActionListener(formListener);
   3.652          gridBagConstraints = new java.awt.GridBagConstraints();
   3.653          gridBagConstraints.gridx = 2;
   3.654          gridBagConstraints.gridy = 0;
   3.655 @@ -921,13 +684,11 @@
   3.656          FileNFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
   3.657          FileNFM.setText(_("File"));
   3.658          FileNFM.setName("FNF"); // NOI18N
   3.659 -        FileNFM.addActionListener(formListener);
   3.660          NewFM.add(FileNFM);
   3.661  
   3.662          ChildNFM.setText(_("Child"));
   3.663          ChildNFM.setEnabled(false);
   3.664          ChildNFM.setName("FNC"); // NOI18N
   3.665 -        ChildNFM.addActionListener(formListener);
   3.666          NewFM.add(ChildNFM);
   3.667  
   3.668          FileM.add(NewFM);
   3.669 @@ -935,7 +696,6 @@
   3.670          OpenFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
   3.671          OpenFM.setText(_("Open"));
   3.672          OpenFM.setName("FOP"); // NOI18N
   3.673 -        OpenFM.addActionListener(formListener);
   3.674          FileM.add(OpenFM);
   3.675  
   3.676          WebFM.setText(_("Web"));
   3.677 @@ -943,7 +703,6 @@
   3.678          RetrieveWFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
   3.679          RetrieveWFM.setText(_("Retrieve"));
   3.680          RetrieveWFM.setName("RFW"); // NOI18N
   3.681 -        RetrieveWFM.addActionListener(formListener);
   3.682          WebFM.add(RetrieveWFM);
   3.683  
   3.684          FileM.add(WebFM);
   3.685 @@ -951,7 +710,6 @@
   3.686          RevertFM.setText(_("Revert"));
   3.687          RevertFM.setEnabled(false);
   3.688          RevertFM.setName("FRE"); // NOI18N
   3.689 -        RevertFM.addActionListener(formListener);
   3.690          FileM.add(RevertFM);
   3.691  
   3.692          RecentsFM.setText(_("Recent files"));
   3.693 @@ -961,19 +719,16 @@
   3.694          SaveFM.setText(_("Save"));
   3.695          SaveFM.setEnabled(false);
   3.696          SaveFM.setName("FSV"); // NOI18N
   3.697 -        SaveFM.addActionListener(formListener);
   3.698          FileM.add(SaveFM);
   3.699  
   3.700          SaveAsFM.setText(_("Save as ..."));
   3.701          SaveAsFM.setEnabled(false);
   3.702          SaveAsFM.setName("FSA"); // NOI18N
   3.703 -        SaveAsFM.addActionListener(formListener);
   3.704          FileM.add(SaveAsFM);
   3.705  
   3.706          CloseFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK));
   3.707          CloseFM.setText(_("Close"));
   3.708          CloseFM.setName("FCL"); // NOI18N
   3.709 -        CloseFM.addActionListener(formListener);
   3.710          FileM.add(CloseFM);
   3.711          FileM.add(jSeparator7);
   3.712  
   3.713 @@ -981,13 +736,11 @@
   3.714          InfoFM.setText(_("Information"));
   3.715          InfoFM.setEnabled(false);
   3.716          InfoFM.setName("FIN"); // NOI18N
   3.717 -        InfoFM.addActionListener(formListener);
   3.718          FileM.add(InfoFM);
   3.719  
   3.720          PrefsFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_COMMA, java.awt.event.InputEvent.CTRL_MASK));
   3.721          PrefsFM.setText(_("Preferences"));
   3.722          PrefsFM.setName("FPR"); // NOI18N
   3.723 -        PrefsFM.addActionListener(formListener);
   3.724          FileM.add(PrefsFM);
   3.725          FileM.add(jSeparator20);
   3.726  
   3.727 @@ -1013,7 +766,6 @@
   3.728          QuitFM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
   3.729          QuitFM.setText(_("Quit"));
   3.730          QuitFM.setName("FQU"); // NOI18N
   3.731 -        QuitFM.addActionListener(formListener);
   3.732          FileM.add(QuitFM);
   3.733  
   3.734          JublerMenuBar.add(FileM);
   3.735 @@ -1023,22 +775,18 @@
   3.736  
   3.737          CutEM.setText(_("Cut subtitles"));
   3.738          CutEM.setName("ECU"); // NOI18N
   3.739 -        CutEM.addActionListener(formListener);
   3.740          EditM.add(CutEM);
   3.741  
   3.742          CopyEM.setText(_("Copy subtitles"));
   3.743          CopyEM.setName("ECO"); // NOI18N
   3.744 -        CopyEM.addActionListener(formListener);
   3.745          EditM.add(CopyEM);
   3.746  
   3.747          PasteEM.setText(_("Paste subtitles"));
   3.748          PasteEM.setName("EPA"); // NOI18N
   3.749 -        PasteEM.addActionListener(formListener);
   3.750          EditM.add(PasteEM);
   3.751  
   3.752          PasteSpecialEM.setText(_("Paste special"));
   3.753          PasteSpecialEM.setName("EPS"); // NOI18N
   3.754 -        PasteSpecialEM.addActionListener(formListener);
   3.755          EditM.add(PasteSpecialEM);
   3.756          EditM.add(jSeparator9);
   3.757  
   3.758 @@ -1046,12 +794,10 @@
   3.759  
   3.760          bySelectionDEM.setText(_("By Selection"));
   3.761          bySelectionDEM.setName("EDS"); // NOI18N
   3.762 -        bySelectionDEM.addActionListener(formListener);
   3.763          DeleteEM.add(bySelectionDEM);
   3.764  
   3.765          EmptyLinesDEM.setText(_("Empty Lines"));
   3.766          EmptyLinesDEM.setName("EDE"); // NOI18N
   3.767 -        EmptyLinesDEM.addActionListener(formListener);
   3.768          DeleteEM.add(EmptyLinesDEM);
   3.769  
   3.770          EditM.add(DeleteEM);
   3.771 @@ -1061,13 +807,11 @@
   3.772          StepwiseREM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
   3.773          StepwiseREM.setText(_("Find & replace"));
   3.774          StepwiseREM.setName("ERS"); // NOI18N
   3.775 -        StepwiseREM.addActionListener(formListener);
   3.776          ReplaceEM.add(StepwiseREM);
   3.777  
   3.778          GloballyREM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK));
   3.779          GloballyREM.setText(_("Globally"));
   3.780          GloballyREM.setName("ERG"); // NOI18N
   3.781 -        GloballyREM.addActionListener(formListener);
   3.782          ReplaceEM.add(GloballyREM);
   3.783  
   3.784          EditM.add(ReplaceEM);
   3.785 @@ -1078,14 +822,12 @@
   3.786          BeforeIEM.setText(_("Before"));
   3.787          BeforeIEM.setActionCommand("b");
   3.788          BeforeIEM.setName("EIB"); // NOI18N
   3.789 -        BeforeIEM.addActionListener(formListener);
   3.790          InsertEM.add(BeforeIEM);
   3.791  
   3.792          AfterIEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, java.awt.event.InputEvent.CTRL_MASK));
   3.793          AfterIEM.setText(_("After"));
   3.794          AfterIEM.setActionCommand("a");
   3.795          AfterIEM.setName("EIA"); // NOI18N
   3.796 -        AfterIEM.addActionListener(formListener);
   3.797          InsertEM.add(AfterIEM);
   3.798  
   3.799          EditM.add(InsertEM);
   3.800 @@ -1096,54 +838,46 @@
   3.801          PreviousGEM.setText(_("Previous entry"));
   3.802          PreviousGEM.setActionCommand("p");
   3.803          PreviousGEM.setName("EGP"); // NOI18N
   3.804 -        PreviousGEM.addActionListener(formListener);
   3.805          GoEM.add(PreviousGEM);
   3.806  
   3.807          NextGEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DOWN, java.awt.event.InputEvent.CTRL_MASK));
   3.808          NextGEM.setText(_("Next entry"));
   3.809          NextGEM.setActionCommand("n");
   3.810          NextGEM.setName("EGN"); // NOI18N
   3.811 -        NextGEM.addActionListener(formListener);
   3.812          GoEM.add(NextGEM);
   3.813  
   3.814          PreviousPageGEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP, java.awt.event.InputEvent.CTRL_MASK));
   3.815          PreviousPageGEM.setText(_("Previous page"));
   3.816          PreviousPageGEM.setActionCommand("u");
   3.817          PreviousPageGEM.setName("EGU"); // NOI18N
   3.818 -        PreviousPageGEM.addActionListener(formListener);
   3.819          GoEM.add(PreviousPageGEM);
   3.820  
   3.821          NextPageGEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN, java.awt.event.InputEvent.CTRL_MASK));
   3.822          NextPageGEM.setText(_("Next page"));
   3.823          NextPageGEM.setActionCommand("d");
   3.824          NextPageGEM.setName("EGD"); // NOI18N
   3.825 -        NextPageGEM.addActionListener(formListener);
   3.826          GoEM.add(NextPageGEM);
   3.827  
   3.828          TopGEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_OPEN_BRACKET, java.awt.event.InputEvent.CTRL_MASK));
   3.829          TopGEM.setText(_("First entry"));
   3.830          TopGEM.setActionCommand("t");
   3.831          TopGEM.setName("EGT"); // NOI18N
   3.832 -        TopGEM.addActionListener(formListener);
   3.833          GoEM.add(TopGEM);
   3.834  
   3.835          BottomGEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_CLOSE_BRACKET, java.awt.event.InputEvent.CTRL_MASK));
   3.836          BottomGEM.setText(_("Last entry"));
   3.837          BottomGEM.setActionCommand("b");
   3.838          BottomGEM.setName("EGB"); // NOI18N
   3.839 -        BottomGEM.addActionListener(formListener);
   3.840          GoEM.add(BottomGEM);
   3.841          GoEM.add(jSeparator2);
   3.842  
   3.843          byTimeGEM.setText(_("Selection by time"));
   3.844          byTimeGEM.setName("EGM"); // NOI18N
   3.845 -        byTimeGEM.addActionListener(formListener);
   3.846          GoEM.add(byTimeGEM);
   3.847  
   3.848          byLineNumberEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
   3.849          byLineNumberEM.setText(_("Line number"));
   3.850          byLineNumberEM.setName("EGL"); // NOI18N
   3.851 -        byLineNumberEM.addActionListener(formListener);
   3.852          GoEM.add(byLineNumberEM);
   3.853  
   3.854          EditM.add(GoEM);
   3.855 @@ -1153,28 +887,23 @@
   3.856  
   3.857          NoneMEM.setText(_("None"));
   3.858          NoneMEM.setName("EMN"); // NOI18N
   3.859 -        NoneMEM.addActionListener(formListener);
   3.860          MarkEM.add(NoneMEM);
   3.861  
   3.862          PinkMEM.setText(_("Pink"));
   3.863          PinkMEM.setName("EMP"); // NOI18N
   3.864 -        PinkMEM.addActionListener(formListener);
   3.865          MarkEM.add(PinkMEM);
   3.866  
   3.867          YellowMEM.setText(_("Yellow"));
   3.868          YellowMEM.setName("EMY"); // NOI18N
   3.869 -        YellowMEM.addActionListener(formListener);
   3.870          MarkEM.add(YellowMEM);
   3.871  
   3.872          CyanMEM.setText(_("Cyan"));
   3.873          CyanMEM.setName("EMC"); // NOI18N
   3.874 -        CyanMEM.addActionListener(formListener);
   3.875          MarkEM.add(CyanMEM);
   3.876          MarkEM.add(MarkSep);
   3.877  
   3.878          bySelectionMEM.setText(_("By Selection"));
   3.879          bySelectionMEM.setName("EMS"); // NOI18N
   3.880 -        bySelectionMEM.addActionListener(formListener);
   3.881          MarkEM.add(bySelectionMEM);
   3.882  
   3.883          EditM.add(MarkEM);
   3.884 @@ -1184,7 +913,6 @@
   3.885  
   3.886          bySelectionSEM.setText(_("By Selection"));
   3.887          bySelectionSEM.setName("ESS"); // NOI18N
   3.888 -        bySelectionSEM.addActionListener(formListener);
   3.889          StyleEM.add(bySelectionSEM);
   3.890  
   3.891          EditM.add(StyleEM);
   3.892 @@ -1194,14 +922,12 @@
   3.893          UndoEM.setText(_("Undo"));
   3.894          UndoEM.setEnabled(false);
   3.895          UndoEM.setName("EUN"); // NOI18N
   3.896 -        UndoEM.addActionListener(formListener);
   3.897          EditM.add(UndoEM);
   3.898  
   3.899          RedoEM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));
   3.900          RedoEM.setText(_("Redo"));
   3.901          RedoEM.setEnabled(false);
   3.902          RedoEM.setName("ERE"); // NOI18N
   3.903 -        RedoEM.addActionListener(formListener);
   3.904          EditM.add(RedoEM);
   3.905  
   3.906          JublerMenuBar.add(EditM);
   3.907 @@ -1215,57 +941,47 @@
   3.908  
   3.909          SplitTM.setText(_("Split file"));
   3.910          SplitTM.setName("TSP"); // NOI18N
   3.911 -        SplitTM.addActionListener(formListener);
   3.912          ToolsM.add(SplitTM);
   3.913  
   3.914          JoinTM.setText(_("Join files"));
   3.915          JoinTM.setEnabled(false);
   3.916          JoinTM.setName("TJO"); // NOI18N
   3.917 -        JoinTM.addActionListener(formListener);
   3.918          ToolsM.add(JoinTM);
   3.919  
   3.920          ReparentTM.setText(_("Reparent"));
   3.921          ReparentTM.setEnabled(false);
   3.922          ReparentTM.setName("TPA"); // NOI18N
   3.923 -        ReparentTM.addActionListener(formListener);
   3.924          ToolsM.add(ReparentTM);
   3.925  
   3.926          SynchronizeTM.setText(_("Synchronize"));
   3.927          SynchronizeTM.setName("TSY"); // NOI18N
   3.928 -        SynchronizeTM.addActionListener(formListener);
   3.929          ToolsM.add(SynchronizeTM);
   3.930          ToolsM.add(jSeparator8);
   3.931  
   3.932          ShiftTimeTM.setText(_("Shift time"));
   3.933          ShiftTimeTM.setName("TSH"); // NOI18N
   3.934 -        ShiftTimeTM.addActionListener(formListener);
   3.935          ToolsM.add(ShiftTimeTM);
   3.936  
   3.937          RecodeTM.setText(_("Recode"));
   3.938          RecodeTM.setName("TCO"); // NOI18N
   3.939 -        RecodeTM.addActionListener(formListener);
   3.940          ToolsM.add(RecodeTM);
   3.941  
   3.942          FixTM.setText(_("Time fix"));
   3.943          FixTM.setName("TFI"); // NOI18N
   3.944 -        FixTM.addActionListener(formListener);
   3.945          ToolsM.add(FixTM);
   3.946  
   3.947          RoundTM.setText(_("Round times"));
   3.948          RoundTM.setName("TRO"); // NOI18N
   3.949 -        RoundTM.addActionListener(formListener);
   3.950          ToolsM.add(RoundTM);
   3.951          ToolsM.add(jSeparator5);
   3.952  
   3.953          SpellTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
   3.954          SpellTM.setText(_("Spell check"));
   3.955          SpellTM.setName("TLL"); // NOI18N
   3.956 -        SpellTM.addActionListener(formListener);
   3.957          ToolsM.add(SpellTM);
   3.958  
   3.959          TranslateTM.setText(_("Translate"));
   3.960          TranslateTM.setName("TTM"); // NOI18N
   3.961 -        TranslateTM.addActionListener(formListener);
   3.962          ToolsM.add(TranslateTM);
   3.963          ToolsM.add(jSeparator3);
   3.964  
   3.965 @@ -1274,13 +990,11 @@
   3.966          BeginningTTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
   3.967          BeginningTTM.setText(_("From the beginning"));
   3.968          BeginningTTM.setName("TTB"); // NOI18N
   3.969 -        BeginningTTM.addActionListener(formListener);
   3.970          TestTM.add(BeginningTTM);
   3.971  
   3.972          CurrentTTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, 0));
   3.973          CurrentTTM.setText(_("From current position"));
   3.974          CurrentTTM.setName("TTC"); // NOI18N
   3.975 -        CurrentTTM.addActionListener(formListener);
   3.976          TestTM.add(CurrentTTM);
   3.977  
   3.978          ToolsM.add(TestTM);
   3.979 @@ -1290,36 +1004,30 @@
   3.980          EnablePreviewC.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F7, 0));
   3.981          EnablePreviewC.setText(_("Enable preview"));
   3.982          EnablePreviewC.setName("TPE"); // NOI18N
   3.983 -        EnablePreviewC.addActionListener(formListener);
   3.984          PreviewP.add(EnablePreviewC);
   3.985          PreviewP.add(jSeparator6);
   3.986  
   3.987          VideoPreviewC.setSelected(true);
   3.988          VideoPreviewC.setText(_("Video frame"));
   3.989          VideoPreviewC.setName("TPV"); // NOI18N
   3.990 -        VideoPreviewC.addActionListener(formListener);
   3.991          PreviewP.add(VideoPreviewC);
   3.992  
   3.993          HalfSizeC.setText(_("Half size image"));
   3.994          HalfSizeC.setName("TPH"); // NOI18N
   3.995 -        HalfSizeC.addActionListener(formListener);
   3.996          PreviewP.add(HalfSizeC);
   3.997          PreviewP.add(jSeparator12);
   3.998  
   3.999          AudioPreviewC.setSelected(true);
  3.1000          AudioPreviewC.setText(_("Audio waveform"));
  3.1001          AudioPreviewC.setName("TAP"); // NOI18N
  3.1002 -        AudioPreviewC.addActionListener(formListener);
  3.1003          PreviewP.add(AudioPreviewC);
  3.1004  
  3.1005          MaxWaveC.setText(_("Maximize waveform visualization"));
  3.1006          MaxWaveC.setName("TPM"); // NOI18N
  3.1007 -        MaxWaveC.addActionListener(formListener);
  3.1008          PreviewP.add(MaxWaveC);
  3.1009  
  3.1010          PlayAudioC.setText(_("Play current subtitle"));
  3.1011          PlayAudioC.setName("TPP"); // NOI18N
  3.1012 -        PlayAudioC.addActionListener(formListener);
  3.1013          PreviewP.add(PlayAudioC);
  3.1014  
  3.1015          ToolsM.add(PreviewP);
  3.1016 @@ -1330,13 +1038,11 @@
  3.1017          JoinRecordTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, java.awt.event.InputEvent.CTRL_MASK));
  3.1018          JoinRecordTM.setText(_("Join records"));
  3.1019          JoinRecordTM.setName("TRJ"); // NOI18N
  3.1020 -        JoinRecordTM.addActionListener(formListener);
  3.1021          RecordTM.add(JoinRecordTM);
  3.1022  
  3.1023          SplitRecordTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
  3.1024          SplitRecordTM.setText(_("Split record"));
  3.1025          SplitRecordTM.setName("TRS"); // NOI18N
  3.1026 -        SplitRecordTM.addActionListener(formListener);
  3.1027          RecordTM.add(SplitRecordTM);
  3.1028  
  3.1029          ViewHeaderTM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
  3.1030 @@ -1370,13 +1076,11 @@
  3.1031          TextBalancingOnSelection.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
  3.1032          TextBalancingOnSelection.setText(_("On Selection"));
  3.1033          TextBalancingOnSelection.setName("TBT"); // NOI18N
  3.1034 -        TextBalancingOnSelection.addActionListener(formListener);
  3.1035          TextBalancingTM.add(TextBalancingOnSelection);
  3.1036  
  3.1037          TextBalancingOnTheWholeTable.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
  3.1038          TextBalancingOnTheWholeTable.setText(_("On entire table"));
  3.1039          TextBalancingOnTheWholeTable.setName("TTW"); // NOI18N
  3.1040 -        TextBalancingOnTheWholeTable.addActionListener(formListener);
  3.1041          TextBalancingTM.add(TextBalancingOnTheWholeTable);
  3.1042  
  3.1043          ToolsM.add(TextBalancingTM);
  3.1044 @@ -1385,12 +1089,10 @@
  3.1045  
  3.1046          OCRSelected.setText(_("On Selected Images"));
  3.1047          OCRSelected.setName("TOS"); // NOI18N
  3.1048 -        OCRSelected.addActionListener(formListener);
  3.1049          OCRTM.add(OCRSelected);
  3.1050  
  3.1051          OCRAll.setText(_("On All Images"));
  3.1052          OCRAll.setName("TOA"); // NOI18N
  3.1053 -        OCRAll.addActionListener(formListener);
  3.1054          OCRTM.add(OCRAll);
  3.1055  
  3.1056          PackingImagesToTiffM.setText(_("Images to Tiff"));
  3.1057 @@ -1405,13 +1107,11 @@
  3.1058  
  3.1059          FAQHM.setText(_("FAQ"));
  3.1060          FAQHM.setName("HFQ"); // NOI18N
  3.1061 -        FAQHM.addActionListener(formListener);
  3.1062          HelpM.add(FAQHM);
  3.1063  
  3.1064          AboutHM.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SLASH, java.awt.event.InputEvent.CTRL_MASK));
  3.1065          AboutHM.setText(_("About"));
  3.1066          AboutHM.setName("HAB"); // NOI18N
  3.1067 -        AboutHM.addActionListener(formListener);
  3.1068          HelpM.add(AboutHM);
  3.1069  
  3.1070          JublerMenuBar.add(HelpM);
  3.1071 @@ -1419,997 +1119,8 @@
  3.1072          setJMenuBar(JublerMenuBar);
  3.1073  
  3.1074          pack();
  3.1075 -    }
  3.1076 -
  3.1077 -    // Code for dispatching events from components to event handlers.
  3.1078 -
  3.1079 -    private class FormListener implements java.awt.event.ActionListener, java.awt.event.WindowListener {
  3.1080 -        FormListener() {}