branch develop updated (5fdb46c -> 714e5b5)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git from 5fdb46c Update libraries : maven 3.6.3 ; antlr4 4.7.4 ; guava 28.2 ; commons-collections4 4.4 ; commons-beanutils 1.9.4 ; junit 4.13 ; struts2 2.5.22 ; plexus-utils 3.3.0 new 714e5b5 Drop 'module' nuiton-i18n-editor. If necessary, put it in a different project The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 714e5b583b37a1f64a2a28241632eec43fc79258 Author: Arnaud Thimel <thimel@codelutin.com> Date: Mon Jan 6 12:03:59 2020 +0100 Drop 'module' nuiton-i18n-editor. If necessary, put it in a different project Summary of changes: nuiton-i18n-editor/LICENSE.txt | 674 -------------- nuiton-i18n-editor/README.md | 2 - nuiton-i18n-editor/changelog.txt | 8 - nuiton-i18n-editor/pom.xml | 314 ------- .../src/license/THIRD-PARTY.properties | 14 - nuiton-i18n-editor/src/main/assembly/bin.xml | 53 -- nuiton-i18n-editor/src/main/assembly/go.bat | 1 - nuiton-i18n-editor/src/main/assembly/go.sh | 4 - .../src/main/filters/nuiton-i18n-editor.properties | 78 -- .../java/org/nuiton/i18n/editor/I18nEditor.java | 205 ----- .../org/nuiton/i18n/editor/I18nEditorConfig.java | 369 -------- .../org/nuiton/i18n/editor/I18nEditorContext.java | 344 -------- .../i18n/editor/project/AbstractI18nProject.java | 425 --------- .../project/AbstractI18nProjectProvider.java | 106 --- .../nuiton/i18n/editor/project/I18nProject.java | 198 ----- .../project/I18nProjectConfigurePanelUI.java | 40 - .../i18n/editor/project/I18nProjectFactory.java | 181 ---- .../i18n/editor/project/I18nProjectProvider.java | 120 --- .../editor/project/impl/DirectoryI18nProject.java | 66 -- .../impl/DirectoryI18nProjectConfigurePanelUI.jaxx | 95 -- .../project/impl/DirectoryI18nProjectProvider.java | 128 --- .../i18n/editor/project/impl/JarI18nProject.java | 85 -- .../impl/JarI18nProjectConfigurePanelUI.jaxx | 108 --- .../project/impl/JarI18nProjectProvider.java | 187 ---- .../i18n/editor/ui/BundleCheckBoxMenuUI.jaxx | 61 -- .../org/nuiton/i18n/editor/ui/BundleValueUI.css | 52 -- .../org/nuiton/i18n/editor/ui/BundleValueUI.jaxx | 91 -- .../org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx | 68 -- .../org/nuiton/i18n/editor/ui/CreateBundleUI.css | 43 - .../org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx | 84 -- .../org/nuiton/i18n/editor/ui/CreatePackageUI.css | 40 - .../org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx | 77 -- .../org/nuiton/i18n/editor/ui/I18nEditorUI.css | 260 ------ .../org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx | 357 -------- .../nuiton/i18n/editor/ui/I18nEditorUIHandler.java | 967 --------------------- .../i18n/editor/ui/PackageCheckBoxMenuUI.jaxx | 70 -- .../org/nuiton/i18n/editor/ui/PropertieNode.java | 122 --- .../nuiton/i18n/editor/ui/PropertiesTreeModel.java | 199 ----- .../org/nuiton/i18n/editor/ui/TreeModelMode.java | 36 - .../nuiton/i18n/editor/ui/project/ProjectStep.java | 69 -- .../nuiton/i18n/editor/ui/project/ProjectUI.css | 59 -- .../nuiton/i18n/editor/ui/project/ProjectUI.jaxx | 310 ------- .../i18n/editor/ui/project/ProjectUIModel.java | 301 ------- .../editor/ui/project/SelectBundlesTableModel.java | 195 ----- .../ui/project/tabs/AbstractProjectTabPanelUI.css | 41 - .../ui/project/tabs/AbstractProjectTabPanelUI.jaxx | 92 -- .../ui/project/tabs/ChooseProjectTypePanelUI.jaxx | 86 -- .../ui/project/tabs/ConfigureProjectPanelUI.jaxx | 74 -- .../editor/ui/project/tabs/PersistPanelUI.jaxx | 183 ---- .../i18n/editor/ui/project/tabs/ResumePanelUI.jaxx | 65 -- .../ui/project/tabs/SelectBundlesPanelUI.jaxx | 64 -- nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp | 12 - nuiton-i18n-editor/src/main/jnlp/sun.jnlp | 12 - ....nuiton.i18n.editor.project.I18nProjectProvider | 2 - .../i18n/nuiton-i18n-editor_en_GB.properties | 121 --- .../i18n/nuiton-i18n-editor_fr_FR.properties | 121 --- .../src/main/resources/icons/action-about.png | Bin 936 -> 0 bytes .../src/main/resources/icons/action-accept.png | Bin 781 -> 0 bytes .../src/main/resources/icons/action-add.png | Bin 733 -> 0 bytes .../src/main/resources/icons/action-calculator.png | Bin 543 -> 0 bytes .../src/main/resources/icons/action-cancel.png | Bin 587 -> 0 bytes .../src/main/resources/icons/action-close.png | Bin 688 -> 0 bytes .../src/main/resources/icons/action-closeTab.png | Bin 518 -> 0 bytes .../main/resources/icons/action-collapseAll.png | Bin 372 -> 0 bytes .../main/resources/icons/action-combobox-reset.png | Bin 396 -> 0 bytes .../main/resources/icons/action-combobox-sort.png | Bin 574 -> 0 bytes .../src/main/resources/icons/action-config.png | Bin 611 -> 0 bytes .../resources/icons/action-connect_creating.png | Bin 1099 -> 0 bytes .../src/main/resources/icons/action-connect_no.png | Bin 601 -> 0 bytes .../src/main/resources/icons/action-connect_ok.png | Bin 619 -> 0 bytes .../resources/icons/action-connect_untested.png | Bin 698 -> 0 bytes .../src/main/resources/icons/action-connected.png | Bin 748 -> 0 bytes .../src/main/resources/icons/action-db-change.png | Bin 763 -> 0 bytes .../src/main/resources/icons/action-db-local.png | Bin 806 -> 0 bytes .../src/main/resources/icons/action-db-none.png | Bin 659 -> 0 bytes .../src/main/resources/icons/action-db-remote.png | Bin 755 -> 0 bytes .../src/main/resources/icons/action-delete.png | Bin 783 -> 0 bytes .../src/main/resources/icons/action-edit.png | Bin 574 -> 0 bytes .../src/main/resources/icons/action-exit.png | Bin 830 -> 0 bytes .../src/main/resources/icons/action-expandAll.png | Bin 371 -> 0 bytes .../main/resources/icons/action-fileChooser.png | Bin 441 -> 0 bytes .../src/main/resources/icons/action-fullscreen.png | Bin 687 -> 0 bytes .../src/main/resources/icons/action-go-back.png | Bin 345 -> 0 bytes .../src/main/resources/icons/action-go-detail.png | Bin 576 -> 0 bytes .../src/main/resources/icons/action-go-down.png | Bin 379 -> 0 bytes .../src/main/resources/icons/action-go-jump.png | Bin 723 -> 0 bytes .../src/main/resources/icons/action-go-up.png | Bin 372 -> 0 bytes .../src/main/resources/icons/action-help.png | Bin 746 -> 0 bytes .../src/main/resources/icons/action-i18n-es.png | Bin 469 -> 0 bytes .../src/main/resources/icons/action-i18n-fr.png | Bin 545 -> 0 bytes .../src/main/resources/icons/action-i18n-gb.png | Bin 599 -> 0 bytes .../src/main/resources/icons/action-import-gps.png | Bin 923 -> 0 bytes .../main/resources/icons/action-information.png | Bin 778 -> 0 bytes .../resources/icons/action-leave-fullscreen.png | Bin 727 -> 0 bytes .../main/resources/icons/action-local-export.png | Bin 528 -> 0 bytes .../main/resources/icons/action-local-import.png | Bin 532 -> 0 bytes .../main/resources/icons/action-mode-create.png | Bin 714 -> 0 bytes .../src/main/resources/icons/action-mode-read.png | Bin 779 -> 0 bytes .../main/resources/icons/action-mode-update.png | Bin 813 -> 0 bytes .../src/main/resources/icons/action-next-step.png | Bin 676 -> 0 bytes .../src/main/resources/icons/action-open.png | Bin 693 -> 0 bytes .../main/resources/icons/action-previous-step.png | Bin 655 -> 0 bytes .../main/resources/icons/action-remote-export.png | Bin 755 -> 0 bytes .../main/resources/icons/action-remote-import.png | Bin 770 -> 0 bytes .../src/main/resources/icons/action-revert.png | Bin 780 -> 0 bytes .../src/main/resources/icons/action-save.png | Bin 838 -> 0 bytes .../resources/icons/action-select-ssl-cert.png | Bin 693 -> 0 bytes .../src/main/resources/icons/action-show-help.png | Bin 744 -> 0 bytes .../src/main/resources/icons/action-site.png | Bin 928 -> 0 bytes .../src/main/resources/icons/action-synch.png | Bin 912 -> 0 bytes .../main/resources/icons/action-synchro-pause.png | Bin 598 -> 0 bytes .../main/resources/icons/action-synchro-start.png | Bin 592 -> 0 bytes .../main/resources/icons/action-synchro-stop.png | Bin 403 -> 0 bytes .../src/main/resources/icons/action-translate.png | Bin 790 -> 0 bytes .../main/resources/icons/action-unconnected.png | Bin 796 -> 0 bytes .../src/main/resources/icons/action-validate.png | Bin 537 -> 0 bytes .../src/main/resources/icons/logo OT_rvb.png | Bin 143337 -> 0 bytes .../src/main/resources/icons/logo-OT_web.png | Bin 34309 -> 0 bytes .../src/main/resources/icons/logo_ird.png | Bin 12384 -> 0 bytes .../src/main/resources/log4j.properties | 14 - nuiton-i18n-editor/src/site/apt/index.apt | 25 - nuiton-i18n-editor/src/site/site_fr.xml | 51 -- 122 files changed, 8229 deletions(-) delete mode 100644 nuiton-i18n-editor/LICENSE.txt delete mode 100644 nuiton-i18n-editor/README.md delete mode 100644 nuiton-i18n-editor/changelog.txt delete mode 100644 nuiton-i18n-editor/pom.xml delete mode 100644 nuiton-i18n-editor/src/license/THIRD-PARTY.properties delete mode 100644 nuiton-i18n-editor/src/main/assembly/bin.xml delete mode 100644 nuiton-i18n-editor/src/main/assembly/go.bat delete mode 100644 nuiton-i18n-editor/src/main/assembly/go.sh delete mode 100644 nuiton-i18n-editor/src/main/filters/nuiton-i18n-editor.properties delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditor.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorConfig.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorContext.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProject.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProjectProvider.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProject.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectConfigurePanelUI.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectFactory.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectProvider.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProject.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectConfigurePanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectProvider.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProject.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectConfigurePanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectProvider.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleCheckBoxMenuUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUIHandler.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PackageCheckBoxMenuUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertieNode.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertiesTreeModel.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/TreeModelMode.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectStep.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUIModel.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/SelectBundlesTableModel.java delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.css delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ChooseProjectTypePanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ConfigureProjectPanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/PersistPanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ResumePanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/SelectBundlesPanelUI.jaxx delete mode 100644 nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp delete mode 100644 nuiton-i18n-editor/src/main/jnlp/sun.jnlp delete mode 100644 nuiton-i18n-editor/src/main/resources/META-INF/services/org.nuiton.i18n.editor.project.I18nProjectProvider delete mode 100644 nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_en_GB.properties delete mode 100644 nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_fr_FR.properties delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-about.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-accept.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-add.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-calculator.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-cancel.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-close.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-closeTab.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-collapseAll.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-combobox-reset.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-combobox-sort.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-config.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-connect_creating.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-connect_no.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-connect_ok.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-connect_untested.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-connected.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-db-change.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-db-local.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-db-none.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-db-remote.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-delete.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-edit.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-exit.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-expandAll.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-fileChooser.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-fullscreen.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-go-back.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-go-detail.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-go-down.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-go-jump.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-go-up.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-help.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-i18n-es.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-i18n-fr.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-i18n-gb.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-import-gps.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-information.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-leave-fullscreen.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-local-export.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-local-import.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-mode-create.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-mode-read.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-mode-update.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-next-step.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-open.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-previous-step.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-remote-export.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-remote-import.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-revert.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-save.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-select-ssl-cert.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-show-help.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-site.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-synch.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-synchro-pause.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-synchro-start.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-synchro-stop.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-translate.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-unconnected.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/action-validate.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/logo OT_rvb.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/logo-OT_web.png delete mode 100644 nuiton-i18n-editor/src/main/resources/icons/logo_ird.png delete mode 100644 nuiton-i18n-editor/src/main/resources/log4j.properties delete mode 100644 nuiton-i18n-editor/src/site/apt/index.apt delete mode 100644 nuiton-i18n-editor/src/site/site_fr.xml -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 714e5b583b37a1f64a2a28241632eec43fc79258 Author: Arnaud Thimel <thimel@codelutin.com> Date: Mon Jan 6 12:03:59 2020 +0100 Drop 'module' nuiton-i18n-editor. If necessary, put it in a different project --- nuiton-i18n-editor/LICENSE.txt | 674 -------------- nuiton-i18n-editor/README.md | 2 - nuiton-i18n-editor/changelog.txt | 8 - nuiton-i18n-editor/pom.xml | 314 ------- .../src/license/THIRD-PARTY.properties | 14 - nuiton-i18n-editor/src/main/assembly/bin.xml | 53 -- nuiton-i18n-editor/src/main/assembly/go.bat | 1 - nuiton-i18n-editor/src/main/assembly/go.sh | 4 - .../src/main/filters/nuiton-i18n-editor.properties | 78 -- .../java/org/nuiton/i18n/editor/I18nEditor.java | 205 ----- .../org/nuiton/i18n/editor/I18nEditorConfig.java | 369 -------- .../org/nuiton/i18n/editor/I18nEditorContext.java | 344 -------- .../i18n/editor/project/AbstractI18nProject.java | 425 --------- .../project/AbstractI18nProjectProvider.java | 106 --- .../nuiton/i18n/editor/project/I18nProject.java | 198 ----- .../project/I18nProjectConfigurePanelUI.java | 40 - .../i18n/editor/project/I18nProjectFactory.java | 181 ---- .../i18n/editor/project/I18nProjectProvider.java | 120 --- .../editor/project/impl/DirectoryI18nProject.java | 66 -- .../impl/DirectoryI18nProjectConfigurePanelUI.jaxx | 95 -- .../project/impl/DirectoryI18nProjectProvider.java | 128 --- .../i18n/editor/project/impl/JarI18nProject.java | 85 -- .../impl/JarI18nProjectConfigurePanelUI.jaxx | 108 --- .../project/impl/JarI18nProjectProvider.java | 187 ---- .../i18n/editor/ui/BundleCheckBoxMenuUI.jaxx | 61 -- .../org/nuiton/i18n/editor/ui/BundleValueUI.css | 52 -- .../org/nuiton/i18n/editor/ui/BundleValueUI.jaxx | 91 -- .../org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx | 68 -- .../org/nuiton/i18n/editor/ui/CreateBundleUI.css | 43 - .../org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx | 84 -- .../org/nuiton/i18n/editor/ui/CreatePackageUI.css | 40 - .../org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx | 77 -- .../org/nuiton/i18n/editor/ui/I18nEditorUI.css | 260 ------ .../org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx | 357 -------- .../nuiton/i18n/editor/ui/I18nEditorUIHandler.java | 967 --------------------- .../i18n/editor/ui/PackageCheckBoxMenuUI.jaxx | 70 -- .../org/nuiton/i18n/editor/ui/PropertieNode.java | 122 --- .../nuiton/i18n/editor/ui/PropertiesTreeModel.java | 199 ----- .../org/nuiton/i18n/editor/ui/TreeModelMode.java | 36 - .../nuiton/i18n/editor/ui/project/ProjectStep.java | 69 -- .../nuiton/i18n/editor/ui/project/ProjectUI.css | 59 -- .../nuiton/i18n/editor/ui/project/ProjectUI.jaxx | 310 ------- .../i18n/editor/ui/project/ProjectUIModel.java | 301 ------- .../editor/ui/project/SelectBundlesTableModel.java | 195 ----- .../ui/project/tabs/AbstractProjectTabPanelUI.css | 41 - .../ui/project/tabs/AbstractProjectTabPanelUI.jaxx | 92 -- .../ui/project/tabs/ChooseProjectTypePanelUI.jaxx | 86 -- .../ui/project/tabs/ConfigureProjectPanelUI.jaxx | 74 -- .../editor/ui/project/tabs/PersistPanelUI.jaxx | 183 ---- .../i18n/editor/ui/project/tabs/ResumePanelUI.jaxx | 65 -- .../ui/project/tabs/SelectBundlesPanelUI.jaxx | 64 -- nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp | 12 - nuiton-i18n-editor/src/main/jnlp/sun.jnlp | 12 - ....nuiton.i18n.editor.project.I18nProjectProvider | 2 - .../i18n/nuiton-i18n-editor_en_GB.properties | 121 --- .../i18n/nuiton-i18n-editor_fr_FR.properties | 121 --- .../src/main/resources/icons/action-about.png | Bin 936 -> 0 bytes .../src/main/resources/icons/action-accept.png | Bin 781 -> 0 bytes .../src/main/resources/icons/action-add.png | Bin 733 -> 0 bytes .../src/main/resources/icons/action-calculator.png | Bin 543 -> 0 bytes .../src/main/resources/icons/action-cancel.png | Bin 587 -> 0 bytes .../src/main/resources/icons/action-close.png | Bin 688 -> 0 bytes .../src/main/resources/icons/action-closeTab.png | Bin 518 -> 0 bytes .../main/resources/icons/action-collapseAll.png | Bin 372 -> 0 bytes .../main/resources/icons/action-combobox-reset.png | Bin 396 -> 0 bytes .../main/resources/icons/action-combobox-sort.png | Bin 574 -> 0 bytes .../src/main/resources/icons/action-config.png | Bin 611 -> 0 bytes .../resources/icons/action-connect_creating.png | Bin 1099 -> 0 bytes .../src/main/resources/icons/action-connect_no.png | Bin 601 -> 0 bytes .../src/main/resources/icons/action-connect_ok.png | Bin 619 -> 0 bytes .../resources/icons/action-connect_untested.png | Bin 698 -> 0 bytes .../src/main/resources/icons/action-connected.png | Bin 748 -> 0 bytes .../src/main/resources/icons/action-db-change.png | Bin 763 -> 0 bytes .../src/main/resources/icons/action-db-local.png | Bin 806 -> 0 bytes .../src/main/resources/icons/action-db-none.png | Bin 659 -> 0 bytes .../src/main/resources/icons/action-db-remote.png | Bin 755 -> 0 bytes .../src/main/resources/icons/action-delete.png | Bin 783 -> 0 bytes .../src/main/resources/icons/action-edit.png | Bin 574 -> 0 bytes .../src/main/resources/icons/action-exit.png | Bin 830 -> 0 bytes .../src/main/resources/icons/action-expandAll.png | Bin 371 -> 0 bytes .../main/resources/icons/action-fileChooser.png | Bin 441 -> 0 bytes .../src/main/resources/icons/action-fullscreen.png | Bin 687 -> 0 bytes .../src/main/resources/icons/action-go-back.png | Bin 345 -> 0 bytes .../src/main/resources/icons/action-go-detail.png | Bin 576 -> 0 bytes .../src/main/resources/icons/action-go-down.png | Bin 379 -> 0 bytes .../src/main/resources/icons/action-go-jump.png | Bin 723 -> 0 bytes .../src/main/resources/icons/action-go-up.png | Bin 372 -> 0 bytes .../src/main/resources/icons/action-help.png | Bin 746 -> 0 bytes .../src/main/resources/icons/action-i18n-es.png | Bin 469 -> 0 bytes .../src/main/resources/icons/action-i18n-fr.png | Bin 545 -> 0 bytes .../src/main/resources/icons/action-i18n-gb.png | Bin 599 -> 0 bytes .../src/main/resources/icons/action-import-gps.png | Bin 923 -> 0 bytes .../main/resources/icons/action-information.png | Bin 778 -> 0 bytes .../resources/icons/action-leave-fullscreen.png | Bin 727 -> 0 bytes .../main/resources/icons/action-local-export.png | Bin 528 -> 0 bytes .../main/resources/icons/action-local-import.png | Bin 532 -> 0 bytes .../main/resources/icons/action-mode-create.png | Bin 714 -> 0 bytes .../src/main/resources/icons/action-mode-read.png | Bin 779 -> 0 bytes .../main/resources/icons/action-mode-update.png | Bin 813 -> 0 bytes .../src/main/resources/icons/action-next-step.png | Bin 676 -> 0 bytes .../src/main/resources/icons/action-open.png | Bin 693 -> 0 bytes .../main/resources/icons/action-previous-step.png | Bin 655 -> 0 bytes .../main/resources/icons/action-remote-export.png | Bin 755 -> 0 bytes .../main/resources/icons/action-remote-import.png | Bin 770 -> 0 bytes .../src/main/resources/icons/action-revert.png | Bin 780 -> 0 bytes .../src/main/resources/icons/action-save.png | Bin 838 -> 0 bytes .../resources/icons/action-select-ssl-cert.png | Bin 693 -> 0 bytes .../src/main/resources/icons/action-show-help.png | Bin 744 -> 0 bytes .../src/main/resources/icons/action-site.png | Bin 928 -> 0 bytes .../src/main/resources/icons/action-synch.png | Bin 912 -> 0 bytes .../main/resources/icons/action-synchro-pause.png | Bin 598 -> 0 bytes .../main/resources/icons/action-synchro-start.png | Bin 592 -> 0 bytes .../main/resources/icons/action-synchro-stop.png | Bin 403 -> 0 bytes .../src/main/resources/icons/action-translate.png | Bin 790 -> 0 bytes .../main/resources/icons/action-unconnected.png | Bin 796 -> 0 bytes .../src/main/resources/icons/action-validate.png | Bin 537 -> 0 bytes .../src/main/resources/icons/logo OT_rvb.png | Bin 143337 -> 0 bytes .../src/main/resources/icons/logo-OT_web.png | Bin 34309 -> 0 bytes .../src/main/resources/icons/logo_ird.png | Bin 12384 -> 0 bytes .../src/main/resources/log4j.properties | 14 - nuiton-i18n-editor/src/site/apt/index.apt | 25 - nuiton-i18n-editor/src/site/site_fr.xml | 51 -- 122 files changed, 8229 deletions(-) diff --git a/nuiton-i18n-editor/LICENSE.txt b/nuiton-i18n-editor/LICENSE.txt deleted file mode 100644 index 94a9ed0..0000000 --- a/nuiton-i18n-editor/LICENSE.txt +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/nuiton-i18n-editor/README.md b/nuiton-i18n-editor/README.md deleted file mode 100644 index d2e50d3..0000000 --- a/nuiton-i18n-editor/README.md +++ /dev/null @@ -1,2 +0,0 @@ -To deploy new version of pom: mvn deploy -To install localy: mvn install diff --git a/nuiton-i18n-editor/changelog.txt b/nuiton-i18n-editor/changelog.txt deleted file mode 100644 index f0a3600..0000000 --- a/nuiton-i18n-editor/changelog.txt +++ /dev/null @@ -1,8 +0,0 @@ -0.3 ?? 2008???? - * 20090205 [chemit] use lutinproject 3.4, improve jnlp making - * 20081205 [chemit] use lutinproject 3.2, make minimal site - * 20081118 [chemit] use lutinproject 3.1, produce javadoc - * 20081117 [chemit] bump jaxx to 0.6 - * use src/main/java to store jaxx, no more use of uimodel directory - * Update groupId to org.codelutin - * Use org.codelutin:lutinproject:3.0 super-pom \ No newline at end of file diff --git a/nuiton-i18n-editor/pom.xml b/nuiton-i18n-editor/pom.xml deleted file mode 100644 index 7e0d477..0000000 --- a/nuiton-i18n-editor/pom.xml +++ /dev/null @@ -1,314 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - I18n :: I18n Editor - %% - Copyright (C) 2010 - 2016 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Lesser Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - #L% - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <parent> - <groupId>org.nuiton</groupId> - <artifactId>i18n</artifactId> - <version>4.0-SNAPSHOT</version> - </parent> - - <groupId>org.nuiton.i18n</groupId> - <artifactId>nuiton-i18n-editor</artifactId> - - <dependencies> - - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>nuiton-i18n</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-utils</artifactId> - <version>${nuitonUtilsVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-config</artifactId> - <version>3.0-SNAPSHOT</version> - </dependency> - - <!--Jaxx--> - <dependency> - <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-runtime</artifactId> - <version>${jaxxVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-widgets</artifactId> - <version>${jaxxVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-config</artifactId> - <version>${jaxxVersion}</version> - </dependency> - - </dependencies> - - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> - - <name>I18n :: I18n Editor</name> - - <description>Editeur de fichier i18n</description> - <inceptionYear>2008</inceptionYear> - - <licenses> - <license> - <name>GPL</name> - <url>${maven.license.file}</url> - <distribution>local</distribution> - </license> - </licenses> - - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - - <properties> - - <!-- main class in jar --> - <maven.jar.main.class>org.nuiton.i18n.editor.I18nEditor</maven.jar.main.class> - - <jaxxVersion>2.28.2</jaxxVersion> - <nuitonUtilsVersion>3.0-rc-11</nuitonUtilsVersion> - - <!-- default license to use --> - <license.licenseName>gpl_v3</license.licenseName> - - <!-- jnlp --> - <!--keystorepath>${codelutin.keystorepath}</keystorepath> - <keystorealias>CodeLutin</keystorealias> - <keystorepass>codelutin</keystorepass> - <jnlp.build.directory>${project.build.directory}/jnlp</jnlp.build.directory> - <jnlpCodebase>${project.url}</jnlpCodebase--> - <!-- to test jnlp file locally --> - <!--jnlpCodebase>file://${jnlp.build.directory}</jnlpCodebase--> - - <!-- jaxx --> - <jaxx.useUIManagerForIcon>true</jaxx.useUIManagerForIcon> - <jaxx.addProjectClassPath>true</jaxx.addProjectClassPath> - <jaxx.addSourcesToClassPath>true</jaxx.addSourcesToClassPath> - <jaxx.autoImportCss>true</jaxx.autoImportCss> - - <!-- generate license bundled files --> - <license.generateBundle>true</license.generateBundle> - </properties> - - <build> - - <resources> - <resource> - <directory>src/main/filters</directory> - <filtering>true</filtering> - <includes> - <include>nuiton-i18n-editor.properties</include> - </includes> - </resource> - <resource> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <!--resource> - <directory>${jaxx.helpTarget}</directory> - <includes> - <include>**/*</include> - </includes> - </resource--> - </resources> - - <plugins> - - <plugin> - <groupId>org.nuiton.jaxx</groupId> - <artifactId>jaxx-maven-plugin</artifactId> - <version>${jaxxVersion}</version> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>license-maven-plugin</artifactId> - <executions> - <execution> - <id>attach-licenses</id> - <goals> - <goal>update-project-license</goal> - <goal>add-third-party</goal> - </goals> - <configuration> - <licenseMerges> - <licenseMerge> - The Apache Software License, Version 2.0|Apache License, Version 2.0 - </licenseMerge> - <licenseMerge>BSD License|BSD</licenseMerge> - </licenseMerges> - </configuration> - </execution> - </executions> - </plugin> - - <!-- plugin i18n --> - <plugin> - <groupId>${project.groupId}</groupId> - <artifactId>i18n-maven-plugin</artifactId> - <version>${project.version}</version> - <configuration> - <entries> - <entry> - <basedir>${maven.gen.dir}/java/</basedir> - </entry> - </entries> - </configuration> - <executions> - <execution> - <goals> - <goal>parserJava</goal> - <goal>gen</goal> - <goal>bundle</goal> - </goals> - </execution> - </executions> - </plugin> - - - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - <silent>true</silent> - </configuration> - </execution> - </executions> - </plugin> - - </plugins> - - <pluginManagement> - <plugins> - - <plugin> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifest> - <addClasspath>true</addClasspath> - <classpathPrefix>./lib/</classpathPrefix> - </manifest> - </archive> - </configuration> - </plugin> - - <!-- plugin site --> - <plugin> - <artifactId>maven-site-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.nuiton.jrst</groupId> - <artifactId>doxia-module-jrst</artifactId> - <version>${jrstPluginVersion}</version> - </dependency> - </dependencies> - </plugin> - - </plugins> - </pluginManagement> - </build> - - <reporting> - <plugins> - - </plugins> - </reporting> - - <!-- ************************************************************* --> - <!-- *** Build Environment ************************************** --> - <!-- ************************************************************* --> - - <profiles> - <profile> - <id>release-profile</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/main/assembly/bin.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <phase>verify</phase> - <goals> - <goal>attached</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - </profile> - </profiles> - -</project> diff --git a/nuiton-i18n-editor/src/license/THIRD-PARTY.properties b/nuiton-i18n-editor/src/license/THIRD-PARTY.properties deleted file mode 100644 index f5564a3..0000000 --- a/nuiton-i18n-editor/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - BSD License -# - GNU General Public License - Version 2 with the class path exception -# - Lesser General Public License (LGPL) -# - Lesser General Public License (LGPL) v 3.0 -# - The Apache Software License, Version 2.0 -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Sat Jul 07 12:37:31 CEST 2012 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 diff --git a/nuiton-i18n-editor/src/main/assembly/bin.xml b/nuiton-i18n-editor/src/main/assembly/bin.xml deleted file mode 100644 index a39b7f4..0000000 --- a/nuiton-i18n-editor/src/main/assembly/bin.xml +++ /dev/null @@ -1,53 +0,0 @@ -<assembly> - <id>bin</id> - <formats> - <format>zip</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - - <fileSets> - - <fileSet> - <directory>target/lib</directory> - <outputDirectory>lutini18nEditor/lib</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - <excludes> - <exclude>junit-4.5.jar</exclude> - </excludes> - </fileSet> - - <fileSet> - <directory>target</directory> - <outputDirectory>lutini18nEditor</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - <excludes> - <exclude>*-sources.jar</exclude> - <exclude>*-javadoc.jar</exclude> - </excludes> - </fileSet> - <fileSet> - <outputDirectory>lutini18nEditor</outputDirectory> - - <includes> - <include>README*</include> - <include>LICENSE*</include> - </includes> - </fileSet> - - <fileSet> - <directory>src/main/assembly</directory> - <filtered>true</filtered> - <outputDirectory>lutini18nEditor</outputDirectory> - <fileMode>0755</fileMode> - <includes> - <include>go.sh</include> - <include>go.bat</include> - </includes> - </fileSet> - - </fileSets> -</assembly> \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/assembly/go.bat b/nuiton-i18n-editor/src/main/assembly/go.bat deleted file mode 100644 index cffa0cc..0000000 --- a/nuiton-i18n-editor/src/main/assembly/go.bat +++ /dev/null @@ -1 +0,0 @@ -java -Xmx512M -Xms512M -jar ${project.build.finalName}.jar %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/assembly/go.sh b/nuiton-i18n-editor/src/main/assembly/go.sh deleted file mode 100644 index 5557dd2..0000000 --- a/nuiton-i18n-editor/src/main/assembly/go.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -MX=512M -java -Xmx$MX -Xms$MX -jar ${project.build.finalName}.jar "$@" \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/filters/nuiton-i18n-editor.properties b/nuiton-i18n-editor/src/main/filters/nuiton-i18n-editor.properties deleted file mode 100644 index eb45262..0000000 --- a/nuiton-i18n-editor/src/main/filters/nuiton-i18n-editor.properties +++ /dev/null @@ -1,78 +0,0 @@ -application.name=${project.name} -application.version=${project.version} -application.site.url=${project.url} -application.organisation.name=${project.organization.name} -application.organisation.url=${project.organization.url} - - -# icones d'action (icon.action.nomAction=*.???) -icon.action.about=action-about.png -icon.action.accept=action-accept.png -icon.action.add=action-add.png -icon.action.cancel=action-cancel.png -icon.action.closeTab=action-closeTab.png -icon.action.config=action-config.png -icon.action.edit=action-edit.png -icon.action.open=action-open.png -icon.action.save=action-save.png -icon.action.close=action-close.png -icon.action.delete=action-delete.png -icon.action.exit=action-exit.png -icon.action.error=error.png -icon.action.fullscreen=action-fullscreen.png -icon.action.fileChooser=action-fileChooser.png -icon.action.go-back=action-go-back.png -icon.action.i18n-es=action-i18n-es.png -icon.action.i18n-fr=action-i18n-fr.png -icon.action.i18n-gb=action-i18n-gb.png -icon.action.collapseAll=action-collapseAll.png -icon.action.expandAll=action-expandAll.png - -icon.action.site=action-site.png - -icon.action.show-help=action-show-help.png -icon.action.help=action-help.png -icon.action.leave-fullscreen=action-leave-fullscreen.png - -icon.action.connected=action-connected.png -icon.action.connect_creating=action-connect_creating.png -icon.action.connect_untested=action-connect_untested.png -icon.action.connect_no=action-connect_no.png -icon.action.connect_ok=action-connect_ok.png -icon.action.db-change=action-db-change.png -icon.action.db-local=action-db-local.png -icon.action.db-none=action-db-none.png -icon.action.db-remote=action-db-remote.png -icon.action.go-detail=action-go-detail.png -icon.action.go-down=action-go-down.png -icon.action.go-jump=action-go-jump.png -icon.action.next-step=action-next-step.png -icon.action.importGPS=action-import-gps.png -icon.action.previous-step=action-previous-step.png -icon.action.go-up=action-go-up.png -icon.action.information=action-information.png -icon.action.local-export=action-local-import.png -icon.action.local-import=action-local-export.png -icon.action.remote-export=action-remote-export.png -icon.action.remote-import=action-remote-import.png -icon.action.revert=action-revert.png -icon.action.select-ssl-cert=action-select-ssl-cert.png -icon.action.start=action-synchro-start.png -icon.action.stop=action-synchro-stop.png - -icon.action.wizard-state-pending=action-wizard-state-pending-16.png -icon.action.wizard-state-running=action-wizard-state-running-16.png -icon.action.wizard-state-need_fix=action-wizard-state-need_fix-16.png -icon.action.wizard-state-successed=action-wizard-state-successed-16.png -icon.action.wizard-state-failed=action-wizard-state-failed-16.png -icon.action.wizard-state-canceled=action-wizard-state-canceled-16.png - -icon.action.wizard-start=action-wizard-start-16.png -icon.action.wizard-next=action-wizard-next-16.png -icon.action.wizard-previous=action-wizard-previous-16.png -icon.action.wizard-pause=action-wizard-pause-16.png -icon.action.wizard-refresh=action-wizard-refresh-16.png - -icon.action.wizard-config=action-wizard-config-16.png -icon.action.wizard-message=action-wizard-message-16.png - diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditor.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditor.java deleted file mode 100644 index 0ee86ed..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditor.java +++ /dev/null @@ -1,205 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor; - -import jaxx.runtime.JAXXUtil; -import jaxx.runtime.SwingUtil; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.I18n; -import org.nuiton.i18n.editor.ui.I18nEditorUI; -import org.nuiton.i18n.editor.ui.I18nEditorUIHandler; -import org.nuiton.i18n.init.DefaultI18nInitializer; -import org.nuiton.util.StringUtil; - -import javax.swing.SwingUtilities; -import java.io.IOException; -import java.util.Arrays; -import java.util.Date; -import java.util.Locale; - -import static org.nuiton.i18n.I18n.t; - -/** - * L'application. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class I18nEditor { - - private static long startingTime = System.nanoTime(); - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static Log log = LogFactory.getLog(I18nEditor.class); - - /** - * Lancement de l'interface - * - * @param args path to manage - * @throws IOException if any IO exception - */ - public static void main(String[] args) throws IOException { - - startingTime = System.nanoTime(); - log.info("I18nEditor start at " + new Date() + " args: " + Arrays.toString(args)); - - I18n.init(new DefaultI18nInitializer("nuiton-i18n-editor-i18n"), Locale.getDefault()); - - try { - - I18nEditorContext context = init(args); - - log.info(t("i18neditor.init.context.done", StringUtil.convertTime(startingTime, System.nanoTime()))); - - JAXXUtil.checkJAXXContextEntry(context, JAXXUtil.newContextEntryDef(I18nEditorConfig.class)); - - I18nEditorConfig config = context.getContextValue(I18nEditorConfig.class); - - config.doAction(I18nEditorConfig.Step.AfterInit.ordinal()); - - if (config.isDisplayMainUI()) { - - I18nEditorUIHandler uiHandler = context.getContextValue(I18nEditorUIHandler.class); - - //uiHandler.openProject(context); - - final I18nEditorUI ui = uiHandler.initUI(context, config.isFullScreen()); - - log.info(t("i18neditor.init.ui.done")); - - SwingUtilities.invokeLater(new Runnable() { - - @Override - public void run() { - ui.setVisible(true); - } - }); - - } else { - System.exit(0); - } - } catch (Exception e) { - log.error(e.getMessage(), e); - System.exit(1); - } - - } - - public static I18nEditorContext init(String... args) throws Exception { - // to enable javassist on webstart, must remove any securityManager, - // see if this can be dangerous (should not be since jnlp is signed ?) - // moreover it speeds up the loading :) - System.setSecurityManager(null); - - long t0 = System.nanoTime(); - - //I18n.setUniqueBundleName("nuiton-i18n-editor-i18n"); - - Runtime.getRuntime().addShutdownHook(new Thread("shutdown observe") { - - @Override - public void run() { - try { - super.run(); - - I18nEditorContext.get().close(); - - // force to kill main thread - - log.info(t("i18neditor.init.closed", new Date())); - Runtime.getRuntime().halt(0); - } catch (Exception ex) { - log.error("error while closing " + ex.getMessage(), ex); - Runtime.getRuntime().halt(1); - } - } - }); - - // init root context - I18nEditorContext context = I18nEditorContext.get(); - - // init config - I18nEditorConfig config = context.getConfig(); - config.parse(args); - - // init i18n - I18n.init(new DefaultI18nInitializer("nuiton-i18n-editor-i18n"), config.getLocale()); - - log.info(t("i18neditor.message.config.loaded", config.getVersion())); - - // prepare ui look&feel and load ui properties - try { - SwingUtil.initNimbusLoookAndFeel(); - } catch (Exception e) { - // could not find nimbus look-and-feel - log.warn(t("i18neditor.warning.nimbus.landf")); - } catch (Throwable e) { - log.warn(t("i18neditor.warning.no.ui"), e); - // pas d'environnement d'ui - config.setCanUseUI(false); - } - - if (config.isCanUseUI()) { - // chargement de la configuration des uis - SwingUtil.loadUIConfig(I18nEditorConfig.APPLICATION_PROPERTIES, null); - } - - if (log.isDebugEnabled()) { - log.debug("init done in " + StringUtil.convertTime(t0, System.nanoTime())); - } - return context; - } - - public void help() { - I18nEditorContext context = I18nEditorContext.get(); - I18nEditorConfig config = context.getConfig(); - System.out.println(I18n.t("i18neditor.message.help.usage", config.getVersion())); - System.out.println("Options (set with --option <key> <value>:"); - for (I18nEditorConfig.Option o : I18nEditorConfig.Option.values()) { - System.out.println("\t" + o.key + "(" + o.defaultValue + "):" + o.description); - } - - System.out.println("Actions:"); - for (I18nEditorConfig.Action a : I18nEditorConfig.Action.values()) { - System.out.println("\t" + Arrays.toString(a.aliases) + "(" + a.action + "):" + a.description); - } - disableMainUI(); - } - - public void configure() { - if (log.isDebugEnabled()) { - log.debug(this); - } - I18nEditorContext context = I18nEditorContext.get(); - I18nEditorConfig config = context.getConfig(); - I18nEditorUIHandler handler = context.getContextValue(I18nEditorUIHandler.class); - handler.showConfig(context); - config.setDisplayMainUI(false); - } - - /** Désactiver la possiblite de lancer l'ui principale. */ - public void disableMainUI() { - if (log.isDebugEnabled()) { - log.debug(this); - } - I18nEditorContext context = I18nEditorContext.get(); - I18nEditorConfig config = context.getConfig(); - config.setDisplayMainUI(false); - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorConfig.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorConfig.java deleted file mode 100644 index 7ad8bc2..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorConfig.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor; - -import java.io.IOException; -import java.io.InputStream; - -import jaxx.runtime.JAXXUtil; -import jaxx.runtime.context.DefaultApplicationContext; -import org.apache.commons.io.FileUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import static org.nuiton.i18n.I18n.t; - -import org.nuiton.config.ApplicationConfig; -import org.nuiton.config.ConfigOptionDef; -import org.nuiton.util.Version; - -import java.beans.PropertyChangeListener; -import java.io.File; -import java.io.FilenameFilter; -import java.util.HashSet; -import java.util.Locale; -import java.util.Properties; -import java.util.Set; -import org.nuiton.util.VersionUtil; - -/** - * La configuration de l'application. - * - * Note : cette classe sera auto-instanciée par le contexte applicatif. - * - * TODO ajouter d'autres propriete pour controler quel storage est utilise - * et quel est son type (local ou pas). - * - * @author Tony Chemit - chemit@codelutin.com - * @see DefaultApplicationContext.AutoLoad - */ -@DefaultApplicationContext.AutoLoad -public class I18nEditorConfig extends ApplicationConfig { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(I18nEditorConfig.class); - /** - * le fichier de configuration de l'application avec les informations sur - * le projet (version, license,...) et la configuration des ui (icons, ...) - */ - public static final String APPLICATION_PROPERTIES = "/nuiton-i18n-editor.properties"; - /** - * le nom du repertoire ou sont les donnees de l'application - */ - public static final String USER_DIRECTORY_FILENAME = ".nuiton-i18n-editor"; - /** - * le repertoire utilisateur de l'application - */ - protected static File userDirectory; - - public static File getUserDirectory() { - if (userDirectory == null) { - userDirectory = new File(new File(I18nEditorConfig.getUserHome()), USER_DIRECTORY_FILENAME); - } - return userDirectory; - } - /** - * un drapeau pour savoir si on est en mode pleine écran - */ - protected boolean fullscreen; - /** - * un drepeau pour savoir s'il faut lancer l'interface graphique. - * Cette valeur peut être programmées lors des actions. - */ - private boolean displayMainUI = true; - /** - * drapeau pour savoir si on peut utiliser des ui dans l'environnement. - * - * Par defaut, on suppose qu'on peut utiliser l'environnement graphique - * et si on désactive explicitement ou si pas d'environnement graphique trouvé. - */ - private boolean canUseUI = true; - /** - * la liste des projets déjà connus (dans le repertoire getProjectFile()) - */ - protected Set<String> projects = new HashSet<String>(); - - public I18nEditorConfig() { - - setConfigFileName(Option.CONFIG_FILE.defaultValue); - - // chargement de la configuration interne - - InputStream stream = getClass().getResourceAsStream(APPLICATION_PROPERTIES); - - Properties p = new Properties(); - try { - p.load(stream); - for (Object k : p.keySet()) { - String key = k + ""; - Object value = p.get(k); - if (log.isDebugEnabled()) { - log.debug("install properties " + k + " : " + value); - } - setDefaultOption(key, "" + value); - } - } catch (IOException ex) { - throw new RuntimeException(ex); - } - - for (Option o : Option.values()) { - setDefaultOption(o.key, o.defaultValue); - } - - // on supprime le stamp de snapshot s'il existe - String sVersion = VersionUtil.removeSnapshot(getOption("application.version")); - Version version = VersionUtil.valueOf(sVersion); - setDefaultOption("version", version.getVersion()); - - - // initialisation des répertoires - //FileUtil.setCurrentDirectory(getUserDirectory()); - getUserDirectory().mkdirs(); - // suppression du contenu du répertoire temporaire - try { - FileUtils.cleanDirectory(getTmpDirectory()); - } catch (IOException e) { - if (log.isErrorEnabled()) { - log.error("Could not clean temporary directory",e); - } - } - - // initialisation des actions - for (Action a : Action.values()) { - for (String alias : a.aliases) { - addActionAlias(alias, a.action); - } - } - // recuperation de la liste des projets deja connus - String[] list = getProjectsDirectory().list(new FilenameFilter() { - - @Override - public boolean accept(File dir, String name) { - return name.endsWith(".i18nproject"); - } - }); - for (String name : list) { - projects.add(name.substring(0, name.length() - ".i18nproject".length())); - } - } - - public String getCopyrightText() { - return "Version " + getVersion() + " Codelutin @ 2008-2009"; - } - - /** - * @return la version de l'application. - */ - public Version getVersion() { - Version option = getOption(Version.class, "version"); - return option; - } - - public boolean isFullScreen() { - Boolean result = getOptionAsBoolean(Option.FULL_SCREEN.key); - return result != null && result; - } - - public File getTmpDirectory() { - File result = getOptionAsFile(Option.TMP_DIRECTORY.key); - if (!result.exists()) { - result.mkdirs(); - } - return result; - } - - public File getProjectsDirectory() { - File result = getOptionAsFile(Option.PROJECTS_DIRECTORY.key); - if (!result.exists()) { - result.mkdirs(); - } - return result; - } - - public boolean isDisplayMainUI() { - return displayMainUI; - } - - public boolean isCanUseUI() { - return canUseUI; - } - - public Locale getLocale() { - Locale result = getOption(Locale.class, Option.LOCALE.key); - return result; - } - - public Set<String> getProjects() { - return projects; - } - - public void setFullscreen(boolean fullscreen) { - boolean oldValue = isFullScreen(); - setOption(Option.FULL_SCREEN.key, fullscreen + ""); - saveForUser(); - firePropertyChange("fullscreen", oldValue, fullscreen); - } - - public void setDisplayMainUI(boolean b) { - displayMainUI = b; - } - - public void setCanUseUI(boolean canUseUI) { - this.canUseUI = canUseUI; - if (!canUseUI) { - // on ne pourra pas lancer l'ui principale - setDisplayMainUI(false); - } - } - - public void setLocale(Locale newLocale) { - setOption(Option.LOCALE.key, newLocale.toString()); - Locale.setDefault(newLocale); - saveForUser(); - firePropertyChange("locale", null, newLocale); - } - - /** - * Save configuration, in user home directory using the - * {@link #getConfigFileName}. Default, env and commande line note saved - */ - public void saveForUser() { - super.saveForUser(); - } - public static final String[] DEFAULT_JAXX_PCS = { - "locale", "fullScreen" - }; - - public void removeJaxxPropertyChangeListener() { - PropertyChangeListener[] toRemove = JAXXUtil.findJaxxPropertyChangeListener(DEFAULT_JAXX_PCS, getPropertyChangeListeners()); - if (toRemove == null || toRemove.length == 0) { - return; - } - if (log.isDebugEnabled()) { - log.debug("before remove : " + getPropertyChangeListeners().length); - log.debug("toRemove : " + toRemove.length); - } - for (PropertyChangeListener listener : toRemove) { - removePropertyChangeListener(listener); - } - if (log.isDebugEnabled()) { - log.debug("after remove : " + getPropertyChangeListeners().length); - } - } - - public File getProjectStore(String name) { - return new File(getProjectsDirectory(), name + ".i18nproject"); - } - - ////////////////////////////////////////////////// - // Toutes les options disponibles - ////////////////////////////////////////////////// - public enum Option implements ConfigOptionDef { - - CONFIG_FILE(CONFIG_FILE_NAME, t("i18neditor.config.configFileName.description"), "nuitoni18neditor-config", String.class, true, true), - // directories - TMP_DIRECTORY("tmp.directory", t("i18neditor.config.defaultTmpDirectory.description"), getUserDirectory() + File.separator + "tmp", File.class, false, false), - PROJECTS_DIRECTORY("projects.directory", t("i18neditor.config.defaultProjectsDirectory.description"), getUserDirectory() + File.separator + "projects", File.class, false, false), - // ui config - FULL_SCREEN("ui.fullscreen", t("i18neditor.config.ui.fullscreen"), "false", Boolean.class, false, false), - LOCALE("ui.locale", t("i18neditor.config.ui.locale"), Locale.FRANCE.toString(), Locale.class, false, false); - public final String key; - public final String description; - public final String defaultValue; - public final Class<?> type; - public final boolean _transient; - public final boolean _final; - - Option(String key, String description, String defaultValue, Class<?> type, boolean _transient, boolean _final) { - this.key = key; - this.description = description; - this.defaultValue = defaultValue; - this.type = type; - this._final = _final; - this._transient = _transient; - } - - @Override - public boolean isFinal() { - return _final; - } - - @Override - public void setDefaultValue(String defaultValue) { - - } - - @Override - public void setTransient(boolean isTransient) { - - } - - @Override - public void setFinal(boolean isFinal) { - - } - - @Override - public boolean isTransient() { - return _transient; - } - - @Override - public String getDefaultValue() { - return defaultValue; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public String getKey() { - return key; - } - - @Override - public Class<?> getType() { - return type; - } - - - } - - public enum Step { - - AfterInit, BeforeExit - } - - public enum Action { - - HELP(t("i18neditor.action.commandline.help"), I18nEditor.class.getName() + "#help", "-h", "--help"), - CONFIGURE(t("i18neditor.action.commandline.configure"), I18nEditor.class.getName() + "#configure", "-c", "--configure"), - NO_MAIN_UI(t("i18neditor.action.commandline.disable.main.ui"), I18nEditor.class.getName() + "#disableMainUI", "-n", "--no-main"); - public String description; - public String action; - public String[] aliases; - - Action(String description, String action, String... aliases) { - this.description = description; - this.action = action; - this.aliases = aliases; - } - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorContext.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorContext.java deleted file mode 100644 index b698894..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/I18nEditorContext.java +++ /dev/null @@ -1,344 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor; - -import java.beans.PropertyChangeListener; -import java.util.List; -import java.util.Locale; - -import jaxx.runtime.JAXXUtil; -import jaxx.runtime.context.DefaultApplicationContext; -import jaxx.runtime.context.JAXXContextEntryDef; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.editor.project.I18nProject; -import org.nuiton.i18n.editor.ui.TreeModelMode; -import org.nuiton.i18n.editor.ui.I18nEditorUI; - -/** - * Le contexte de l'application. - * - * On définit ici toutes les entrées du contexte. - * - * Note : cette classe possède une instance partagée accéssible via la méthode {@link #get()}. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class I18nEditorContext extends DefaultApplicationContext { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private final Log log = LogFactory.getLog(I18nEditorContext.class); - //------------------------------------------- - // UI instances - //------------------------------------------- - public static final JAXXContextEntryDef<I18nEditorUI> MAIN_UI_ENTRY_DEF = JAXXUtil.newContextEntryDef("mainui", I18nEditorUI.class); - public static final JAXXContextEntryDef<I18nProject> PROJECT_DEF = JAXXUtil.newContextEntryDef(I18nProject.class); - private static final JAXXContextEntryDef<String> SELECTED_KEY_DEF = JAXXUtil.newContextEntryDef("selectedKey", String.class); - private static final JAXXContextEntryDef<String> RE_SELECTED_KEY_DEF = JAXXUtil.newContextEntryDef("reSelectedKey", String.class); - private static final JAXXContextEntryDef<TreeModelMode> TREE_MODEL_MODE_DEF = JAXXUtil.newContextEntryDef(TreeModelMode.class); - public static final String PROJECT_PROPERTY = "project"; - public static final String SELECTED_PACKAGES_PROPERTY = "selectedPackages"; - public static final String SELECTED_BUNDLES_PROPERTY = "selectedBundles"; - public static final String SELECTED_KEY_PROPERTY = "selectedKey"; - public static final String TREE_MODEL_MODE_PROPERTY = "treeModelMode"; - /** Séparateur des propriétés */ - public static final String SEPARATOR = "."; - /** - * l'intance partagée accessible - */ - protected static I18nEditorContext instance; - - /** - * Récupération du contexte applicatif. - * - * @return l'instance partagé du contexte. - */ - public static synchronized I18nEditorContext get() { - if (instance == null) { - instance = new I18nEditorContext(); - } - return instance; - } - /** - * Un objet pour bloquer le context - */ - protected final Object lock = new Object(); - - protected I18nEditorContext() { - TREE_MODEL_MODE_DEF.setContextValue(this, TreeModelMode.TREE); - } - - public I18nEditorConfig getConfig() { - return getContextValue(I18nEditorConfig.class); - } - - public I18nProject getProject() { - return PROJECT_DEF.getContextValue(this); - } - - public I18nEditorUI getMainUI() { - return MAIN_UI_ENTRY_DEF.getContextValue(this); - } - - public void addSelectedPackage(String newPackage) { - List<String> list = getProject().getSelectedPackages(); - boolean added = list.add(newPackage); - if (added) { - firePropertyChange(SELECTED_PACKAGES_PROPERTY, null, list); - } - } - - public void removeSelectedPackage(String newPackage) { - List<String> list = getProject().getSelectedPackages(); - boolean removed = list.remove(newPackage); - if (removed) { - firePropertyChange(SELECTED_PACKAGES_PROPERTY, null, list); - } - } - - public void addSelectedBundle(Locale newBundle) { - List<Locale> list = getProject().getSelectedBundles(); - boolean added = list.add(newBundle); - if (added) { - firePropertyChange(SELECTED_BUNDLES_PROPERTY, null, list); - } - } - - public void removeSelectedBundle(Locale newBundle) { - List<Locale> list = getProject().getSelectedBundles(); - boolean removed = list.remove(newBundle); - if (removed) { - firePropertyChange(SELECTED_BUNDLES_PROPERTY, null, list); - } - } - - public TreeModelMode getTreeModelMode() { - return TREE_MODEL_MODE_DEF.getContextValue(this); - } - - public void setTreeModelMode(TreeModelMode mode) { - TreeModelMode oldMode = getTreeModelMode(); - if (mode == null) { - TREE_MODEL_MODE_DEF.removeContextValue(this); - - } else { - TREE_MODEL_MODE_DEF.setContextValue(this, mode); - } - if (log.isDebugEnabled()) { - log.debug("new mode " + mode + " - old mode " + oldMode); - } - firePropertyChange(TREE_MODEL_MODE_PROPERTY, oldMode, mode); - } - - public String getSelectedKey() { - return SELECTED_KEY_DEF.getContextValue(this); - } - - public void setSelectedKey(String key) { - - if (key == null) { - SELECTED_KEY_DEF.removeContextValue(this); - } else { - SELECTED_KEY_DEF.setContextValue(this, key); - } - if (log.isDebugEnabled()) { - log.debug("new selected key : " + key); - } - firePropertyChange(SELECTED_KEY_PROPERTY, null, key); - } - - public void saveSelectedKey() { - String key = getSelectedKey(); - if (log.isDebugEnabled()) { - log.debug("store key to reselect : " + key); - } - if (key == null) { - RE_SELECTED_KEY_DEF.removeContextValue(this); - } else { - RE_SELECTED_KEY_DEF.setContextValue(this, key); - } - SELECTED_KEY_DEF.removeContextValue(this); - } - - public String popSelectedKey() { - String key = RE_SELECTED_KEY_DEF.getContextValue(this); - if (key != null) { - // on supprime la valeur du context - RE_SELECTED_KEY_DEF.removeContextValue(this); - } - if (log.isDebugEnabled()) { - log.debug("pop key to reselect : " + key); - } - return key; - } - - public void lock() throws InterruptedException { - synchronized (lock) { - lock.wait(); - } - } - - public void releaseLock() { - synchronized (lock) { - lock.notify(); - } - } - - /** - * close the application's context. - * - * @throws Exception if any pb while closing - */ - public void close() throws Exception { - if (log.isDebugEnabled()) { - log.debug("closing context " + this); - } - - // fermeture du context principal - clear(); - - if (log.isDebugEnabled()) { - log.debug("context closed" + this); - } - } - -// public synchronized void setProject(I18nProject project) throws IOException { -// -// project.load(); -// -// setContextValue(project); -// firePropertyChange("project", null, project); -// firePropertyChange(BUNDLES_I18N_PROPERTY, null, project.getSelectedLocales()); -// firePropertyChange(PACKAGES_I18N_PROPERTY, null, project.getSelectedPackages()); -// } -// /** -// * Récupération d'un bundle utilisateur, créé si il n'existe pas -// * -// * @param bundleName nom du bundle -// * @return bundle -// */ -// public I18nFileReader getUserBundle(String bundleName) { -// String name = REP_NAME + PROJECT_NAME + "-" + bundleName + ".properties"; -// I18nFileReader bundle = getBundles().get(name); -// if (bundle == null) { -// bundle = new I18nFileReader(); -// getUserBundles().put(name, bundle); -// getBundles().put(name, bundle); -// } -// return bundle; -// } -// /** -// * Récupération des valeurs pour les bundles pour une clé -// * -// * @param locales liste des bundles -// * @param key clé -// * @return liste des valeurs pour les bundles pour une clé -// */ -// public List<String> getValues(List<Locale> locales, String key) { -// List<String> values = new ArrayList<String>(); -// -// I18nProject project = getProject(); -// if (project != null) { -// -// for (Locale locale : locales) { -// -// String value = null; -// -// project.getValue(value, locale, key); -// -// values.add(value); -// } -// } -// return values; -// } - /** - * Création d'un nouveau bundle utilistateur - * - * @param bundleName nom du bundle (ex : fr_FR) - */ - public void createBundle(String bundleName) { -// getUserBundle(bundleName); - } - - public void createPackage(String bundleName) { -// getUserBundle(bundleName); - } - - /** - * Enregistrement d'une modification de clé dans le bundle utilisateur associé - * - * @param bundleName nom du bundle - * @param key clé - * @param value nouvelle valeur - */ - public void store(Locale bundleName, String key, String value) { - I18nProject project = getProject(); - if (project != null) { -// project.updateValue(bundleName, bundleName, key, value); - } -// I18nFileReader bundle = getUserBundle(bundleName); -// bundle.put(key, value); - } - - /** - * Enregistrement des bundles utilisateur sur le disque - */ - public void store() { -// Map<String, I18nFileReader> userBundles = getUserBundles(); -// for (String name : userBundles.keySet()) { -// I18nFileReader bundle = userBundles.get(name); -// try { -// bundle.store(new FileWriter(name), null); -// } catch (IOException e) { -// throw new RuntimeException(e); //TODO: Gestion des exceptions -// } -// } - } - - @Override - public void firePropertyChange(String name, Object oldValue, Object newValue) { - super.firePropertyChange(name, oldValue, newValue); - } - public static final String[] DEFAULT_JAXX_PCS = { - SELECTED_PACKAGES_PROPERTY, - SELECTED_BUNDLES_PROPERTY, - PROJECT_PROPERTY, - SELECTED_KEY_PROPERTY, - TREE_MODEL_MODE_PROPERTY - }; - - public void removeJaxxPropertyChangeListener() { - PropertyChangeListener[] toRemove = - JAXXUtil.findJaxxPropertyChangeListener( - DEFAULT_JAXX_PCS, getPropertyChangeListeners()); - if (toRemove == null || toRemove.length == 0) { - return; - } - if (log.isDebugEnabled()) { - log.debug("before remove : " + getPropertyChangeListeners().length); - log.debug("toRemove : " + toRemove.length); - } - for (PropertyChangeListener listener : toRemove) { - removePropertyChangeListener(listener); - } - if (log.isDebugEnabled()) { - log.debug("after remove : " + getPropertyChangeListeners().length); - } - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProject.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProject.java deleted file mode 100644 index 83f0bd4..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProject.java +++ /dev/null @@ -1,425 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project; - -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.bundle.I18nBundle; -import org.nuiton.i18n.bundle.I18nBundleEntry; -import org.nuiton.i18n.bundle.I18nBundleUtil; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class AbstractI18nProject implements I18nProject { - - public static final String NAME_PROPERTY_NAME = "name"; - public static final String URLS_PROPERTY_NAME = "urls"; - public static final String STORE_PROJECT_PROPERTY_NAME = "storeProject"; - public static final String STORE_FILE_PROPERTY_NAME = "storeFile"; - public static final Locale[] EMPTY_LOCALE_ARRAY = new Locale[0]; - public static final String EMPTY_STRING = ""; - public static final String[] EMPTY_STRING_ARRAY = new String[0]; - public static final Log log = LogFactory.getLog(AbstractI18nProject.class); - /** le nom du projet */ - protected String name; - /** les urls des fichiers de traduction a charger */ - protected List<URL> urls; - /** les definitions de bundles du projet */ - protected I18nBundle[] i18nBundles; - /** le fichier où conserver le projet (si null, on ne persiste pas le projet) */ - protected File storeFile = new File(""); - /** un drapeau pour savoir si on persiste le projet */ - protected boolean storeProject; - /** un drapeau pour savoir si le modele a ete charge */ - boolean loaded; - /** Les locales selectionnees dans ce projet */ - protected List<Locale> selectedBundles; - /** les paquetages selectionnes dans ce projet */ - protected List<String> selectedPackages; - /** le dictionnaire des fichiers de traductions charges */ - protected Map<String, Properties> resources; - /** pour propager les changements du modele */ - protected PropertyChangeSupport pcs; - - protected AbstractI18nProject() { - resources = new LinkedHashMap<String, Properties>(); - selectedBundles = new ArrayList<Locale>(); - selectedPackages = new ArrayList<String>(); - pcs = new PropertyChangeSupport(this); - } - - @Override - public String getName() { - return name; - } - - @Override - public List<URL> getUrls() { - return urls; - } - - @Override - public boolean isStoreProject() { - return storeProject; - } - - @Override - public File getStoreFile() { - return storeFile; - } - - @Override - public void setName(String name) { - String oldValue = this.name; - this.name = name; - firePropertyChange(NAME_PROPERTY_NAME, oldValue, name); - } - - @Override - public void setUrls(List<URL> urls) { - this.urls = urls; - } - - @Override - public void setStoreProject(boolean storeProject) { - boolean oldValue = this.storeProject; - this.storeProject = storeProject; - firePropertyChange(STORE_PROJECT_PROPERTY_NAME, oldValue, storeProject); - } - - @Override - public void setStoreFile(File storeFile) { - File oldValue = this.storeFile; - this.storeFile = storeFile; - firePropertyChange(STORE_FILE_PROPERTY_NAME, oldValue, storeFile); - } - - @Override - public String[] getPackages() { - return I18nBundleUtil.getBundleNames(i18nBundles); - } - - @Override - public Locale[] getBundles() { - return I18nBundleUtil.getLocales(i18nBundles); - } - - @Override - public List<String> getSelectedPackages() { - return selectedPackages; - } - - @Override - public List<Locale> getSelectedBundles() { - return selectedBundles; - } - - @Override - public String[] getKeys() { - if (!loaded) { - return EMPTY_STRING_ARRAY; - } - - List<String> paquetages = getSelectedPackages(); - List<Locale> locales = getSelectedBundles(); - Set<String> keys = new HashSet<String>(); - - for (I18nBundle bundle : i18nBundles) { - if (paquetages.contains(bundle.getBundlePrefix())) { - for (I18nBundleEntry entry : bundle) { - if (!locales.contains(entry.getLocale())) { - continue; - } - Set<Object> keySet = resources.get(entry.getPath().toString()).keySet(); - for (Object object : keySet) { - keys.add(object.toString()); - } - } - } - } - List<String> r = new ArrayList<String>(keys); - return r.toArray(new String[r.size()]); - } - - @Override - public void deleteKey(String packageName, Locale locale, String key) { - checkLoaded(); - Properties resource = getResource(packageName, locale); - if (resource != null) { - resource.remove(key); - } - } - - @Override - public Map<Locale, String> getValues(String packageName, String key) { - if (!loaded) { - return null; - } - - List<String> paquetages = getSelectedPackages(); - - if (!paquetages.contains(packageName)) { - return null; - } - - Map<Locale, String> r = new LinkedHashMap<Locale, String>(); - - List<Locale> locales = getSelectedBundles(); - - I18nBundle bundle = getI18nBundle(packageName); - - for (I18nBundleEntry entry : bundle) { - Locale locale = entry.getLocale(); - if (!locales.contains(locale)) { - continue; - } - Properties resource = resources.get(entry.getPath().toString()); - if (resource.containsKey(key)) { - r.put(locale, resource.getProperty(key).toString()); - } - } - return r; - } - - @Override - public String getValue(String packageName, Locale locale, String key) { - if (!loaded) { - return EMPTY_STRING; - } - Properties resource = getResource(packageName, locale); - if (resource != null) { - Object object = resource.get(key); - return object.toString(); - } - return null; - - } - - @Override - public void addValue(String packageName, Locale locale, String key, String value) { - checkLoaded(); - Properties resource = getResource(packageName, locale); - if (resource != null) { - resource.put(key, value); - } - } - - @Override - public void updateValue(String packageName, Locale locale, String key, String value) { - checkLoaded(); - Properties resource = getResource(packageName, locale); - if (resource != null) { - resource.put(key, value); - } - } - - @Override - public void copyDefinitionTo(I18nProject project) { - // check we are on the same type of project - if (!getClass().equals(project.getClass())) { - throw new IllegalArgumentException("copyDefinitionTo method must use same project type, but was not! (required : " + getClass() + ", but find " + project.getClass() + 3); - } - project.setName(name); - project.setUrls(urls); - project.setStoreProject(storeProject); - // always clean storeFile (could be init in project from ui, but only keep it if necessary) - project.setStoreFile(storeProject ? storeFile : null); - } - - @Override - public void load() throws IOException { - try { - synchronized (this) { - resources.clear(); - selectedBundles.clear(); - selectedPackages.clear(); - - // detections des bundles i18n a partir des urls donnees - List<I18nBundle> tmp = I18nBundleUtil.detectBundles(urls.toArray(new URL[urls.size()])); - i18nBundles = tmp.toArray(new I18nBundle[tmp.size()]); - - selectedBundles.addAll(Arrays.asList(getBundles())); - selectedPackages.addAll(Arrays.asList(getPackages())); - - for (I18nBundle bundle : i18nBundles) { - for (I18nBundleEntry entry : bundle) { - URL path = entry.getPath(); - Properties properties = new Properties(); - entry.load(properties); - resources.put(path.toString(), properties); - } - } - } - } finally { - loaded = true; - } - } - - @Override - public void store() throws IOException { - checkLoaded(); - } - - @Override - public void saveDefinition() throws IOException { - Properties p = new Properties(); - fillDefinition(p); - FileOutputStream stream = null; - try { - stream = new FileOutputStream(getStoreFile()); - p.store(stream, "generated by " + getClass().getName()); - } finally { - if (stream != null) { - stream.close(); - } - } - - } - - @Override - public void fillDefinition(Properties p) { - p.setProperty("name", name); - p.setProperty("class", getClass().getName()); - StringBuilder buffer = new StringBuilder(); - for (URL u : urls) { - buffer.append(',').append(u.toString()); - } - p.setProperty("urls", buffer.substring(1)); - } - - @Override - public String toString() { - return super.toString() + "<name: " + name + ">"; - } - - @Override - public void addPropertyChangeListener(PropertyChangeListener listener) { - if (log.isDebugEnabled()) { - log.debug(this + " / " + listener); - } - pcs.addPropertyChangeListener(listener); - } - - @Override - public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { - if (log.isDebugEnabled()) { - log.debug(this + " / " + propertyName + " : " + listener); - } - pcs.addPropertyChangeListener(propertyName, listener); - } - - @Override - public void removePropertyChangeListener(PropertyChangeListener listener) { - if (log.isDebugEnabled()) { - log.debug(this + " / " + listener); - } - pcs.removePropertyChangeListener(listener); - } - - @Override - public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) { - if (log.isDebugEnabled()) { - log.debug(this + " / " + propertyName + " : " + listener); - } - pcs.removePropertyChangeListener(propertyName, listener); - } - - @Override - public void removePropertyChangeListeners() { - for (PropertyChangeListener l : pcs.getPropertyChangeListeners()) { - pcs.removePropertyChangeListener(l); - } - } - - @Override - public void fireAllProperties() { - firePropertyChange(NAME_PROPERTY_NAME, null, name); - firePropertyChange(URLS_PROPERTY_NAME, null, urls); - firePropertyChange(STORE_PROJECT_PROPERTY_NAME, null, storeProject); - firePropertyChange(STORE_FILE_PROPERTY_NAME, null, storeFile); - } - - @Override - protected void finalize() throws Throwable { - super.finalize(); - i18nBundles = null; - resources.clear(); - selectedBundles.clear(); - selectedPackages.clear(); - } - - protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) { - pcs.firePropertyChange(propertyName, oldValue, newValue); - } - - protected I18nBundle getI18nBundle(String packageName) { - if (i18nBundles != null) { - for (I18nBundle b : i18nBundles) { - if (b.getBundlePrefix().equals(packageName)) { - return b; - } - } - } - return null; - } - - protected I18nBundleEntry getI18nBundleEntry(String packageName, Locale locale) { - I18nBundle bundle = getI18nBundle(packageName); - if (bundle != null) { - for (I18nBundleEntry entry : bundle) { - if (locale.equals(entry.getLocale())) { - return entry; - } - } - } - return null; - } - - protected Properties getResource(String packageName, Locale locale) { - I18nBundleEntry entry = getI18nBundleEntry(packageName, locale); - if (entry != null) { - Properties resource = resources.get(entry.getPath().toString()); - return resource; - } - return null; - } - - protected void checkLoaded() throws IllegalStateException { - if (!loaded) { - throw new IllegalStateException("project was not loaded"); - } - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProjectProvider.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProjectProvider.java deleted file mode 100644 index b31d978..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/AbstractI18nProjectProvider.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package org.nuiton.i18n.editor.project; - -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import org.nuiton.i18n.I18n; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; - -/** - * - * @param <P> le type de projet supporte. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public abstract class AbstractI18nProjectProvider<P extends I18nProject> implements I18nProjectProvider<P> { - - public static final String CLASS_PARAMETER = "class"; - protected final Class<P> type; - protected final String label; - protected final String description; - protected Map<String, Class<?>> authorizedParameters; - - protected abstract Map<String, Class<?>> initAuthorizedParameters(); - - public AbstractI18nProjectProvider(Class<P> type, String label, String description) { - this.type = type; - this.label = label; - this.description = description; - } - - @Override - public Class<P> getType() { - return type; - } - - @Override - public String getLabel() { - return label; - } - - @Override - public String getDescription() { - return I18n.t(description); - } - - @Override - public Map<String, Class<?>> getAuthorizedParameters() { - if (authorizedParameters == null) { - this.authorizedParameters = Collections.unmodifiableMap(initAuthorizedParameters()); - } - return authorizedParameters; - } - - @Override - public P newProject(ProjectUIModel model) { - I18nProject project = model.getProject(); - P p = newProject(); - project.copyDefinitionTo(p); - return p; - } - - public <T> T getParameter(Class<T> returnType, String propertyName, Map<String, Object> parameters, boolean mustExist) { - Map<String, Class<?>> map = getAuthorizedParameters(); - // check name - if (!map.containsKey(propertyName)) { - throw new IllegalArgumentException("the property " + propertyName + " is unknown for this project.\nKnown parameters :" + map.keySet()); - } - // check type - Class<?> requiredType = map.get(propertyName); - if (!returnType.equals(requiredType) && !returnType.isAssignableFrom(requiredType)) { - throw new IllegalArgumentException("the property " + propertyName + " must be of the type " + requiredType + ", but was : " + requiredType); - } - - for (Entry<String, Object> e : parameters.entrySet()) { - if (propertyName.equals(e.getKey())) { - return (T) e.getValue(); - } - } - if (mustExist) { - throw new IllegalArgumentException("could not find property " + propertyName + ".\nKnown properties in :\n" + parameters.keySet()); - } - return null; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProject.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProject.java deleted file mode 100644 index a81c616..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProject.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project; - -import java.beans.PropertyChangeListener; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Properties; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public interface I18nProject { - - ///////////////////////////////////////////////////////////////////// - // definition accessor ////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - /** - * @return le nom du projet - */ - String getName(); - - /** - * @return les urls du projet - */ - List<URL> getUrls(); - - /** - * - * @return {@code true} si la definition du projet est persiste - */ - boolean isStoreProject(); - - /** - * - * @return le chemin du fichier ou persister la definition du projet - * - * Note : n'est pris en compte uniquement si {@link #isStoreProject()} est - * vrai. - */ - File getStoreFile(); - - ///////////////////////////////////////////////////////////////////// - // definition mutator ////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - void setName(String name); - - void setUrls(List<URL> urls); - - void setStoreProject(boolean storeProject); - - void setStoreFile(File storeFile); - - ///////////////////////////////////////////////////////////////////// - // runtime accessor ///////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - /** - * @return les paquetages du projet - */ - String[] getPackages(); - - /** - * @return les locales du projet - */ - Locale[] getBundles(); - - /** - * @return les paquetages selectionnes - */ - List<String> getSelectedPackages(); - - /** - * @return les locales selectionnees - */ - List<Locale> getSelectedBundles(); - - /** - * @return les clefs de traductions pour les packages selectionnee et les locales selectionnes - */ - String[] getKeys(); - - /** - * @param packageName - * @param key la clef de traductions - * @return les traductions pour les packages, locales et clef selectionnees - */ - Map<Locale, String> getValues(String packageName, String key); - - /** - * @param key la clef de traductions - * @param locale la locale - * @param packageName le nom du package - * @return les traductions - */ - String getValue(String packageName, Locale locale, String key); - - /** - * Copy roject definition to the given project. - * - * @param project the destination project - */ - void copyDefinitionTo(I18nProject project); - - /** - * Supprime une traduction pour une clef donnee dans une langue et un paquetage donne. - * - * @param packageName le paquetage ou supprimer la clef - * @param locale la locale de la traduction - * @param key la clef de traduction - */ - void deleteKey(String packageName, Locale locale, String key); - - /** - * Ajouter une traduction dans le projet. - * - * @param packageName le paquetage ou ajouter la clef - * @param locale la locale de la traduction - * @param key la clef de traduction - * @param value la traduction - */ - void addValue(String packageName, Locale locale, String key, String value); - - /** - * Mettre a jour une traduction dans le projet. - * - * @param packageName le paquetage ou ajouter la clef - * @param locale la locale de la traduction - * @param key la clef de traduction - * @param value la traduction - */ - void updateValue(String packageName, Locale locale, String key, String value); - - /** - * Chargement des traductions du projet. - * - * @throws IOException - */ - void load() throws IOException; - - /** - * Enregistrement des traductions du projet. - * - * @throws IOException - */ - void store() throws IOException; - - /** - * Sauvegarde la definition du projet. - * - * @throws IOException pour tout pb lors de la sauvegarde - */ - void saveDefinition() throws IOException; - - /** - * Remplit un dictionnaire avec les proprietes de la definition du projet. - * - * @param p le dictionnaire des proprietes de la definition du projet - */ - void fillDefinition(Properties p); - - ///////////////////////////////////////////////////////////////////// - // property change listeners //////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - void addPropertyChangeListener(PropertyChangeListener listener); - - void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); - - void removePropertyChangeListener(PropertyChangeListener listener); - - void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); - - void removePropertyChangeListeners(); - - void fireAllProperties(); - - -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectConfigurePanelUI.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectConfigurePanelUI.java deleted file mode 100644 index 4246c61..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectConfigurePanelUI.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project; - -import org.nuiton.i18n.editor.ui.project.*; -import jaxx.runtime.JAXXObject; - -/** - * Le contrat a respecter pour configurer un type de projet. - * - * @param <P> le type de projet - * - * @author Tony Chemit - chemit@codelutin.com - */ -public interface I18nProjectConfigurePanelUI<P extends I18nProject> extends JAXXObject { - - /** - * - * @return l'instance partagee du modele de creation de projet - */ - ProjectUIModel getModel(); - - P getProject(); -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectFactory.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectFactory.java deleted file mode 100644 index bd0543c..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectFactory.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashSet; -import java.util.Map; -import java.util.Properties; -import java.util.ServiceLoader; -import java.util.Set; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; - -/** - * L'usine de projets. - * - * @author Tony Chemit - chemit@codelutin.com - * @see I18nProject - * @see I18nProjectProvider - */ -public class I18nProjectFactory { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(I18nProjectFactory.class); - /** le cache des provideurs de projet. */ - protected static Set<I18nProjectProvider<?>> providers; - - /** - * Creer un projet a partir d'un dictionnaire de parametres. - * - * @param <P> le type de projet - * @param projectClass le type de la classe - * @param params le dictionnaire des paramètres pour créer le projet - * @return le projet instancie mais non ouvert. - */ - public static <P extends I18nProject> P newProject(Class<P> projectClass, Map<String, Object> params) { - I18nProjectProvider<P> provider = getProvider(projectClass); - if (provider == null) { - throw new IllegalArgumentException("could not provider for " + projectClass); - } - P result = provider.newProject(params); - return result; - } - - /** - * Creer un projet a partir de l'ui de creation de projet. - * - * @param <P> le type du projet - * @param projectClass le type du projet - * @param model le model de l'ui de creation de projet - * @return le projet instantie mais non ouvert - */ - public static <P extends I18nProject> P newProject(Class<P> projectClass, ProjectUIModel model) { - - I18nProjectProvider<P> provider = getProvider(projectClass); - if (provider == null) { - throw new IllegalArgumentException("could not provider for " + projectClass); - } - P result = provider.newProject(model); - return result; - } - - /** - * Creer un projet a partir d'un fichier de definition de projet. - * - * @param <P> le type du projet - * @param projectFile le fichier contenant la definition du projet - * @return le projet instantie mais non ouvert. - */ - public static <P extends I18nProject> P newProject(File projectFile) { - - FileInputStream stream = null; - try { - Properties p = new Properties(); - stream = new FileInputStream(projectFile); - try { - p.load(stream); - } finally { - stream.close(); - } - - String tmp = p.getProperty(AbstractI18nProjectProvider.CLASS_PARAMETER); - Class<? extends I18nProject> projectClass = (Class<? extends I18nProject>) Class.forName(tmp); - - I18nProjectProvider<P> provider = (I18nProjectProvider<P>) getProvider(projectClass); - if (provider == null) { - throw new IllegalArgumentException("could not provider for " + projectClass); - } - // validate definition - provider.validateDefinition(p); - // instanciate safe project - P result = provider.newProject(p); - result.setStoreFile(projectFile); - return result; - - } catch (Exception ex) { - throw new RuntimeException("could not load project for reason " + ex.getMessage(), ex); - } finally { - if (stream != null) { - try { - stream.close(); - } catch (IOException ex) { - throw new RuntimeException("could not close project for reason " + ex.getMessage(), ex); - } - } - } - - - } - - /** - * Recupere l'ensemble des provideurs de projet connus par le systeme. - * - * Note: pour ajouter de nouveaux types de projet, on utilise la mecanique - * de chargement de service de la jdk {@link ServiceLoader}. - * - * @return l'ensemble des provideurs de projet connus par le systeme. - * - */ - public static Set<I18nProjectProvider<?>> getProviders() { - if (providers == null) { - synchronized (I18nProjectProvider.class) { - discoverProviders(); - } - } - return providers; - } - - /** - * Recupere le provideur d'un type de projet donne. - * - * @param <P> le type de projet - * @param projectClass le type de projet - * @return le provideur pour le le type de projet donne, ou <code>null</code> - * si aucun provideur ne prend en charge ce type de projet. - */ - public static <P extends I18nProject> I18nProjectProvider<P> getProvider(Class<P> projectClass) { - - for (I18nProjectProvider<?> p : getProviders()) { - if (projectClass.equals(p.getType())) { - return (I18nProjectProvider<P>) p; - } - } - return null; - } - - /** - * Decouvrer les provideurs de projet via la mecanique {@link ServiceLoader} - * de la jdk - */ - protected static void discoverProviders() { - if (providers == null) { - providers = new HashSet<I18nProjectProvider<?>>(); - } else { - providers.clear(); - } - for (I18nProjectProvider<?> p : ServiceLoader.load(I18nProjectProvider.class)) { - log.info("loaded " + p); - providers.add(p); - } - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectProvider.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectProvider.java deleted file mode 100644 index fb86f8b..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/I18nProjectProvider.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project; - -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; - -/** - * Le contrat d'un provider du projet. - * - * @param <P> le type de projet connu par le provider. - * @author Tony Chemit - chemit@codelutin.com - */ -public interface I18nProjectProvider<P extends I18nProject> { - - /** - * - * @return le type du projet - */ - Class<P> getType(); - - /** - * - * @return le label du type de projet - */ - String getLabel(); - - /** - * - * @return la description de ce type de projet - */ - String getDescription(); - - /** - * - * @return le dictionnaire des paramètres autorisés pour ce type de projet - */ - Map<String, Class<?>> getAuthorizedParameters(); - - P newProject(); - /** - * - * @param params les paramètres pour instancier le projet - * @return le projet instancié (mais non chargé?) - */ - P newProject(Map<String, Object> params); - - /** - * - * @param model le model d'ui - * @return le projet instancié (mais non chargé?) - */ - P newProject(ProjectUIModel model); - - /** - * - * @param properties le model d'ui - * @return le projet instancié (mais non chargé?) - */ - P newProject(Properties properties); - - /** - * Decouvre et retourne tous les fichiers de traductions disponibles a - * partir du modele de cration de projet. - * - * @param model le modele a utiliser - * @return la liste des urls des fichiers de traductions trouves a partir - * du modele. - * @throws IOException pour toute erreur - */ - List<URL> detectBundles(ProjectUIModel model) throws IOException; - - /** - * - * @return le type de l'ui pour configurer ce type de projet - */ - Class<? extends I18nProjectConfigurePanelUI<?>> getUIClass(); - - /** - * Valide dans l'ui de creation de projet la partie specifique a - * ce type de projet. - * - * @param model le model a valider - * @return {@code true} si la partie specifique a ce type de projet - * est valide, {@code false} autrement. - */ - boolean validateUIModel(ProjectUIModel model); - - /** - * Valide un projet a partir de sa definition contenue dans un fichier de - * proprietes. - * - * Cette methode est appellee avant tout chargement de projet en memoire, - * afin de verifier la coherence du projet. - * - * @param properties les proprietes de la definition du projet - * @return {@code true} si le projet est valide. - */ - boolean validateDefinition(Properties properties); -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProject.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProject.java deleted file mode 100644 index aa7e280..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProject.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project.impl; - -import java.io.File; -import org.nuiton.i18n.editor.project.AbstractI18nProject; -import java.util.Properties; -import org.nuiton.i18n.editor.project.I18nProject; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class DirectoryI18nProject extends AbstractI18nProject { - - public static final String DIRECTORY_SOURCE_PROPERTY_NAME = "directorySource"; - /** la source pour un projet de type directory */ - protected File directorySource = new File(""); - - public DirectoryI18nProject() { - } - - public File getDirectorySource() { - return directorySource; - } - - public void setDirectorySource(File directorySource) { - File oldValue = this.directorySource; - this.directorySource = directorySource; - firePropertyChange(DIRECTORY_SOURCE_PROPERTY_NAME, oldValue, directorySource); - } - - @Override - public void fillDefinition(Properties p) { - super.fillDefinition(p); - p.setProperty(DIRECTORY_SOURCE_PROPERTY_NAME, directorySource.getAbsolutePath()); - } - - @Override - public void copyDefinitionTo(I18nProject project) { - super.copyDefinitionTo(project); - ((DirectoryI18nProject) project).setDirectorySource(directorySource); - } - - @Override - public void fireAllProperties() { - super.fireAllProperties(); - firePropertyChange(DIRECTORY_SOURCE_PROPERTY_NAME, null, directorySource); - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectConfigurePanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectConfigurePanelUI.jaxx deleted file mode 100644 index cb17763..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectConfigurePanelUI.jaxx +++ /dev/null @@ -1,95 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<Table fill='both' constraints='DirectoryI18nProject.class.getName()' - implements='org.nuiton.i18n.editor.project.I18nProjectConfigurePanelUI<DirectoryI18nProject>'> - -<import> -jaxx.runtime.SwingUtil - -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.project.I18nProject - -java.io.File - -</import> - - <script><![CDATA[ -protected ProjectUIModel model = getContextValue(ProjectUIModel.class); - -protected DirectoryI18nProject project = model.getProject(DirectoryI18nProject.class); - -@Override -public ProjectUIModel getModel() { - return model; -} - -@Override -public DirectoryI18nProject getProject() { - return project; - //I18nProject p = model.getProject(); - //if (p instanceof DirectoryI18nProject) { - // return (DirectoryI18nProject) p; - //} - //return null; -} - -public void chooseDirectorySource() { - File f = model.chooseDirectory( - this, - t("i18neditor.title.choose.directory.source"), - t("i18neditor.action.choose.directory.source.description"), - getProject().getDirectorySource()); - getProject().setDirectorySource(f); -} -]]> - </script> - - <row> - <cell columns="2"> - <JLabel text='i18neditor.createproject.name.label'/> - </cell> - </row> - <row> - <cell columns="2"> - <JTextField text='{SwingUtil.getStringValue(getProject().getName())}' - onKeyReleased='getProject().setName(((JTextField)event.getSource()).getText())'/> - </cell> - </row> - <row> - <cell columns="2"> - <JLabel text='i18neditor.createproject.directory.source.label'/> - </cell> - </row> - <row> - <cell weightx='1' fill="both"> - <JTextField id="directorySourceFile" - text='{SwingUtil.getStringValue(getProject().getDirectorySource()+"")}' - onKeyReleased='getProject().setDirectorySource(new File(((JTextField)event.getSource()).getText()))'/> - </cell> - <cell anchor="east"> - <JButton actionIcon="fileChooser" - onActionPerformed="chooseDirectorySource()"/> - </cell> - </row> -</Table> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectProvider.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectProvider.java deleted file mode 100644 index 95b13f5..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/DirectoryI18nProjectProvider.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project.impl; - -import java.io.File; -import java.io.IOException; -import org.nuiton.i18n.editor.project.AbstractI18nProjectProvider; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.TreeMap; -import org.nuiton.i18n.editor.project.I18nProjectConfigurePanelUI; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; -import org.nuiton.util.converter.ConverterUtil; - -import static org.nuiton.i18n.I18n.*; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class DirectoryI18nProjectProvider extends AbstractI18nProjectProvider<DirectoryI18nProject> { - - public DirectoryI18nProjectProvider() { - super(DirectoryI18nProject.class, - n("i18neditor.project.type.directory"), - n("i18neditor.project.type.directory.description") - ); - } - - @Override - protected Map<String, Class<?>> initAuthorizedParameters() { - Map<String, Class<?>> result = new TreeMap<String, Class<?>>(); - result.put(DirectoryI18nProject.NAME_PROPERTY_NAME, String.class); - result.put(DirectoryI18nProject.URLS_PROPERTY_NAME, List.class); - result.put(DirectoryI18nProject.DIRECTORY_SOURCE_PROPERTY_NAME, File.class); - return result; - } - - @Override - public DirectoryI18nProject newProject() { - return new DirectoryI18nProject(); - } - - @Override - public DirectoryI18nProject newProject(Map<String, Object> params) { - // mandatory parameters - String name = getParameter(String.class, DirectoryI18nProject.NAME_PROPERTY_NAME, params, true); - List<URL> urls = getParameter(List.class, DirectoryI18nProject.URLS_PROPERTY_NAME, params, true); - - // optional parameters - File directorySource = getParameter(File.class, DirectoryI18nProject.DIRECTORY_SOURCE_PROPERTY_NAME, params, false); - - DirectoryI18nProject p = new DirectoryI18nProject(); - p.setName(name); - p.setUrls(urls); - p.setDirectorySource(directorySource); - return p; - } - - @Override - public DirectoryI18nProject newProject(Properties properties) { - Map<String, Object> params = new TreeMap<String, Object>(); - String tmp; - - // name - tmp = properties.getProperty(DirectoryI18nProject.NAME_PROPERTY_NAME); - params.put(DirectoryI18nProject.NAME_PROPERTY_NAME, tmp); - - // urls - tmp = properties.getProperty(DirectoryI18nProject.URLS_PROPERTY_NAME); - String[] urlsStr = tmp.split(","); - List<URL> urls = new ArrayList<URL>(); - for (String u : urlsStr) { - URL url = ConverterUtil.convert(URL.class, u); - urls.add(url); - } - params.put(DirectoryI18nProject.URLS_PROPERTY_NAME, urls); - - // directorySource - tmp = properties.getProperty(DirectoryI18nProject.DIRECTORY_SOURCE_PROPERTY_NAME); - File directorySource = new File(tmp); - params.put(DirectoryI18nProject.DIRECTORY_SOURCE_PROPERTY_NAME, directorySource); - DirectoryI18nProject p = newProject(params); - return p; - } - - @Override - public List<URL> detectBundles(ProjectUIModel model) throws IOException { - //TODO - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean validateUIModel(ProjectUIModel model) { - DirectoryI18nProject project = (DirectoryI18nProject) model.getProject(); - return project.getDirectorySource() != null && project.getDirectorySource().exists() && project.getName() != null && !project.getName().isEmpty(); - } - - @Override - public boolean validateDefinition(Properties properties) { - //TODO - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public Class<? extends I18nProjectConfigurePanelUI<?>> getUIClass() { - return DirectoryI18nProjectConfigurePanelUI.class; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProject.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProject.java deleted file mode 100644 index ae02c70..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProject.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project.impl; - -import java.io.File; -import java.util.Properties; -import org.nuiton.i18n.editor.project.AbstractI18nProject; -import org.nuiton.i18n.editor.project.I18nProject; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class JarI18nProject extends AbstractI18nProject { - - public static final String JAR_SOURCE_PROPERTY_NAME = "jarSource"; - public static final String UNIQUE_JAR_DEFINITION_PROPERTY_NAME = "uniqueJarDefinition"; - /** la source pour un projet de type jar */ - protected File jarSource = new File(""); - /** - * un drapeau (pour les projets de type jar) pour savoir si on utilise le - * système i18n avec nom unique. - */ - protected boolean uniqueJarDefinition; - - public JarI18nProject() { - } - - public File getJarSource() { - return jarSource; - } - - public void setJarSource(File jarSource) { - File oldValue = this.jarSource; - this.jarSource = jarSource; - firePropertyChange(JAR_SOURCE_PROPERTY_NAME, oldValue, jarSource); - } - - public boolean isUniqueJarDefinition() { - return uniqueJarDefinition; - } - - public void setUniqueJarDefinition(boolean uniqueJarDefinition) { - boolean oldValue = this.uniqueJarDefinition; - this.uniqueJarDefinition = uniqueJarDefinition; - firePropertyChange(UNIQUE_JAR_DEFINITION_PROPERTY_NAME, oldValue, uniqueJarDefinition); - } - - @Override - public void fillDefinition(Properties p) { - super.fillDefinition(p); - p.setProperty(JAR_SOURCE_PROPERTY_NAME, jarSource.getAbsolutePath()); - p.setProperty(UNIQUE_JAR_DEFINITION_PROPERTY_NAME, Boolean.valueOf(uniqueJarDefinition).toString()); - } - - @Override - public void copyDefinitionTo(I18nProject project) { - super.copyDefinitionTo(project); - ((JarI18nProject) project).setJarSource(jarSource); - ((JarI18nProject) project).setUniqueJarDefinition(uniqueJarDefinition); - } - - @Override - public void fireAllProperties() { - super.fireAllProperties(); - firePropertyChange(JAR_SOURCE_PROPERTY_NAME, null, jarSource); - firePropertyChange(UNIQUE_JAR_DEFINITION_PROPERTY_NAME, null, uniqueJarDefinition); - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectConfigurePanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectConfigurePanelUI.jaxx deleted file mode 100644 index ba12b07..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectConfigurePanelUI.jaxx +++ /dev/null @@ -1,108 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<Table fill='both' constraints='JarI18nProject.class.getName()' - implements='org.nuiton.i18n.editor.project.I18nProjectConfigurePanelUI<JarI18nProject>'> - -<import> -jaxx.runtime.SwingUtil - -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.project.I18nProject - -java.io.File - -</import> - - <script><![CDATA[ - -protected ProjectUIModel model = getContextValue(ProjectUIModel.class); - -protected JarI18nProject project = model.getProject(JarI18nProject.class); - -@Override -public ProjectUIModel getModel() { - return model; -} - -@Override -public JarI18nProject getProject() { - return project; - //I18nProject p = model.getProject(); - //if (p instanceof JarI18nProject) { - // return (JarI18nProject) p; - //} - //return null; -} - -public void chooseJarSource() { - File f = model.chooseFile ( - this, - t("i18neditor.title.choose.jar.source"), - t("i18neditor.action.choose.jar.source"), - getProject().getJarSource(), - "^.+\\.jar$", - t("i18neditor.action.choose.jar.source.description")); - getProject().setJarSource(f); -} -]]> - </script> - - <row> - <cell columns="2"> - <JLabel text='i18neditor.createproject.name.label'/> - </cell> - </row> - <row> - <cell columns="2"> - <JTextField text='{SwingUtil.getStringValue(getProject().getName())}' - onKeyReleased='getProject().setName(((JTextField)event.getSource()).getText())'/> - </cell> - </row> - <row> - <cell columns="2"> - <JLabel text='i18neditor.createproject.jar.source.label'/> - </cell> - </row> - <row> - <cell weightx='1' fill="both"> - <JTextField id="jarSourceFile" - text='{SwingUtil.getStringValue(getProject().getJarSource()+"")}' - onKeyReleased='getProject().setJarSource(new File(((JTextField)event.getSource()).getText()))'/> - </cell> - <cell anchor="east"> - <JButton actionIcon="fileChooser" - onActionPerformed="chooseJarSource()"/> - </cell> - </row> - <row> - <cell columns="2"> - <JCheckBox id='uniqueJarDefinition' - text='i18neditor.createproject.uniqueJarDefinition' - toolTipText='i18neditor.createproject.uniqueJarDefinition.tip' - selected='{getProject().isUniqueJarDefinition()}' - onItemStateChanged='getProject().setUniqueJarDefinition(event.getStateChange() == ItemEvent.SELECTED)'/> - </cell> - </row> -</Table> - diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectProvider.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectProvider.java deleted file mode 100644 index 50a96a3..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/project/impl/JarI18nProjectProvider.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.project.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.I18n; -import org.nuiton.i18n.bundle.I18nBundleUtil; -import org.nuiton.i18n.editor.project.AbstractI18nProjectProvider; -import org.nuiton.i18n.editor.project.I18nProjectConfigurePanelUI; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; -import org.nuiton.util.converter.ConverterUtil; -import org.nuiton.util.Resource; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.TreeMap; - -/** - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class JarI18nProjectProvider extends AbstractI18nProjectProvider<JarI18nProject> { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(JarI18nProjectProvider.class); - - public JarI18nProjectProvider() { - super(JarI18nProject.class, - I18n.n("i18neditor.project.type.jar"), - I18n.n("i18neditor.project.type.jar.description")); - } - - @Override - protected Map<String, Class<?>> initAuthorizedParameters() { - Map<String, Class<?>> result = new TreeMap<String, Class<?>>(); - result.put(JarI18nProject.NAME_PROPERTY_NAME, String.class); - result.put(JarI18nProject.URLS_PROPERTY_NAME, List.class); - result.put(JarI18nProject.JAR_SOURCE_PROPERTY_NAME, File.class); - result.put(JarI18nProject.UNIQUE_JAR_DEFINITION_PROPERTY_NAME, Boolean.class); - return result; - } - - @Override - public JarI18nProject newProject() { - return new JarI18nProject(); - } - - @Override - public JarI18nProject newProject(Map<String, Object> params) { - - // mandatory parameters - String name = getParameter(String.class, JarI18nProject.NAME_PROPERTY_NAME, params, true); - List<URL> urls = getParameter(List.class, JarI18nProject.URLS_PROPERTY_NAME, params, true); - - // optional parameters - File jarSource = getParameter(File.class, JarI18nProject.JAR_SOURCE_PROPERTY_NAME, params, false); - Boolean uniqueJarDefinition = getParameter(Boolean.class, JarI18nProject.UNIQUE_JAR_DEFINITION_PROPERTY_NAME, params, false); - JarI18nProject p = new JarI18nProject(); - p.setName(name); - p.setUrls(urls); - p.setJarSource(jarSource); - p.setUniqueJarDefinition(uniqueJarDefinition != null && uniqueJarDefinition); - return p; - } - - @Override - public JarI18nProject newProject(Properties properties) { - Map<String, Object> params = new TreeMap<String, Object>(); - String tmp; - - // name - tmp = properties.getProperty(JarI18nProject.NAME_PROPERTY_NAME); - params.put(JarI18nProject.NAME_PROPERTY_NAME, tmp); - - // urls - tmp = properties.getProperty(JarI18nProject.URLS_PROPERTY_NAME); - String[] urlsStr = tmp.split(","); - List<URL> urls = new ArrayList<URL>(); - for (String u : urlsStr) { - URL url = ConverterUtil.convert(URL.class, u); - urls.add(url); - } - params.put(JarI18nProject.URLS_PROPERTY_NAME, urls); - - // jarSource - tmp = properties.getProperty(JarI18nProject.JAR_SOURCE_PROPERTY_NAME); - File jarSource = new File(tmp); - params.put(JarI18nProject.JAR_SOURCE_PROPERTY_NAME, jarSource); - - // uniqueJarDefinition - tmp = properties.getProperty(JarI18nProject.UNIQUE_JAR_DEFINITION_PROPERTY_NAME, "false"); - Boolean uniqueJarDefinition = Boolean.valueOf(tmp); - params.put(JarI18nProject.UNIQUE_JAR_DEFINITION_PROPERTY_NAME, uniqueJarDefinition); - - JarI18nProject p = newProject(params); - return p; - } - - @Override - public List<URL> detectBundles(ProjectUIModel model) throws IOException { - List<URL> urls = new ArrayList<URL>(); - JarI18nProject project = (JarI18nProject) model.getProject(); - URL source = project.getJarSource().toURI().toURL(); - URLClassLoader loader = new URLClassLoader(new URL[]{source}); - log.info("jar source : " + source); - if (project.isUniqueJarDefinition()) { - // on recherche l'unique bundle dans META-INF/ - List<URL> defs = Resource.getURLs("META-INF/.*-i18n-definition\\.properties", loader); - log.info("detected unique bundle definition " + defs); - if (!defs.isEmpty()) { - // on ne traite que le premier ??? - URL u = defs.get(0); - String path = u.toString(); - int index = path.lastIndexOf("/"); - path = path.substring(index + 1); - String bundleName = path.substring(0, path.length() - "-i18n-definition.properties".length()); - log.info("bundleName : " + bundleName); - urls = Resource.getURLs("META-INF/" + bundleName + "-.*\\.properties", loader); - urls.remove(u); - } - } else { - urls = Resource.getURLs(I18nBundleUtil.DIRECTORY_SEARCH_BUNDLE_PATTERN, loader); - log.info("detected bundles : " + urls); - } - return urls; - } - - @Override - public boolean validateUIModel(ProjectUIModel model) { - JarI18nProject project = (JarI18nProject) model.getProject(); - return project.getJarSource() != null && project.getJarSource().exists() && project.getName() != null && !project.getName().isEmpty(); - } - - @Override - public boolean validateDefinition(Properties properties) { - - // verifie que les proprietes sont presentes : - if (!properties.containsKey(CLASS_PARAMETER)) { - throw new IllegalStateException("could not find property " + CLASS_PARAMETER); - } - if (!properties.containsKey(JarI18nProject.NAME_PROPERTY_NAME)) { - throw new IllegalStateException("could not find property " + JarI18nProject.NAME_PROPERTY_NAME); - } - if (!properties.containsKey(JarI18nProject.URLS_PROPERTY_NAME)) { - throw new IllegalStateException("could not find property " + JarI18nProject.URLS_PROPERTY_NAME); - } - // verifie que les urls existent - String tmp = properties.getProperty(JarI18nProject.URLS_PROPERTY_NAME); - String[] urlsStr = tmp.split(","); - for (String u : urlsStr) { - int lastIndex = u.lastIndexOf("/"); - u = u.substring(0, lastIndex); - URL url = ConverterUtil.convert(URL.class, u); - // check if url is an existing file - log.info(url + " to check"); - } - return false; - } - - @Override - public Class<? extends I18nProjectConfigurePanelUI<?>> getUIClass() { - return JarI18nProjectConfigurePanelUI.class; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleCheckBoxMenuUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleCheckBoxMenuUI.jaxx deleted file mode 100644 index 843e33d..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleCheckBoxMenuUI.jaxx +++ /dev/null @@ -1,61 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JCheckBoxMenuItem id='content' text='{getBundle().getDisplayName()}' toolTipText='{t("i18neditor.bundle.name", getBundle().getDisplayName())}' onItemStateChanged='updateState(event)'> - - <import> -org.nuiton.i18n.editor.I18nEditorContext -java.util.Locale -jaxx.runtime.JAXXContext - -static org.nuiton.i18n.I18n.t - </import> - - <!-- le nom du bundle --> - <Locale id='bundle' javaBean='Locale.FRANCE'/> - - <script><![CDATA[ - -public BundleCheckBoxMenuUI(JAXXContext parentContext, Locale bundle, boolean selected) { - super(null, selected); - setContextValue(parentContext); - setBundle(bundle); -} - -protected void updateState(ItemEvent e) { - I18nEditorContext context = getContextValue(I18nEditorContext.class); - if (context == null) { - // pas encore de context (ui en construction) - return; - } - boolean selected = e.getStateChange() == ItemEvent.SELECTED; - if (selected) { - context.addSelectedBundle(bundle); - } else { - context.removeSelectedBundle(bundle); - } -} -]]> - </script> - -</JCheckBoxMenuItem> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.css deleted file mode 100644 index d95ab1e..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.css +++ /dev/null @@ -1,52 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -JToolBar { - borderPainted:false; - floatable:false; - opaque:false; -} - -#reset { - actionIcon:"cancel"; - toolTipText:"i18neditor.action.reset.value.tip"; - enabled:{isModified()}; -} -#delete{ - actionIcon:"delete"; - toolTipText:"i18neditor.action.delete.key.tip"; -} -#save { - actionIcon:"save"; - toolTipText:"i18neditor.action.save.value.tip"; - enabled:{isModified()}; -} - -#label { - text:{updateLabel(getBundle())}; -} - -#editorPane { - columnHeaderView:{toolbar}; -} - -#editor { - wrapStyleWord:true; - lineWrap:true; - text:{SwingUtil.getStringValue(getInitialValue())}; -} \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.jaxx deleted file mode 100644 index a5ec606..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValueUI.jaxx +++ /dev/null @@ -1,91 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JPanel layout='{new BorderLayout()}'> - - <import> -java.util.Locale -jaxx.runtime.SwingUtil - -org.nuiton.i18n.editor.I18nEditorContext - -static org.nuiton.i18n.I18n.t - </import> - - <!-- la locale --> - <Locale id='bundle' javaBean='null'/> - - <!-- le nom du package --> - <String id='packageName' javaBean='null'/> - - <!-- la clef --> - <String id='key' javaBean='null'/> - - <!-- la valeur initiale --> - <String id='initialValue' javaBean='null'/> - - <Boolean id='modified' javaBean='Boolean.FALSE'/> - - <script><![CDATA[ - -protected I18nEditorUIHandler handler = getContextValue(I18nEditorUIHandler.class); -protected I18nEditorContext context = getContextValue(I18nEditorContext.class); - -public void updateValue(String newValue) { - if (initialValue.equals(newValue)) { - // valeur non changee - return; - } - setModified(true); -} - -protected String updateLabel(Locale l) { - String result = null; - if (l != null) { - result = t("i18neditor.bundle.name", l.getDisplayName()); - } - return result; -} - -protected String getValue() { - return editor.getText(); -} -]]> - </script> - - <JToolBar id='toolbar'> - - <JLabel id='label'/> - - <javax.swing.Box.Filler constructorParams='SwingUtil.newMinDimension(), SwingUtil.newMinDimension(), SwingUtil.newMaxXDimension()'/> - - <JButton id='delete' onActionPerformed='handler.deleteSelectedValueForLocale(context, this, packageName, bundle, key)'/> - <JButton id='reset' onActionPerformed='String t = initialValue; initialValue=null; setInitialValue(t);setModified(false);'/> - <JButton id='save' onActionPerformed='handler.updateSelectedValue(context, packageName, bundle, key, getValue()); initialValue = getValue();setModified(false);'/> - </JToolBar> - - <JScrollPane id='editorPane' constraints='BorderLayout.CENTER'> - <JTextArea id='editor' - onKeyReleased='updateValue(((JTextArea) event.getSource()).getText())'/> - </JScrollPane> -</JPanel> \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx deleted file mode 100644 index f1ac558..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/BundleValuesUI.jaxx +++ /dev/null @@ -1,68 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<org.jdesktop.swingx.JXTitledPanel id='content' - title='{updateTitle(getPackageName())}'> - -<import> -java.util.List -java.util.Locale - -java.awt.Dimension - -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.project.I18nProject -org.nuiton.i18n.editor.project.AbstractI18nProject - -static org.nuiton.i18n.I18n.t -</import> - - <!-- les locales --> - <List id='bundles' javaBean='null' genericType='Locale'/> - - <!-- le nom du package --> - <String id='packageName' javaBean='null'/> - - <!-- le nom de la cef --> - <String id='key' javaBean='null'/> - - <script><![CDATA[ -protected String updateTitle(String l) { - String result = ""; - if (l != null) { - int index = l.lastIndexOf("/"); - if (index > -1) { - l = l.substring(index + 1); - } - result = t("i18neditor.package.name", l); - } - return result; -} -]]> - </script> - <JPanel id='bundlesContent' - layout='{new GridLayout(0,1)}' - border='{BorderFactory.createTitledBorder((String)null)}' - preferredSize='{new Dimension(-1, 150)}'/> -</org.jdesktop.swingx.JXTitledPanel> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.css deleted file mode 100644 index 6894a10..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.css +++ /dev/null @@ -1,43 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -#countryLabel { - text:"i18neditor.createbundle.newlocale"; - labelFor:{country}; -} - -#languageLabel { - text:"i18neditor.createbundle.newlanguage"; - labelFor:{language}; -} - -#label { - text:"i18neditor.createbundle.label"; -} -#buttonCancel { - text:"i18neditor.action.cancel"; -} - -#buttonCreate{ - text:"i18neditor.action.create"; -} - -#main { - title:"i18neditor.createbundle.title"; - modal:true; -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx deleted file mode 100644 index e751cd1..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreateBundleUI.jaxx +++ /dev/null @@ -1,84 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JDialog id='main'> - -<import> -java.util.Locale -java.awt.Color - -org.nuiton.i18n.editor.I18nEditorContext - -static org.nuiton.i18n.I18n.t -</import> - - <String id='bundle'/> - <script><![CDATA[ -public boolean acceptLocale(Locale l, String expected) { - return l !=null && l.toString().equals(expected); -} - -public I18nEditorUIHandler getHandler() { - return getContextValue(I18nEditorUIHandler.class); -} - -protected I18nEditorContext getContext() { - return I18nEditorContext.get(); -} - -void $afterCompleteSetup() { - - //getBroker().setHandler(getHandler()); -} -]]> - </script> - <JPanel layout='{new BorderLayout()}'> - <JPanel constraints='BorderLayout.NORTH' background='{Color.WHITE}'> - <JLabel id='label'/> - </JPanel> - - <Table fill="both" constraints='BorderLayout.CENTER'> - <row weightx="1" weighty="1"> - <cell> - <JLabel id='languageLabel'/> - </cell> - <cell> - <jaxx.runtime.swing.editor.EnumEditor id='language' constructorParams='org.nuiton.i18n.LanguageEnum.class'/> - </cell> - </row> - <row weightx="1" weighty="1"> - <cell> - <JLabel id='countryLabel'/> - </cell> - <cell> - <jaxx.runtime.swing.editor.EnumEditor id='country' constructorParams='org.nuiton.i18n.CountryEnum.class'/> - </cell> - </row> - </Table> - - <JPanel constraints='BorderLayout.SOUTH' layout='{new GridLayout()}'> - <JButton id='buttonCancel' onActionPerformed='bundle = null;dispose();'/> - <JButton id='buttonCreate' onActionPerformed='getContext().createBundle(bundle = language.getSelectedItem() + "_" + country.getSelectedItem());dispose();'/> - </JPanel> - </JPanel> -</JDialog> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.css deleted file mode 100644 index 2722155..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.css +++ /dev/null @@ -1,40 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - -#packageLabel { - text:"i18neditor.createpackage.newpackage"; - labelFor:{packageName}; -} - -#label { - text:"i18neditor.createpackage.label"; -} - -#buttonCancel { - text:"i18neditor.action.cancel"; -} - -#buttonCreate{ - text:"i18neditor.action.create"; -} - -#main { - title:"i18neditor.createpackage.title"; - modal:true; -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx deleted file mode 100644 index 6992e29..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/CreatePackageUI.jaxx +++ /dev/null @@ -1,77 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JDialog id='main'> - -<import> -java.util.Locale -java.awt.Color - -org.nuiton.i18n.editor.I18nEditorContext - -static org.nuiton.i18n.I18n.t -</import> - - <String id='bundle'/> - <script><![CDATA[ - -public boolean acceptLocale(Locale l, String expected) { - return l !=null && l.toString().equals(expected); -} - -public I18nEditorUIHandler getHandler() { - return getContextValue(I18nEditorUIHandler.class); -} - -protected I18nEditorContext getContext() { - return I18nEditorContext.get(); -} - -void $afterCompleteSetup() { - - //getBroker().setHandler(getHandler()); -} -]]> - </script> - <JPanel layout='{new BorderLayout()}'> - <JPanel constraints='BorderLayout.NORTH' background='{Color.WHITE}'> - <JLabel id='label'/> - </JPanel> - - <Table fill="both" constraints='BorderLayout.CENTER'> - <row weightx="1" weighty="1"> - <cell> - <JLabel id='packageLabel'/> - </cell> - <cell> - <JTextField id='packageName'/> - </cell> - </row> - </Table> - - <JPanel constraints='BorderLayout.SOUTH' layout='{new GridLayout()}'> - <JButton id='buttonCancel' onActionPerformed='bundle = null;dispose();'/> - <JButton id='buttonCreate' onActionPerformed='getContext().createPackage(bundle = packageName.getText());dispose();'/> - </JPanel> - </JPanel> -</JDialog> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.css deleted file mode 100644 index 3b92b28..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.css +++ /dev/null @@ -1,260 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* -*/ - -JToolBar { - borderPainted:false; - floatable:false; - opaque:false; -} - -JSplitPane { - oneTouchExpandable:true; - continuousLayout:true; - dividerSize:6; -} - -#mainFrame { - defaultCloseOperation:"do_nothing_on_close"; - title:{updateTitle(context.getProject())}; -/*iconImage:{createImageIcon("logo-OT_web.png").getImage()};*/ -} - -#menu { - _help:{"ui.main.menu"}; -} - -#menuFile { - text:"i18neditor.main.menu.file"; - mnemonic:F; - _help:{"ui.main.menu.file"}; -} - -#menuFileConfiguration { - text:"i18neditor.action.configuration"; - toolTipText:"i18neditor.action.configuration.tip"; - actionIcon:"config"; - mnemonic:C; - _help:{"ui.main.menu.file.configuration"}; -} - -#menuFileEditProject { - text:"i18neditor.action.editProject"; - actionIcon:"edit"; - enabled:{context.getProject() != null}; -} - -#menuFileCreateProject { - text:"i18neditor.action.createProject"; - actionIcon:"add"; - enabled:{context.getProject() == null}; -} - -#menuFileOpenProject { - text:"i18neditor.action.openProject"; - actionIcon:"open"; - enabled:{context.getProject() == null}; -} - -#menuFileOpenProjectOther{ - text:"i18neditor.action.openOtherProject"; - actionIcon:"open"; -} - -#menuFileDeleteProject{ - text:"i18neditor.action.deleteProject"; - actionIcon:"delete"; -} - -#menuFileCloseProject { - text:"i18neditor.action.closeProject"; - actionIcon:"close"; - enabled:{context.getProject() != null}; -} -#menuFileStore { - text:"i18neditor.menu.storeall"; - actionIcon:"save"; - enabled:{context.getProject() != null}; -} - -#menuFileFullscreen { - text:"i18neditor.action.fullscreen"; - toolTipText:"i18neditor.action.fullscreen.tip"; - actionIcon:"fullscreen"; - mnemonic:P; - visible:{!isUndecorated()}; -_help:{"ui.main.menu.file.fullscreen"}; -} - -#menuFileNormalscreen { - text:"i18neditor.action.normalscreen"; - toolTipText:"i18neditor.action.normalscreen.tip"; - actionIcon:"leave-fullscreen"; - mnemonic:N; - visible:{isUndecorated()}; -_help:{"ui.main.menu.file.leave-fullscreen"}; -} - -#menuFileQuit{ - text:"i18neditor.action.exit"; - toolTipText:"i18neditor.action.exit.tip"; - actionIcon:"exit"; - mnemonic:X; - _help:{"ui.main.menu.file.exit"}; -} - -#menuPackages { - text:"i18neditor.menu.packages" ; - mnemonic:P; - enabled:{context.getProject() != null}; -} - -#menuPackagesCreate { - text:"i18neditor.action.new.package" ; - actionIcon:"add"; - mnemonic:N; -} - -#menuBundles { - text:"i18neditor.menu.bundles"; - mnemonic:B; - enabled:{context.getProject() != null}; -} - -#menuBundlesCreate { - text:"i18neditor.action.new.bundle" ; - actionIcon:"add"; - mnemonic:N; -} - - -#menuHelp{ - text:"i18neditor.menu.help"; - mnemonic:e; - _help:{"ui.main.menu.help"}; -} - -#menuHelpHelp{ - text:"i18neditor.action.help"; - toolTipText:"i18neditor.action.help.tip"; - actionIcon:"help"; - mnemonic:e; - _help:{"ui.main.menu.help.help"}; -} - -#menuHelpSite{ - text:"i18neditor.action.site"; - toolTipText:"i18neditor.action.site.tip"; - actionIcon:"site"; - mnemonic:s; - _help:{"ui.main.menu.help.site"}; -} - -#menuHelpAbout{ - text:"i18neditor.action.about"; - toolTipText:"i18neditor.action.about.tip"; - actionIcon:"about"; - mnemonic:A; - _help:{"ui.main.menu.help.about"}; -} - -#showHelp{ - toolTipText:"i18neditor.action.showHelp.tip"; - actionIcon:"show-help"; - borderPainted:false; - visible:true; -} - -#showProjectInfo { - actionIcon:"information"; - toolTipText:"i18neditor.project.info.tip"; - borderPainted:false; - rolloverEnabled:false; -} - -#closeTab{ - actionIcon:"closeTab"; - borderPainted:false; - rolloverEnabled:false; - focusable:false; - toolTipText:"i18neditor.action.quitHelp.tip"; - _help:{"ui.main.body.help.closeTab"}; -} - -#keysView{ - _help:{"ui.main.body.view.keys"}; -} - -#valuesView{ - _help:{"ui.main.body.view.values"}; -} - -#splitpane{ - orientation:{JSplitPane.HORIZONTAL_SPLIT}; -_help:{"ui.main.body.db"}; -/*resizeWeight:1.0;*/ -} - -#toolbar{ - _help:{"ui.main.toolbar"}; -} - -#treeToolBar{ - enabled:{context.getProject() != null}; -} - -#toTreeMode { - - buttonGroup:"treeModelMode"; - text:{TreeModelMode.TREE.toString()}; -enabled:{context.getProject() != null}; -selected:{context.getTreeModelMode() == TreeModelMode.TREE}; -value:{TreeModelMode.TREE}; -} - -#toFlatMode { - buttonGroup:"treeModelMode"; - text:{TreeModelMode.FLAT.toString()}; -enabled:{context.getProject() != null}; -selected:{context.getTreeModelMode() == TreeModelMode.FLAT}; -value:{TreeModelMode.FLAT}; -} - -#collapseAll { - actionIcon:"collapseAll"; - enabled:{context.getProject() != null && context.getSelectedKey() != null}; -} - -#expandAll{ - actionIcon:"expandAll"; - enabled:{context.getProject() != null && context.getSelectedKey() != null}; -} - -#keysView { - columnHeaderView:{treeToolBar}; -} - -#tree{ - showsRootHandles:false; - rootVisible:false; - selectionModel:{treeSelectionModel}; -} - -#valuesView { - horizontalScrollBarPolicy:horizontal_scrollbar_never; -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx deleted file mode 100644 index 905a471..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUI.jaxx +++ /dev/null @@ -1,357 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JFrame id='mainFrame' implements='PropertyChangeListener' - width='800' - height='800' - onWindowClosing='handler.close(context)' - undecorated='{config.isFullScreen()}'> - -<import> -java.beans.PropertyChangeEvent -java.beans.PropertyChangeListener - -jaxx.runtime.SwingUtil -javax.swing.tree.* -java.util.Locale -org.nuiton.i18n.editor.I18nEditorContext -org.nuiton.i18n.editor.I18nEditorConfig -org.nuiton.i18n.editor.project.I18nProject - -javax.swing.SwingUtilities -javax.swing.tree.TreePath -javax.swing.tree.DefaultTreeCellRenderer -javax.swing.event.TreeSelectionEvent -javax.swing.event.TreeSelectionListener -javax.swing.tree.TreeNode -java.awt.Component - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ -protected I18nEditorUIHandler handler = getContextValue(I18nEditorUIHandler.class); -protected I18nEditorConfig config = getContextValue(I18nEditorConfig.class); -protected I18nEditorContext context = getContextValue(I18nEditorContext.class); - -@Override -public void propertyChange(PropertyChangeEvent evt) { - String name = evt.getPropertyName(); - if (log.isDebugEnabled()) { - log.debug(name+" <old:"+evt.getOldValue()+" - new:"+evt.getNewValue()+">"); - } -// log.info(name+" <old:"+evt.getOldValue()+" - new:"+evt.getNewValue()+">"); - if (I18nEditorContext.SELECTED_KEY_PROPERTY.equals(name)) { - // mise a jour du menu packages - String newValue = (String) evt.getNewValue(); - handler.reloadValues(this, newValue); - selectKeyInTree(newValue); - return; - } - if (I18nEditorContext.PROJECT_PROPERTY.equals(name)) { - I18nProject newValue = (I18nProject) evt.getNewValue(); - I18nProject oldValue = (I18nProject) evt.getOldValue(); - if (newValue != null) { - handler.openProjectUI( this, newValue); - } else { - handler.closeProjectUI( this, oldValue); - } - return; - } - if (I18nEditorContext.SELECTED_BUNDLES_PROPERTY.equals(name)) { - context.saveSelectedKey(); - handler.reloadKeys(this); - handler.reloadValues(this); - return; - } - if (I18nEditorContext.SELECTED_PACKAGES_PROPERTY.equals(name)) { - context.saveSelectedKey(); - handler.reloadKeys(this); - handler.reloadValues(this); - return; - } - if (I18nEditorContext.TREE_MODEL_MODE_PROPERTY.equals(name)) { - handler.reloadKeys(this); - handler.reloadValues(this); - return; - } - if (jaxx.runtime.swing.editor.I18nEditor.SELECTED_LOCALE_PROPERTY.equals(name)) { - // mise a jour du menu packages - Locale newValue = (Locale) evt.getNewValue(); - handler.changeLanguage(context, newValue); - return; - } - if ("projects".equals(name)) { - // mise a jour du menu projects - handler.updateProjectsMenuUI(context); - return; - } -} - -public String updateTitle(I18nProject p) { - String txt = null; - if (p==null) { - txt = t("i18neditor.title.noproject"); - } else { - txt = t("i18neditor.title", p.getName() + " - " + p.getStoreFile()); - } - return txt; -} -public void updateSelectedKey(PropertieNode node) { - String key = null; - if (node == null && !treeSelectionModel.isSelectionEmpty()) { - node = (PropertieNode) tree.getSelectionPath().getLastPathComponent(); - } - if (node != null) { - key = node.getUserObject().toString(); - } - log.debug(node + " : " + key); - context.setSelectedKey(key); -} - -public void selectKeyInTree(final String selectedKey) { - - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - log.debug("selectKeyInTree ==========================================================="); - if (selectedKey == null) { - // pas de clef selectionnee - log.debug("no key to select (selectedKey null or not in model)!"); - if (!treeSelectionModel.isSelectionEmpty()) { - // on vide la selection dans l'arbre - treeSelectionModel.clearSelection(); - } - return; - } - log.debug("reselected key " + selectedKey); - PropertieNode selectedNode = treeModel.getNode(selectedKey); - log.debug("reselected node " + selectedNode); - TreePath path = new TreePath(treeModel.getPathToRoot(selectedNode)); - log.debug("reselected path " + path); - tree.setSelectionPath(path); - tree.scrollPathToVisible(path); - TreePath leadSelectionPath = treeSelectionModel.getLeadSelectionPath(); - log.debug("new selected path " + leadSelectionPath); - log.debug("selectKeyInTree ==========================================================="); - } - }); -} - -public void collapseAll(final PropertieNode node) { - if (node != null) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - TreePath path = new TreePath(treeModel.getPathToRoot(node)); - if (path != null) { - tree.collapsePath(path); - //TODO faire un collapse recursive - } - } - }); - } -} - -public void expandAll(final PropertieNode node) { - if (node != null) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - TreePath path = new TreePath(treeModel.getPathToRoot(node)); - if (path != null) { - tree.expandPath(path); - //TODO faire un expand recursive - } - } - }); - } -} - -public I18nEditorContext getContext() { - return context; -} - -@Override -public void dispose() { - super.dispose(); - context.removePropertyChangeListener(I18nEditorContext.SELECTED_PACKAGES_PROPERTY, this); - context.removePropertyChangeListener(I18nEditorContext.SELECTED_BUNDLES_PROPERTY, this); - context.removePropertyChangeListener(I18nEditorContext.SELECTED_KEY_PROPERTY, this); - context.removePropertyChangeListener(I18nEditorContext.PROJECT_PROPERTY, this); - context.removePropertyChangeListener(I18nEditorContext.TREE_MODEL_MODE_PROPERTY, this); - context.removePropertyChangeListener("projects", this); - context.removePropertyChangeListener(this); -} - -// register listeners -changeI18n.addPropertyChangeListener(jaxx.runtime.swing.editor.I18nEditor.SELECTED_LOCALE_PROPERTY, this); -context.addPropertyChangeListener(I18nEditorContext.SELECTED_PACKAGES_PROPERTY, this); -context.addPropertyChangeListener(I18nEditorContext.SELECTED_BUNDLES_PROPERTY, this); -context.addPropertyChangeListener(I18nEditorContext.SELECTED_KEY_PROPERTY, this); -context.addPropertyChangeListener(I18nEditorContext.PROJECT_PROPERTY, this); -context.addPropertyChangeListener(I18nEditorContext.TREE_MODEL_MODE_PROPERTY, this); -context.addPropertyChangeListener("projects", this); - -treeSelectionModel.addTreeSelectionListener(new TreeSelectionListener() { - - @Override - public void valueChanged(TreeSelectionEvent e) { - TreePath path = e.getPath(); - TreeNode node = (TreeNode) path.getLastPathComponent(); - log.debug(path + " " + node.isLeaf()); - if (!node.isLeaf() && !tree.isExpanded(path)) { - // expand the node to avoid a click :) - log.info("expand path " + path); - tree.expandPath(path); - } - } -}); - -// register help broker -//broker.setHandler(handler); - -]]> - </script> - <JMenuBar> - <JMenu id='menuFile'> - <JMenuItem id='menuFileConfiguration' onActionPerformed="handler.showConfig(context)"/> - <JMenuItem id="menuFileCreateProject" onActionPerformed="handler.createProject(context)"/> - <JMenuItem id="menuFileEditProject" onActionPerformed="handler.editProject(context)"/> - <JMenu id="menuFileOpenProject"> - <JMenuItem id="menuFileOpenProjectOther" - onActionPerformed="handler.openOtherProject(context)" - _doNotRemove='Boolean.TRUE'/> - <JMenuItem id="menuFileDeleteProject" - onActionPerformed="handler.deleteProject(context)" - _doNotRemove='Boolean.TRUE'/> - <JSeparator/> - </JMenu> - - <JMenuItem id="menuFileStore" onActionPerformed="context.store()"/> - <JMenuItem id="menuFileCloseProject" onActionPerformed="handler.closeProject(context, context.getProject())"/> - <JSeparator/> - <JMenuItem id='menuFileFullscreen' onActionPerformed="handler.changeScreen(context, true)"/> - <JMenuItem id='menuFileNormalscreen' onActionPerformed="handler.changeScreen(context, false)"/> - <JSeparator/> - <JMenuItem id="menuFileQuit" onActionPerformed="handler.close(context)"/> - </JMenu> - <JMenu id='menuPackages'> - <JMenuItem id="menuPackagesCreate" onActionPerformed="handler.createPackage(context)"/> - <JSeparator/> - </JMenu> - <JMenu id='menuBundles'> - <JMenuItem id="menuBundlesCreate" onActionPerformed="handler.createBundle(context)"/> - <JSeparator/> - </JMenu> - <JMenu id='menuHelp'> - <JMenuItem id='menuHelpHelp' onActionPerformed="handler.showHelp(context, null)"/> - <JMenuItem id='menuHelpSite' onActionPerformed="handler.gotoSite(context)"/> - <JMenuItem id='menuHelpAbout' onActionPerformed="handler.showAbout(context)"/> - </JMenu> - <JToolBar id='toolbar' _help='"ui.main.toolbar"'> - - <JButton id='showHelp'/> - - <javax.swing.Box.Filler constructorParams='SwingUtil.newMinDimension(), SwingUtil.newMinDimension(), SwingUtil.newMaxXDimension()'/> - <JSeparator orientation='vertical'/> - <JButton id='showProjectInfo' onActionPerformed='handler.showStorageInfo(context)'/> - - <jaxx.runtime.swing.editor.I18nEditor id='changeI18n' - opaque='false' - showText='false' - locales='{java.util.Arrays.asList(org.nuiton.i18n.I18n.getStore().getLocales())}' - selectedLocale='{config.getLocale()}'/> - </JToolBar> - </JMenuBar> - - <ButtonGroup id='treeModelMode' - onStateChanged='handler.changeTreeModelMode(context, (TreeModelMode) treeModelMode.getSelectedValue())'/> - - <JToolBar id='treeToolBar'> - <JToggleButton id='toTreeMode'/> - <JToggleButton id='toFlatMode'/> - <JSeparator orientation='vertical'/> - <javax.swing.Box.Filler constructorParams='SwingUtil.newMinDimension(), SwingUtil.newMinDimension(), SwingUtil.newMaxXDimension()'/> - <JButton id='collapseAll' onActionPerformed='collapseAll((PropertieNode)tree.getSelectionPath().getLastPathComponent())'/> - <JButton id='expandAll' onActionPerformed='expandAll((PropertieNode)tree.getSelectionPath().getLastPathComponent())'/> - </JToolBar> - - <PropertiesTreeModel id='treeModel' mode='{context.getTreeModelMode()}'/> - - <javax.swing.tree.DefaultTreeSelectionModel id='treeSelectionModel'/> - <!--onValueChanged='updateSelectedKey((PropertieNode) tree.getSelectionValue())'/--> - - <JSplitPane id='splitpane' constraints="BorderLayout.CENTER"> - - <!-- left : bundles keys --> - - <!--JScrollPane id='keysView' columnHeaderView='{treeToolBar}'--> - <JScrollPane id='keysView'> - <JTree id="tree" constructorParams='treeModel' - onKeyReleased='updateSelectedKey((PropertieNode) tree.getSelectionPath().getLastPathComponent())' - onMouseClicked='updateSelectedKey((PropertieNode) tree.getSelectionPath().getLastPathComponent())' - cellRenderer='{ - new DefaultTreeCellRenderer() { - private static final long serialVersionUID=1L; - - @Override - public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { - PropertieNode n = (PropertieNode) value; - if (n != null) { - String text = n.toString(); - switch(getTreeModel().getMode()) { - case TREE: - if (!n.isRoot()) { - int lastSeparator = text.lastIndexOf("."); - text = text.substring(lastSeparator + 1); - } - break; - case FLAT: - break; - } - value = text; - } - return super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); - } - - } - }'/> - </JScrollPane> - - - <!-- right : bundles values (for the selected key) --> - - <!--JScrollPane id='valuesView' horizontalScrollBarPolicy="horizontal_scrollbar_never"--> - <JScrollPane id='valuesView'> - <JPanel id="values" layout='{new GridLayout(0,1)}'/> - </JScrollPane> - - </JSplitPane> - - <!-- status message bar --> - <jaxx.runtime.swing.StatusMessagePanel id='status' - _help='"ui.main.statusBar"' - constraints="BorderLayout.SOUTH"/> - -</JFrame> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUIHandler.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUIHandler.java deleted file mode 100644 index 9d7c1f6..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/I18nEditorUIHandler.java +++ /dev/null @@ -1,967 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.ui; - -import jaxx.runtime.JAXXContext; -import jaxx.runtime.context.DefaultApplicationContext.AutoLoad; -import jaxx.runtime.swing.AboutPanel; -import jaxx.runtime.swing.config.ConfigUIHelper; -import jaxx.runtime.swing.config.model.ConfigUIModel; -import jaxx.runtime.swing.config.model.ConfigUIModelBuilder; -import jaxx.runtime.swing.wizard.WizardUILancher; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.I18n; -import org.nuiton.i18n.editor.I18nEditorConfig; -import org.nuiton.i18n.editor.I18nEditorContext; -import org.nuiton.i18n.editor.project.I18nProject; -import org.nuiton.i18n.editor.project.I18nProjectFactory; -import org.nuiton.i18n.editor.project.I18nProjectProvider; -import org.nuiton.i18n.editor.ui.project.ProjectStep; -import org.nuiton.i18n.editor.ui.project.ProjectUI; -import org.nuiton.i18n.editor.ui.project.ProjectUIModel; - -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import java.awt.Component; -import java.awt.Container; -import java.awt.Desktop; -import java.awt.event.ActionEvent; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; - -import static org.nuiton.i18n.I18n.t; -import static org.nuiton.i18n.I18n.n; -import static org.nuiton.i18n.editor.I18nEditorConfig.Option; - -/** @author Tony Chemit - chemit@codelutin.com */ -@AutoLoad -public class I18nEditorUIHandler { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(I18nEditorUIHandler.class); - - /** - * Methode pour initialiser l'ui principale sans l'afficher. - * - * Si un projet est charge dans le context, alors on le charge dans l'ui. - * - * @param context le context applicatif - * @param fullscreen flag pour indiquer si on doit ouvrir l'ui en model console (pleine ecran). - * @return l'ui instancie et initialisee mais non visible encore - */ - public I18nEditorUI initUI(I18nEditorContext context, boolean fullscreen) { - - I18nEditorUI ui = new I18nEditorUI(context); - - I18nEditorContext.MAIN_UI_ENTRY_DEF.setContextValue(context, ui); - - // set fullscreen propery on main ui - ui.getGraphicsConfiguration().getDevice().setFullScreenWindow(fullscreen ? ui : null); - - // chargement du menu des projets existants - context.firePropertyChange("projects", null, context.getConfig().getProjects()); - - I18nProject project = context.getProject(); - if (project != null) { - - openProjectUI(ui, project); - } - return ui; - } - - /** - * Permet de recharger l'ui principale et de changer de le mode d'affichage. - * - * @param context le contexte applicatif - */ - public void reloadUI(I18nEditorContext context) { - - // on conserve la clef actuellement selectionnee - context.saveSelectedKey(); - - // must remove all properties listener on config - context.getContextValue(I18nEditorConfig.class).removeJaxxPropertyChangeListener(); - context.removeJaxxPropertyChangeListener(); - - boolean fullscreen = context.getConfig().isFullScreen(); - // scan main ui - I18nEditorUI ui = getUI(context); - - - if (ui != null) { - - I18nEditorContext.MAIN_UI_ENTRY_DEF.removeContextValue(context); - - ui.dispose(); - - ui.setVisible(false); - } - - ui = initUI(context, fullscreen); - - // show ui - ui.setVisible(true); - } - - /** - * Creer un projet. - * - * @param context le context applicatif - */ - public void createProject(I18nEditorContext context) { - try { - createProjectUI(context); - - I18nProject project = context.getProject(); - - if (project == null) { - return; - } - - log.info("open project " + project); - - context.firePropertyChange(I18nEditorContext.PROJECT_PROPERTY, null, project); - context.firePropertyChange("projects", null, context.getConfig().getProjects()); - - } catch (Exception ex) { - throw new RuntimeException("could not open project for reason " + ex.getMessage(), ex); - } - } - - /** - * Ouvre un projet. - * - * @param context le context applicatif - */ - public void openOtherProject(I18nEditorContext context) { - try { - - File f = ProjectUIModel.chooseFile(getUI(context), - t("i18neditor.title.choose.project"), - t("i18neditor.action.choose.project"), - null, - "^.+\\.i18nproject$", - t("i18neditor.action.choose.project.description")); - if (f == null) { - return; - } - loadProject(context, f); - - I18nProject project = context.getProject(); - - if (project == null) { - return; - } - - log.info("open project " + project); - - context.firePropertyChange(I18nEditorContext.PROJECT_PROPERTY, null, project); - - } catch (Exception ex) { - throw new RuntimeException("could not open project for reason " + ex.getMessage(), ex); - } - } - - /** - * Ouvre un projet. - * - * @param context le context applicatif - * @param name le nom du projet a ouvrir - */ - public void openProject(I18nEditorContext context, String name) { - try { - File f = context.getConfig().getProjectStore(name); - loadProject(context, f); - - I18nProject project = context.getProject(); - - if (project == null) { - return; - } - - log.info("open project " + project); - - context.firePropertyChange(I18nEditorContext.PROJECT_PROPERTY, null, project); - - } catch (Exception ex) { - throw new RuntimeException("could not open project for reason " + ex.getMessage(), ex); - } - } - - /** - * Ferme un projet actuellement charge. - * - * @param context le context applicatif - * @param project le projet a fermer - */ - public void closeProject(I18nEditorContext context, I18nProject project) { - - if (project == null) { - return; - } - - log.info("close project " + project); - - I18nEditorContext.PROJECT_DEF.removeContextValue(context); - - context.firePropertyChange(I18nEditorContext.PROJECT_PROPERTY, project, null); - - context.setSelectedKey(null); - } - - /** - * Ferme l'application. - * - * @param context le context applicatif - */ - public void close(I18nEditorContext context) { - log.info("I18nEditor quitting..."); - I18nEditorUI ui = getUI(context); - boolean canContinue = ensureModification(ui); - if (!canContinue) { - return; - } - try { - if (ui != null) { - ui.dispose(); - } - } finally { - System.exit(0); - } - } - - /** - * Méthode pour changer de mode d'affichage. - * - * Si <code>fullscreen</code> est à {@code true} alors on passe en - * mode console (c'est à dire en mode plein écran exclusif), sinon on - * passe en mode fenetré normal. - * - * @param context le context applicatif - * @param fullscreen le nouvel état requis. - */ - public void changeScreen(I18nEditorContext context, boolean fullscreen) { - I18nEditorUI ui = getUI(context); - boolean canContinue = ensureModification(ui); - if (!canContinue) { - return; - } - context.getConfig().setFullscreen(fullscreen); - - // on recharge l'ui - reloadUI(context); - } - - /** - * Methode pour changer la langue utilisee. - * - * Cette action recharge le systeme i18n avec la nouvelle locale - * donnee puis recherge les interfaces graphiques. - * - * @param context applicatif - * @param newLocale la nouvelle locale a utilisee dans l'application. - */ - public void changeLanguage(I18nEditorContext context, Locale newLocale) { - if (newLocale == null) { - // pour eviter du code reentrant due aux binding... - return; - } - I18nEditorUI ui = getUI(context); - - boolean canContinue = ensureModification(ui); - if (!canContinue) { - return; - } - I18nEditorConfig config = context.getConfig(); - Locale oldLocale = config.getLocale(); - if (oldLocale != null && oldLocale.equals(newLocale)) { - return; - } - log.info("new locale to use " + newLocale + " (old: " + oldLocale + ")"); - // sauvegarde de la nouvelle locale - config.setLocale(newLocale); - - // chargement de la nouvelle locale dans le système i18n - I18n.init(null, newLocale); - - // on recharge l'ui - reloadUI(context); - } - - /** - * Methode pour changer le type de modele de l'arbre de l'arbre des clefs. - * - * @param context le contexte applicatif - * @param newMode le nouveau mode du modele d'arbre - */ - public void changeTreeModelMode(I18nEditorContext context, TreeModelMode newMode) { - //I18nEditorContext context = ui.getContext(); - - TreeModelMode oldMode = context.getTreeModelMode(); - if (oldMode == newMode) { - // on evite le code re-entrant - return; - } - - log.info("new tree model mode : " + newMode); - - // on conserve la clef actuellement selectionnee - context.saveSelectedKey(); - - // on change le type de model d'arbre (cela reconstruira l'arbre) - context.setTreeModelMode(newMode); - } - - public void updateProjectsMenuUI(final I18nEditorContext context) { - I18nEditorUI ui = getUI(context); - if (ui == null) { - return; - } - JMenu menu = ui.getMenuFileOpenProject(); - - Component[] components = menu.getMenuComponents(); - for (Component c : components) { - if (c instanceof JMenuItem && ((JComponent) c).getClientProperty("doNotRemove") == null) { - menu.remove(c); - } - } - Action action = new AbstractAction() { - - private static final long serialVersionUID = 1L; - - @Override - public void actionPerformed(ActionEvent e) { - JMenuItem source = (JMenuItem) e.getSource(); - String name = source.getName(); - openProject(context, name); - } - }; - List<String> projects = new ArrayList<String>(context.getConfig().getProjects()); - Collections.sort(projects); - for (String name : projects) { - JMenuItem item = new JMenuItem(action); - item.setName(name); - item.setText(name); - menu.add(item); - } - ui.getMenuFileDeleteProject().setEnabled(!projects.isEmpty()); - - } - - public void updateSelectedValue(I18nEditorContext context, String packageName, Locale locale, String key, String newValue) { - I18nProject project = context.getProject(); - if (log.isDebugEnabled()) { - log.debug(packageName + " - " + locale + " - " + key + " = " + newValue); - } - if (project != null) { - project.updateValue(packageName, locale, key, newValue); - } - } - - public void deleteSelectedValueForLocale(I18nEditorContext context, BundleValueUI sourceUI, String packageName, Locale locale, String key) { - I18nProject project = context.getProject(); - if (log.isDebugEnabled()) { - log.debug(packageName + " - " + locale + " - " + key); - } - if (project != null) { - project.deleteKey(packageName, locale, key); - } - - BundleValuesUI ui = sourceUI.getParentContainer(BundleValuesUI.class); - ui.getBundlesContent().remove(sourceUI); - if (ui.getBundlesContent().getComponentCount() == 0) { - Container parent = ui.getParent(); - // plus de bundle pour le paquetage - parent.remove(ui); - getUI(context).getValues().repaint(); - // on doit recharger les clefs - - context.saveSelectedKey(); - - reloadKeys(getUI(context)); - } else { - ui.revalidate(); - } - } - - /** - * Création d'un nouveau bundle utilistateur - * - * @param context - */ - public void createBundle(I18nEditorContext context) { -// // Ouverture de la fenêtre de création -// CreateBundleUI createBundle = new CreateBundleUI(ui); -// createBundle.setVisible(true); -// -// String bundle = createBundle.getBundle(); -// -// if (bundle != null) { -// // Ajout du nouveau bundle à l'écran et dans le menu -// -//// I18nEditorContext context = ui.getContext(); -// //List<String> bundlesI18n = context.getBundlesI18n(); -// createBundleChekBoxMenu(ui, bundle); -// //bundlesI18n.add(bundle); -// reloadValues(ui); -// } - } - - public void createBundle(I18nEditorContext context, String bundle) { -// // Ouverture de la fenêtre de création -// CreateBundleUI createBundle = new CreateBundleUI(ui); -// createBundle.setVisible(true); -// -// String bundle = createBundle.getBundle(); -// -// if (bundle != null) { -// // Ajout du nouveau bundle à l'écran et dans le menu -// -//// I18nEditorContext context = ui.getContext(); -// //List<String> bundlesI18n = context.getBundlesI18n(); -// createBundleChekBoxMenu(ui, bundle); -// //bundlesI18n.add(bundle); -// reloadValues(ui); -// } - } - - /** - * Création d'un nouveau bundle utilistateur - * - * @param context - */ - public void createPackage(I18nEditorContext context) { -// // Ouverture de la fenêtre de création -// CreatePackageUI createBundle = new CreatePackageUI(ui); -// createBundle.setVisible(true); -// -// String bundle = createBundle.getBundle(); -// -// if (bundle != null) { -// // Ajout du nouveau bundle à l'écran et dans le menu -// -//// I18nEditorContext context = ui.getContext(); -//// List<String> bundlesI18n = context.getBundlesI18n(); -// createPackageChekBoxMenu(ui, bundle); -// //bundlesI18n.add(bundle); -// reloadKeys(ui); -// reloadValues(ui); -// } - } - - public void showConfig(I18nEditorContext context) { - I18nEditorUI ui = getUI(context); - - ConfigUIModelBuilder builder = new ConfigUIModelBuilder(); - - builder.createModel(ui.getContext().getConfig()); - - //TODO Add callbacks - -// builder.registerCallBack( -// "application", -// n("i18neditor.action.reload.application"), -// UIHelper.createActionIcon("reload-application"), -// reloadApplicationCallback -// ); - - builder.addOption(Option.CONFIG_FILE); - builder.addOption(Option.PROJECTS_DIRECTORY); - builder.addOption(Option.TMP_DIRECTORY); -// -// model.addCategory( -// n("i18neditor.config.category.directories"), -// n("i18neditor.config.category.directories.description"), -// Option.CONFIG_FILE, -// Option.PROJECTS_DIRECTORY, -// Option.TMP_DIRECTORY); - - builder.addCategory( - n("i18neditor.config.category.ui"), - n("i18neditor.config.category.ui.description") - ); - - builder.addOption(Option.FULL_SCREEN); - builder.addOption(Option.LOCALE); -// -// model.addCategory( -// n("i18neditor.config.category.ui"), -// n("i18neditor.config.category.ui.description"), -// Option.FULL_SCREEN, -// Option.LOCALE); - - ConfigUIModel model = builder.flushModel(); - - ConfigUIHelper configUIHelper = new ConfigUIHelper(context.getConfig()); -// ConfigUI configUI = configUIHelper.buildUI(ui, "default"); -// context, model, "i18neditor.config.category.ui"); - - configUIHelper.displayUI(ui, false); -// configUI.showInDialog(ui, ui != null); - } - - public void showHelp(JAXXContext context, String helpId) { -// ObserveMainUI mainUI = getUI(context); -// -// ObserveHelpBroker helpBroker = context.getContextValue(ObserveHelpBroker.class); -// -// if (mainUI == null) { -// log.info("no mainUI, open in autonome frame"); -// // ouvrir dans une fenetre dedie -// helpBroker.showHelpSet(); -// return; -// } -// -// JHelp ui = mainUI.getHelp(); -// -// if (helpId == null) { -// helpId = helpBroker.getDefaultID(); -// } -// log.debug("show help " + helpId); -// ui.setCurrentID(helpId); -// -// mainUI.setContextValue(mainUI.getMode(), "oldMode"); -// mainUI.setMode(ObserveUIMode.HELP); -// } -// -// public void closeHelp(JAXXContext context) { -// ObserveMainUI mainUI = getUI(context); -// ObserveUIMode oldMode = mainUI.getContextValue(ObserveUIMode.class, "oldMode"); -// if (oldMode == null) { -// // on regarde si une base est chargee -// ObserveDataContext dataContext = context.getContextValue(ObserveDataContext.class); -// StorageService<?> mainStorage = dataContext.getStorage(); -// -// if (mainStorage == null) { -// oldMode = ObserveUIMode.NO_DB; -// } else { -// oldMode = ObserveUIMode.DB; -// } -// } -// mainUI.setMode(oldMode); - } - - public void gotoSite(I18nEditorContext context) { - - I18nEditorConfig config = context.getConfig(); - - URL siteURL = config.getOptionAsURL("application.site.url"); - - log.info("goto " + siteURL); - if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { - try { - Desktop.getDesktop().browse(siteURL.toURI()); - } catch (Exception ex) { - log.error(ex.getMessage(), ex); - } - } - } - - public void showAbout(I18nEditorContext context) { - - I18nEditorUI ui = getUI(context); - - AboutPanel about = new AboutPanel(ui); - about.setTitle(t("i18neditor.title.about")); - about.setAboutText(t("i18neditor.about.message")); - about.setBottomText(context.getConfig().getCopyrightText()); -// about.setIconPath("/icons/logo-OT_web.png"); - about.setLicenseFile("META-INF/nuiton-i18n-editor-LICENSE.txt"); - about.setThirdpartyFile("META-INF/nuiton-i18n-editor-THIRD-PARTY.txt"); - about.init(); - about.showInDialog(ui, true); - } - - public void showStorageInfo(I18nEditorContext context) { - - I18nEditorUI ui = getUI(context); - - String text; - if (context.getProject() == null) { - text = t("i18neditor.message.no.project.loaded"); - } else { - text = context.getProject().toString(); - } - JOptionPane.showMessageDialog( - ui, - text, - t("i18neditor.title.project.info"), - JOptionPane.INFORMATION_MESSAGE); - } - - /** - * Méthode pour lancer l'assistant de creation de projet. - * - * @param rootContext le context applicatif - */ - public void createProjectUI(final JAXXContext rootContext) { - boolean canContinue = ensureModification(rootContext); - if (!canContinue) { - return; - } - - final I18nEditorUI mainUI = getUI(rootContext); - - new WizardUILancher<ProjectStep, ProjectUIModel, ProjectUI>(rootContext, mainUI, ProjectUI.class, ProjectUIModel.class) { - - @Override - protected void init(ProjectUI ui) { - ProjectUIModel model = ui.getModel(); - Set<I18nProjectProvider<?>> providers = I18nProjectFactory.getProviders(); - if (!providers.isEmpty()) { - model.setType(providers.iterator().next()); - } - } - - @Override - protected void doAction(ProjectUI ui) { - log.info(ui.getName()); - ProjectUIModel model = ui.getModel(); - - I18nProject project = null; - I18nProjectProvider<?> type = model.getType(); - project = I18nProjectFactory.newProject(type.getType(), model); - try { - if (project.isStoreProject()) { - // ajout du projet dans la liste des projets connus - rootContext.getContextValue(I18nEditorConfig.class).getProjects().add(project.getName()); - // on enregistre la definition du projet - project.saveDefinition(); - } - project.load(); - I18nEditorContext.PROJECT_DEF.setContextValue(rootContext, project); - } catch (IOException ex) { - log.error(ex.getMessage(), ex); - } - } - - @Override - protected void doCancel(ProjectUI ui) { - super.doCancel(ui); - - } - }.start(); - } - - /** - * Méthode pour lancer l'assistant de mise a jour de projet. - * - * @param context le context applicatif - */ - public void editProject(final I18nEditorContext context) { - boolean canContinue = ensureModification(context); - if (!canContinue) { - return; - } - - final I18nEditorUI mainUI = getUI(context); - - new WizardUILancher<ProjectStep, ProjectUIModel, ProjectUI>(context, mainUI, ProjectUI.class, ProjectUIModel.class) { - - @Override - protected void doAction(ProjectUI ui) { - log.info(ui.getName()); - ProjectUIModel model = ui.getModel(); - I18nProject project = null; - I18nProjectProvider<?> type = model.getType(); - project = I18nProjectFactory.newProject(type.getType(), model); - try { - if (project.isStoreProject()) { - if (!context.getConfig().getProjects().contains(project.getName())) { - // ajout du projet dans la liste des projets connus - context.getConfig().getProjects().add(project.getName()); - } - // on enregistre la definition du projet - project.saveDefinition(); - } - project.load(); - I18nEditorContext.PROJECT_DEF.setContextValue(context, project); - } catch (IOException ex) { - log.error(ex.getMessage(), ex); - } - } - - @Override - protected void doCancel(ProjectUI ui) { - super.doCancel(ui); - - } - }.start(); - } - - public void deleteProject(I18nEditorContext context) { - JComboBox box = new JComboBox(); - List<String> projects = new ArrayList<String>(context.getConfig().getProjects()); - Collections.sort(projects); - box.addItem(""); - for (String p : projects) { - box.addItem(p); - } - JOptionPane.showMessageDialog(getUI(context), box, t("i18neditor.choose.project.to.delete"), JOptionPane.INFORMATION_MESSAGE); - - String selectedProject = (String) box.getSelectedItem(); - if (!selectedProject.isEmpty()) { - File f = context.getConfig().getProjectStore(selectedProject); - f.delete(); - context.getConfig().getProjects().remove(selectedProject); - log.info("project ot delete : " + selectedProject); - context.firePropertyChange("projects", null, context.getConfig().getProjects()); - } - } - - /** - * Charger un projet. - * - * @param context le context applicatif - * @param projectFile le fichier de definition du projet a ouvrir - */ - public void loadProject(I18nEditorContext context, File projectFile) { - FileInputStream stream = null; - try { - I18nProject project = I18nProjectFactory.newProject(projectFile); - - project.setStoreFile(projectFile); - project.load(); - I18nEditorContext.PROJECT_DEF.setContextValue(context, project); - - } catch (Exception ex) { - throw new RuntimeException("could not load project for reason " + ex.getMessage(), ex); - } finally { - if (stream != null) { - try { - stream.close(); - } catch (IOException ex) { - throw new RuntimeException("could not close project for reason " + ex.getMessage(), ex); - } - } - } - } - - protected void openProjectUI(I18nEditorUI ui, I18nProject project) { - if (ui == null) { - return; - } - if (log.isDebugEnabled()) { - log.debug("opening project ui for " + project); - } - - List<Locale> selectedLocales = project.getSelectedBundles(); - List<String> selectedPackages = project.getSelectedPackages(); - JMenu menuPackages = ui.getMenuPackages(); - for (String packageName : project.getPackages()) { - boolean selected = selectedPackages.contains(packageName); - JCheckBoxMenuItem checkBoxMenuItem = new PackageCheckBoxMenuUI(ui, packageName, selected); - menuPackages.add(checkBoxMenuItem); - } - - JMenu menuBundles = ui.getMenuBundles(); - for (Locale l : project.getBundles()) { - boolean selected = selectedLocales.contains(l); - JCheckBoxMenuItem checkBoxMenuItem = new BundleCheckBoxMenuUI(ui, l, selected); - menuBundles.add(checkBoxMenuItem); - } - - // Initialisation des données - reloadKeys(ui); - } - - protected void closeProjectUI(I18nEditorUI ui, I18nProject project) { - - if (ui == null) { - return; - } - - if (log.isDebugEnabled()) { - log.debug("closing project ui for " + project); - } - JMenu menu = ui.getMenuBundles(); - Component[] components = menu.getMenuComponents(); - for (Component c : components) { - if (c instanceof JCheckBoxMenuItem) { - menu.remove(c); - } - } - menu = ui.getMenuPackages(); - components = menu.getMenuComponents(); - for (Component c : components) { - if (c instanceof JCheckBoxMenuItem) { - menu.remove(c); - } - } - ui.getValues().removeAll(); - ui.getTreeModel().setKeys(new String[0]); - ui.getValues().repaint(); - } - - /** - * Recharge les clés dans l'arbre des propriétés en fonction des paquetages - * - * @param ui - */ - protected void reloadKeys(I18nEditorUI ui) { - I18nEditorContext context = ui.getContext(); - I18nProject project = context.getProject(); - if (project == null) { - return; - } - - // on supprime la selection (elle sera repositionnee ensuite si necessaire) - ui.getTreeSelectionModel().clearSelection(); - - // construction du nouveau model - String[] keys = project.getKeys(); - PropertiesTreeModel model = ui.getTreeModel(); - log.info("wil use " + keys.length + " keys"); - model.setKeys(keys); - ui.getTree().repaint(); - reSelectSelectedKey(ui); - } - - public void reSelectSelectedKey(I18nEditorUI ui) { - - I18nEditorContext context = ui.getContext(); - // recuperation de l'ancienne clef selectionne - String selectedKey = context.getSelectedKey(); - if (selectedKey == null) { - // on recherche dans une seconde entree du context - // positionne explicitement par le developpeur - // ceci est necessaire car le model est reconstruit a chaque - // nouvelle ui (changement de langue,...) et on perd donc l'information - // sur selectedKey due a un binding... - selectedKey = context.popSelectedKey(); - if (selectedKey != null && !ui.getTreeModel().containsKey(selectedKey)) { - selectedKey = null; - } - context.setSelectedKey(selectedKey); - } - log.info(selectedKey); - } - - /** - * Recharge les valeurs de la clef selectionnee dans l'arbre de navigation. - * - * @param ui - */ - protected void reloadValues(I18nEditorUI ui) { - String key = ui.getContext().getSelectedKey(); - reloadValues(ui, key); - } - - /** - * Recharge les valeurs d'une clef donnee. - * - * @param ui - * @param key la clef de traduction dont on va editer les traductions - */ - protected void reloadValues(I18nEditorUI ui, String key) { - I18nEditorContext context = ui.getContext(); - I18nProject project = context.getProject(); - if (project == null) { - return; - } - - JPanel valuesUI = ui.getValues(); - valuesUI.removeAll(); - - if (log.isDebugEnabled()) { - log.debug("for key : " + key); - } - - if (key != null) { - List<String> packagesI18n = project.getSelectedPackages(); - - for (String p : packagesI18n) { - Map<Locale, String> values = project.getValues(p, key); - if (values != null && !values.isEmpty()) { - BundleValuesUI bundleValuesUI = new BundleValuesUI(context); - bundleValuesUI.setPackageName(p); - bundleValuesUI.setKey(key); - if (log.isDebugEnabled()) { - log.debug("adding package " + p); - } - bundleValuesUI.setBundles(new ArrayList<Locale>(values.keySet())); - for (Map.Entry<Locale, String> e : values.entrySet()) { - BundleValueUI v = new BundleValueUI(bundleValuesUI); - v.setBundle(e.getKey()); - if (log.isDebugEnabled()) { - log.debug(" - adding locale " + e.getKey()); - } - v.setKey(key); - v.setPackageName(p); - v.setInitialValue(e.getValue()); - bundleValuesUI.getBundlesContent().add(v); - } - valuesUI.add(bundleValuesUI); - } - } - } - - JScrollPane valuesView = ui.getValuesView(); - valuesView.validate(); - valuesView.repaint(); - } - - /** - * Test if there is some modification on screen, - * - * @param rootContext the context - * @return {@code true} if no more modification is detected - * @throws IllegalArgumentException if rootContext is null - */ - protected boolean ensureModification(JAXXContext rootContext) throws IllegalArgumentException { - if (rootContext == null) { - throw new IllegalArgumentException("rootContext can not be null"); - } - I18nEditorUI ui = getUI(rootContext); - if (ui == null) { - // no ui, so no modification - return true; - } - return true; - } - - protected I18nEditorUI getUI(JAXXContext context) { - I18nEditorUI ui; - if (context instanceof I18nEditorUI) { - ui = (I18nEditorUI) context; - } else if (context instanceof I18nEditorContext) { - ui = ((I18nEditorContext) context).getMainUI(); - } else { - ui = I18nEditorContext.MAIN_UI_ENTRY_DEF.getContextValue(context); - } - return ui; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PackageCheckBoxMenuUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PackageCheckBoxMenuUI.jaxx deleted file mode 100644 index 3080cdb..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PackageCheckBoxMenuUI.jaxx +++ /dev/null @@ -1,70 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JCheckBoxMenuItem id='content' - text='{updateText(getUrl())}' - toolTipText='{t("i18neditor.resource.name", getUrl())}' - onItemStateChanged='updateState(event)'> - -<import> -org.nuiton.i18n.editor.I18nEditorContext -java.util.Locale -jaxx.runtime.JAXXContext - -static org.nuiton.i18n.I18n.t -</import> - - <!-- le nom du bundle --> - <String id='url' javaBean='""'/> - - <script><![CDATA[ -public PackageCheckBoxMenuUI(JAXXContext parentContext, String bundle, boolean selected) { - super(null, selected); - setContextValue(parentContext); - setUrl(bundle); -} - -protected String updateText(String name) { - int index = name.lastIndexOf("/"); - if (index > -1) { - name = name.substring(index + 1); - } - return name; -} - -protected void updateState(ItemEvent e) { - I18nEditorContext context = getContextValue(I18nEditorContext.class); - if (context == null) { - // pas encore de context (ui en construction) - return; - } - if (e.getStateChange() == ItemEvent.SELECTED) { - context.addSelectedPackage(url); - } else { - context.removeSelectedPackage(url); - } -} -]]> - </script> - -</JCheckBoxMenuItem> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertieNode.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertieNode.java deleted file mode 100644 index 3e0faef..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertieNode.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* */ -package org.nuiton.i18n.editor.ui; - -import javax.swing.tree.DefaultMutableTreeNode; -import java.io.Serializable; -import javax.swing.tree.MutableTreeNode; - -/** - * Représente un noeud de l'ardre des propriétés affichées. Le noeud contient - * le chemin de la propriétés, par exemple tutu.toto.tata va être représenté avec - * 3 noeuds avec comme chemin tutu, tutu.toto, tutu.toto.tata - * - * @author julien - */ -public class PropertieNode extends DefaultMutableTreeNode implements Comparable<PropertieNode> { - - /** @see Serializable */ - private static final long serialVersionUID = 1L; - - /** - * Constructeur avec l'objet contenu dans le noeud - * - * @param userObject chemin de la propriété - */ - public PropertieNode(Object userObject) { - super(userObject); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (obj instanceof PropertieNode) { - // Comparaison du chemin - PropertieNode node = (PropertieNode) obj; - return getUserObject().equals(node.getUserObject()); - } - return false; - } - - public PropertieNode getChildAt(String path) { - if (!isLeaf()) { - for (Object o : children) { - PropertieNode n = (PropertieNode) o; - if (path.equals(n.getUserObject())) { - return n; - } - } - } - return null; - } - - /** - * Ajoute le noeud fils a la bonne position (on conserve l'ordre alphabetique des path) - * - * Note : si le path existe deja, alors on ne fait rien. - * - * @param newChild le fils a ajouter - */ - @Override - public void add(MutableTreeNode newChild) { - int index = 0; - if (!isLeaf()) { - // on recherche la position ou ajouter la clef - for (Object o : children) { - PropertieNode n = (PropertieNode) o; - int compareTo = n.compareTo((PropertieNode) newChild); - if (compareTo == 0) { - // le noeud existe deja - return; - } - if (compareTo > 0) { - // le noeud courant doit etre apres le noeud a ajouter - break; - } - index++; - } - } - insert(newChild, index); - } - -// @Override -// public String toString() { -// String result = getUserObject().toString(); -// if (isRoot()) { -// // Si c'est la racine -// return result; -// } else { -// // Si c'est un chemin -// int lastSeparator = result.lastIndexOf("."); -// return result.substring(lastSeparator + 1); -// } -// } - - @Override - public int hashCode() { - return getUserObject().hashCode(); - } - - @Override - public int compareTo(PropertieNode node) { - // Compare les chemins - return getUserObject().toString().compareTo(node.getUserObject().toString()); - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertiesTreeModel.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertiesTreeModel.java deleted file mode 100644 index a35ec8a..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/PropertiesTreeModel.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* */ -package org.nuiton.i18n.editor.ui; - -import javax.swing.tree.DefaultTreeModel; -import java.io.Serializable; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.editor.I18nEditorContext; -import static org.nuiton.i18n.I18n.t; - -/** - * Modèle de l'arbre des propriétés. Le modèle permet de sructurer les propriétés - * (ex: tutu.toto.tata) en un des noeuds de l'arbre. - * - * @author julien - */ -public class PropertiesTreeModel extends DefaultTreeModel { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(PropertiesTreeModel.class); - /** @see Serializable */ - private static final long serialVersionUID = 1L; - protected TreeModelMode mode; - protected String[] keys; - - /** - * Constructeur avec un liste de proprétés - * - * @param list liste de propriétés - */ - public PropertiesTreeModel(String... list) { - this(TreeModelMode.TREE, list); - } - - /** - * Constructeur avec un liste de proprétés - * - * @param mode le mode de modele a construire - * @param list liste de propriétés - */ - public PropertiesTreeModel(TreeModelMode mode, String... list) { - super(null); - keys = list; - - // Création de la racine (qui n'est jamais affichee) - PropertieNode r = new PropertieNode(""); -// PropertieNode r = new PropertieNode(list.length == 0 ? t("i18neditor.no.keys") : I18nEditorContext.ROOT_NAME); - setRoot(r); - setMode(mode); - } - - @Override - public PropertieNode getRoot() { - return (PropertieNode) super.getRoot(); - } - - public String[] getKeys() { - return keys; - } - - public void setKeys(String[] keys) { - this.keys = keys; - // on reconstruit le model - TreeModelMode theMode = mode; - mode = null; - setMode(theMode); - } - - public boolean containsKey(String selectedKey) { - if (keys != null) { - switch (mode) { - case TREE: - for (String k : keys) { - if (k.equals(selectedKey) || k.startsWith(selectedKey + ".")) { - return true; - } - } - break; - case FLAT: - - for (String k : keys) { - if (k.equals(selectedKey)) { - return true; - } - } - break; - } - } - return false; - } - - public PropertieNode getNode(String path) { - PropertieNode result = null; - switch (mode) { - case TREE: - String[] names = path.split("\\" + I18nEditorContext.SEPARATOR); - result = getRoot(); - String currentPath = ""; - for (String name : names) { - if (!currentPath.isEmpty()) { - currentPath += I18nEditorContext.SEPARATOR; - } - currentPath += name; - result = result.getChildAt(currentPath); - } - break; - case FLAT: - result = getRoot().getChildAt(path); - break; - } - return result; - } - - public TreeModelMode getMode() { - return mode; - } - - public void setMode(TreeModelMode mode) { - this.mode = mode; - - if (root == null) { - return; - } - PropertieNode r = (PropertieNode) root; - if (!r.isLeaf()) { - // on supprime tous les fils - r.removeAllChildren(); - } - if (keys == null || keys.length == 0) { - // pas de clef a reconstruire - PropertieNode r2 = new PropertieNode(t("i18neditor.no.keys")); - r.add(r2); - // on notifie que le modele a ete reconstruit - nodeStructureChanged(root); - return; - } - - // on reconstruit le modele - - switch (mode) { - case TREE: - buildTreeModel(r, keys); - break; - - case FLAT: - buildFlatModel(r, keys); - break; - } - // on notifie que le modele a ete reconstruit - nodeStructureChanged(root); - } - - private void buildTreeModel(PropertieNode r, String[] list) { - for (String property : list) { - String path = ""; - PropertieNode parent = r; - - String[] names = property.split("\\" + I18nEditorContext.SEPARATOR); - for (String name : names) { - if (!path.isEmpty()) { - - path += I18nEditorContext.SEPARATOR; - } - path += name; - - PropertieNode node = parent.getChildAt(path); - if (node == null) { - node = new PropertieNode(path); - parent.add(node); - } - parent = node; - } - } - } - - private void buildFlatModel(PropertieNode r, String[] list) { - - for (String property : list) { - PropertieNode node = new PropertieNode(property); - r.add(node); - } - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/TreeModelMode.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/TreeModelMode.java deleted file mode 100644 index a41da54..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/TreeModelMode.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.ui; - -/** - * Pour caracteriser le mode a utiliser dans le modele de navigation. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public enum TreeModelMode { - - /** - * pour afficher les clefs sous forme d'arbre - */ - TREE, - /** - * pour afficher les clefs a plat - */ - FLAT -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectStep.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectStep.java deleted file mode 100644 index 0a5f285..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectStep.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.ui.project; - -import jaxx.runtime.swing.wizard.WizardStep; - -import static org.nuiton.i18n.I18n.n; - -/** - * Pour caracteriser les étapes lors du wizard de creation de projet - * - * @author tchemit - */ -public enum ProjectStep implements WizardStep { - - /** pour choisir le type de projet a creer (@see ProjectType) */ - CHOOSE_PROJECT_TYPE( - n("i18neditor.project.step.chooseProjectType"), - n("i18neditor.project.step.chooseProjectType.description")), - /** pour configurer un projet */ - CONFIGURE_PROJECT( - n("i18neditor.project.step.configureProject"), - n("i18neditor.project.step.configureProject.description")), - /** pour choisir les bundles parmis ceux trouvés */ - SELECT_BUNDLES( - n("i18neditor.project.step.selecteBundles"), - n("i18neditor.project.step.selecteBundles.description")), - /** pour renseigner si on persiste le projet */ - PERSIST(n("i18neditor.project.step.persist"), - n("i18neditor.project.step.persist.description")), - /** pour confirmer et charger le projet */ - RESUME(n("i18neditor.project.step.resume"), - n("i18neditor.project.step.resume.description")); - - private final String label; - - private final String description; - - ProjectStep(String label, String description) { - this.label = label; - this.description = description; - } - - @Override - public String getLabel() { - return label; - } - - @Override - public String getDescription() { - return description; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.css deleted file mode 100644 index 8a24599..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.css +++ /dev/null @@ -1,59 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - -#mainUI { - title:"i18neditor.title.noproject"; - modal:true; - resizable:false; - defaultCloseOperation:"dispose_on_close"; - layout:{new BorderLayout()}; -} - -#tabs { - border:{BorderFactory.createEmptyBorder(6,6,6,6)}; -} - -#cancelAction { - text:"i18neditor.action.cancel"; - toolTipText:"i18neditor.action.cancel.tip"; - actionIcon:"cancel"; -} - -#previousAction { - text:"i18neditor.action.goto.previous.stage"; - toolTipText:"i18neditor.action.goto.previous.stage.tip"; - actionIcon:"previous-step"; - enabled:{getModel().getPreviousStep() != null}; -} - -#nextAction { - text:"i18neditor.action.goto.next.stage"; - toolTipText:"i18neditor.action.goto.next.stage.tip"; - actionIcon:"next-step"; - enabled:{getModel().isValidStep()}; - visible:{getModel().getNextStep() != null}; -} - -#applyAction { - text:"i18neditor.action.apply"; - toolTipText:"i18neditor.action.apply.tip"; - actionIcon:"accept"; - enabled:{getModel().isValidStep()}; - visible:{getModel().getNextStep() == null}; -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.jaxx deleted file mode 100644 index 043b0a7..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUI.jaxx +++ /dev/null @@ -1,310 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JDialog id="mainUI" - implements='jaxx.runtime.swing.wizard.WizardUI<ProjectStep, ProjectUIModel>' - width='550' height='560' defaultCloseOperation='dispose_on_close'> - -<import> -javax.swing.table.DefaultTableCellRenderer - -jaxx.runtime.JAXXContext -jaxx.runtime.SwingUtil -jaxx.runtime.swing.editor.MyDefaultCellEditor -jaxx.runtime.swing.wizard.WizardUtil -static jaxx.runtime.JAXXUtil.newContextEntryDef -static jaxx.runtime.JAXXUtil.checkJAXXContextEntry - -org.nuiton.i18n.editor.I18nEditorContext -org.nuiton.i18n.editor.I18nEditorConfig -org.nuiton.i18n.editor.ui.I18nEditorUIHandler -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.ui.project.tabs.AbstractProjectTabPanelUI -org.nuiton.i18n.editor.ui.project.tabs.SelectBundlesPanelUI -org.nuiton.i18n.editor.ui.project.tabs.ChooseProjectTypePanelUI -org.nuiton.i18n.editor.ui.project.tabs.ConfigureProjectPanelUI -org.nuiton.i18n.editor.ui.project.tabs.PersistPanelUI -org.nuiton.i18n.editor.ui.project.tabs.ResumePanelUI -org.nuiton.i18n.editor.ui.project.SelectBundlesTableModel - -javax.swing.SwingUtilities -javax.swing.JTable -java.awt.Component -javax.swing.JComponent -java.awt.event.MouseAdapter -java.awt.event.MouseEvent - -static org.nuiton.i18n.I18n.n -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -protected I18nEditorUIHandler handler = getContextValue(I18nEditorUIHandler.class); -protected I18nEditorConfig config = getContextValue(I18nEditorConfig.class); -protected I18nEditorContext context = getContextValue(I18nEditorContext.class); -protected ProjectUIModel model = getContextValue(ProjectUIModel.class); - - -private boolean contextInitialized; - -public ProjectUI(Window owner, JAXXContext parentContext) { - super(owner); - - // verification du context parent - checkJAXXContextEntry(parentContext, newContextEntryDef(ProjectUIModel.class)); - checkJAXXContextEntry(parentContext, newContextEntryDef("apply", Runnable.class)); - checkJAXXContextEntry(parentContext, newContextEntryDef("cancel", Runnable.class)); - - if (owner != null) { - setContextValue(owner, "parent"); - } - SwingUtil.initContext(this, parentContext); - contextInitialized = true; -} - -@Override -public ProjectUIModel getModel() { - return model; -} - -@Override -public void start() { - - // on demarre le modele - getModel().start(); - - // centrage sur la frame parent - SwingUtil.center(getContextValue(Window.class, "parent"), this); - - // affichage ui - setVisible(true); -} - -@Override -public ProjectStep getSelectedStep() { - int index = tabs.getSelectedIndex(); - AbstractProjectTabPanelUI c = null; - if (index > -1) { - c = (AbstractProjectTabPanelUI) tabs.getComponentAt(index); - } - ProjectStep result = c == null ? null : c.getStep(); - return result; -} - -@Override -public AbstractProjectTabPanelUI getStepUI(ProjectStep step) { - if (step != null) { - return (AbstractProjectTabPanelUI) getObjectById(step.name()); - } - return null; -} - -@Override -public AbstractProjectTabPanelUI getStepUI(int stepIndex) { - if (stepIndex > tabs.getTabCount()) { - return null; - } - return (AbstractProjectTabPanelUI) tabs.getComponentAt(stepIndex); -} - -@Override -public AbstractProjectTabPanelUI getSelectedStepUI() { - ProjectStep step = getSelectedStep(); - AbstractProjectTabPanelUI ui = getStepUI(step); - return ui; -} - -/*@Override -public void onWasStarted() { -} - -@Override -public void onModelStateChanged(WizardOperationState newState) { -} - -@Override -public void onOperationStateChanged(ProjectStep step, WizardOperationState newState) { - // mettre a jour l'onglet -}*/ - -@Override -public void onStepChanged(ProjectStep newStep) { - if (newStep == ProjectStep.SELECT_BUNDLES) { - // recalcule des urls disponibles - SELECT_BUNDLES.getBundlesModel().setUrls(model.detectBundles()); - if (!model.isCreate()) { - // on reselectionne les urls du projet - SELECT_BUNDLES.getBundlesModel().setSelectedUrls(model.getProject().getUrls()); - } - return; - } -} - -@Override -public void onStepsChanged(ProjectStep[] steps) { - -} - -public I18nEditorUIHandler getHandler() { - return handler; -} - -public void apply() { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try { - Runnable action = getContextValue(Runnable.class, "apply"); - action.run(); - } catch (Exception e) { - jaxx.runtime.swing.ErrorDialogUI.showError(e); - log.error(e.getMessage(), e); - } finally { - dispose(); - } - } - }); -} - -public void cancel() { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try { - Runnable action = getContextValue(Runnable.class, "cancel"); - action.run(); - } catch (Exception e) { - jaxx.runtime.swing.ErrorDialogUI.showError(e); - log.error(e.getMessage(), e); - } finally { - dispose(); - } - } - }); -} - -void $afterCompleteSetup() { - - // installation du dispatcher de modifications du modele - WizardUtil.installWizardUIListeners(this); - - // ajout de la politique d'affichage des onglets - WizardUtil.addTabsDisplayUntilStepListener(this); - - // tableau de la synchronisation des données des references obsoletes - - final JTable table = SELECT_BUNDLES.getBundles(); - table.setRowHeight(24); - SwingUtil.fixTableColumnWidth(table, 0, 20); - - SwingUtil.setI18nTableHeaderRenderer(table, - n("i18neditor.createProject.table.bundles.select"), - n("i18neditor.createProject.table.bundles.select.tip"), - n("i18neditor.createProject.table.bundles.url"), - n("i18neditor.createProject.table.bundles.url.tip")); - - DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(); - - DefaultTableCellRenderer renderer2 = new DefaultTableCellRenderer() { - private static final long serialVersionUID = 1L; - @Override - public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - int modelColumn = table.convertColumnIndexToModel(column); - int modelRow = table.convertRowIndexToModel(row); - SelectBundlesTableModel model = (SelectBundlesTableModel) table.getModel(); - String text = model.getTextValueAt(modelRow, modelColumn); - JComponent c = (JComponent) super.getTableCellRendererComponent(table, text, isSelected, hasFocus, row, column); - return c; - } - }; - - SwingUtil.setTableColumnRenderer(table, 0, SwingUtil.newBooleanTableCellRenderer(renderer)); - SwingUtil.setTableColumnRenderer(table, 1, SwingUtil.newStringTableCellRenderer(renderer2, 100, true)); - SwingUtil.setTableColumnEditor(table, 0, MyDefaultCellEditor.newBooleanEditor(false)); - - // pour tout selectionner - deselectionner dans l'entete du tableau - table.getTableHeader().addMouseListener(new MouseAdapter() { - - @Override - public void mouseClicked(MouseEvent e) { - - int colIndex = table.getTableHeader().columnAtPoint(e.getPoint()); - colIndex = table.convertColumnIndexToModel(colIndex); - if (colIndex == 0) { - SelectBundlesTableModel model = (SelectBundlesTableModel) table.getModel(); - boolean oldValue = model.isSelectAll(); - // toggle selectAll - model.setSelectAll(!oldValue); - } - } - }); - - // chargement du modèle - getModel().finalizeUIInit(this); -} -]]> - </script> - - <CardLayout> - <!-- les differents contenu d'onglets --> - <ChooseProjectTypePanelUI id='CHOOSE_PROJECT_TYPE' constructorParams='this'/> - <ConfigureProjectPanelUI id='CONFIGURE_PROJECT' constructorParams='this'/> - <SelectBundlesPanelUI id='SELECT_BUNDLES' constructorParams='this'/> - <PersistPanelUI id='PERSIST' constructorParams='this'/> - <ResumePanelUI id='RESUME' constructorParams='this'/> - </CardLayout> - - <!-- les onglets --> - <JTabbedPane id='tabs' - constraints='BorderLayout.CENTER' - onStateChanged='getModel().gotoStep(getSelectedStep())'/> - - <!-- les actions --> - <Table weightx='1' fill='both' constraints='BorderLayout.SOUTH'> - <row> - <cell weightx='0.5' fill="both"> - <!-- pour annuler --> - <JButton id="cancelAction" - onActionPerformed='cancel()'/> - </cell> - <cell weightx='0.5' fill="both"> - <!-- pour aller sur l'onglet précédent --> - <JButton id="previousAction" - onActionPerformed='getModel().gotoPreviousStep()'/> - </cell> - <cell weightx='0.5' fill="both"> - <!-- pour aller sur l'onglet suivant --> - <JButton id="nextAction" - onActionPerformed='getModel().gotoNextStep()'/> - </cell> - <cell weightx='0.5' fill="both"> - <!-- pour apliquer la configuration --> - <JButton id="applyAction" - onActionPerformed='apply()'/> - </cell> - </row> - </Table> - -</JDialog> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUIModel.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUIModel.java deleted file mode 100644 index 4a246ef..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/ProjectUIModel.java +++ /dev/null @@ -1,301 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.ui.project; - -import java.awt.Component; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import jaxx.runtime.swing.wizard.WizardModel; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.i18n.editor.I18nEditorConfig; -import org.nuiton.i18n.editor.I18nEditorContext; -import org.nuiton.i18n.editor.project.I18nProject; -import org.nuiton.i18n.editor.project.I18nProjectFactory; -import org.nuiton.i18n.editor.project.I18nProjectProvider; -import org.nuiton.util.FileUtil; - -/** - * Le modele de l'ui pour creer un projet via un assistant - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class ProjectUIModel extends WizardModel<ProjectStep> { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(ProjectUIModel.class); - public static final String TYPE_PROPERTY_NAME = "type"; - public static final String PROJECT_PROPERTY_NAME = "project"; - public static final String VALID_PROPERTY_NAME = "valid"; - /** le dictionnaire des differents projects possible indexes par leur provideur */ - protected Map<I18nProjectProvider<?>, I18nProject> projects; - /** Le provideur du projet en cours d'edition */ - protected I18nProjectProvider<?> type; - /** le projet en cours d'edition */ - protected I18nProject project; - /** la configuration de l'application */ - protected I18nEditorConfig config; - /** un drapeau pour savoir si on est en mode creation ou pas */ - protected boolean create; - - public ProjectUIModel() { - super(ProjectStep.class, - ProjectStep.CHOOSE_PROJECT_TYPE, - ProjectStep.CONFIGURE_PROJECT, - ProjectStep.SELECT_BUNDLES, - ProjectStep.PERSIST, - ProjectStep.RESUME); - projects = new HashMap<I18nProjectProvider<?>, I18nProject>(); - // init map of different types of projects - Set<I18nProjectProvider<?>> providers = I18nProjectFactory.getProviders(); - for (I18nProjectProvider<?> p : providers) { - I18nProject newProject = p.newProject(); - projects.put(p, newProject); - // the model listens every modification of each project - // and at each time revalidate the model - newProject.addPropertyChangeListener(new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - validate(); - } - }); - } - if (!providers.isEmpty()) { - setType(providers.iterator().next()); - } - } - - /** - * Methode pour finir l'initialisation de l'ui partir du modele. - * - * @param ui l'ui de l'assistant - */ - public void finalizeUIInit(ProjectUI ui) { - - config = ui.getContextValue(I18nEditorConfig.class); - - I18nEditorContext ctxt = ui.getContextValue(I18nEditorContext.class); - - //TODO instead of seeking an ui model, must seek fro an incoming project... - I18nProject incomingProject = ctxt.getProject(); - - setCreate(incomingProject == null); - - if (incomingProject != null) { - - log.info("from a incoming project " + incomingProject); - if (log.isDebugEnabled()) { - log.debug("from a incoming project " + incomingProject); - } - I18nProjectProvider<?> provider = I18nProjectFactory.getProvider(incomingProject.getClass()); - setType(provider); - incomingProject.copyDefinitionTo(project); - } - } - - @Override - public void start() { - super.start(); - firePropertyChange(TYPE_PROPERTY_NAME, null, type); - firePropertyChange(PROJECT_PROPERTY_NAME, null, project); - if (!create && type != null && project != null) { - // ask to provider to fire every thing on the project ? - //TODO no! the project fire will do it in each specicialized project's ui - project.fireAllProperties(); - } - } - - @Override - public void updateUniverse() { - if (type == null) { - // pas de mode choisi donc l'univers ne change pas - return; - } - List<ProjectStep> universe = new ArrayList<ProjectStep>(); - universe.add(ProjectStep.CHOOSE_PROJECT_TYPE); - universe.add(ProjectStep.CONFIGURE_PROJECT); - - universe.add(ProjectStep.SELECT_BUNDLES); - universe.add(ProjectStep.PERSIST); - universe.add(ProjectStep.RESUME); - if (excludeSteps != null) { - universe.removeAll(excludeSteps); - } - setSteps(universe.toArray(new ProjectStep[universe.size()])); - } - - @Override - public boolean validate(ProjectStep s) { - boolean validate = super.validate(s); - if (validate) { - switch (s) { - case CHOOSE_PROJECT_TYPE: - validate = type != null; - break; - case CONFIGURE_PROJECT: - validate = type.validateUIModel(this); - break; - case SELECT_BUNDLES: - validate = !project.getUrls().isEmpty(); - break; - case PERSIST: - boolean storeProject = project.isStoreProject(); - if (storeProject) { - File storeFile = project.getStoreFile(); - if (create) { - validate = storeFile != null && !storeFile.exists(); - } else { - validate = storeFile != null && storeFile.exists(); - } - } - break; - case RESUME: -// validate = true; - break; - } - } - return validate; - } - - public I18nProjectProvider<?> getType() { - return type; - } - - public I18nProject getProject() { - return project; - } - - public <T extends I18nProject> T getProject(Class<T> projectClass) { - I18nProjectProvider<T> projectType = I18nProjectFactory.getProvider(projectClass); - if (!projects.containsKey(projectType)) { - throw new IllegalArgumentException(projectType + " is not a registred type"); - } - return (T) projects.get(projectType); - } - - public boolean isCreate() { - return create; - } - - public void setCreate(boolean create) { - this.create = create; - } - - public void setType(I18nProjectProvider<?> type) { - I18nProjectProvider<?> oldType = this.type; - this.type = type; - firePropertyChange(TYPE_PROPERTY_NAME, oldType, type); - I18nProject oldProject = project; - I18nProject newProject = projects.get(type); - project = newProject; - firePropertyChange(PROJECT_PROPERTY_NAME, oldProject, newProject); - validate(); - } - - /** - * Choisir un fichier via un sélecteur graphique de fichiers. - * - * @param parent le component swing appelant le controle - * @param title le titre du dialogue de sélection - * @param buttonLabel le label du boutton d'acceptation - * @param incoming le fichier de base à utilier - * @param filters les filtres + descriptions sur le sélecteur de fichiers - * @return le fichier choisi ou le fichier incoming si l'opération a été annulée - */ - public static File chooseFile(Component parent, String title, String buttonLabel, File incoming, String... filters) { - File oldBasedir = FileUtil.getCurrentDirectory(); - if (incoming != null) { - File basedir; - if (incoming.isFile()) { - basedir = incoming.getParentFile(); - } else { - basedir = incoming; - } - if (basedir.exists()) { - FileUtil.setCurrentDirectory(basedir); - } - } - File file = FileUtil.getFile(title, buttonLabel, parent, filters); - if (log.isDebugEnabled()) { - log.debug(title + " : " + file); - } - FileUtil.setCurrentDirectory(oldBasedir); - File result = file == null ? incoming : file; - return result; - } - - /** - * Choisir un répertoire via un sélecteur graphique de fichiers. - * - * @param parent le component swing appelant le controle - * @param title le titre de la boite de dialogue de sléection - * @param buttonLabel le label de l'action d'acceptation - * @param incoming le fichier de base à utiliser - * @return le répertoire choisi ou le répertoire incoming si l'opération a été annulée - */ - public static File chooseDirectory(Component parent, String title, String buttonLabel, File incoming) { - File oldBasedir = FileUtil.getCurrentDirectory(); - if (incoming != null) { - File basedir; - if (incoming.isFile()) { - basedir = incoming.getParentFile(); - } else { - basedir = incoming; - } - if (basedir.exists()) { - FileUtil.setCurrentDirectory(basedir); - } - } - String file = FileUtil.getDirectory(parent, title, buttonLabel); - if (log.isDebugEnabled()) { - log.debug(title + " : " + file); - } - FileUtil.setCurrentDirectory(oldBasedir); - return file == null ? incoming : new File(file); - } - - public List<URL> detectBundles() { - List<URL> urls; - try { - urls = type.detectBundles(this); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - // suppression du fichier pom.properties... - for (Iterator<URL> it = urls.iterator(); it.hasNext();) { - String path = it.next().toString(); - int index = path.lastIndexOf("/"); - path = path.substring(index + 1); - if (path.equals("pom.properties")) { - it.remove(); - } - } - return urls; - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/SelectBundlesTableModel.java b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/SelectBundlesTableModel.java deleted file mode 100644 index 6c27754..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/SelectBundlesTableModel.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ -package org.nuiton.i18n.editor.ui.project; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import javax.swing.table.AbstractTableModel; -import org.nuiton.i18n.I18n; - -/** - * Le modèle pour la tableau dans l'import GPS qui contient les activités et - * les points gps calculés via le fichier gps importé. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public class SelectBundlesTableModel extends AbstractTableModel { - - private static final long serialVersionUID = 1L; - protected static final String[] COLUMN_NAMES = { - I18n.n("i18neditor.createproject.common.select"), - I18n.n("i18neditor.createproject.url") - }; - protected static final Class<?>[] COLUMN_CLASSES = { - Boolean.class, - URL.class,}; - protected List<URL> entries; - protected Set<Integer> selected; - protected boolean selectAll; - - public SelectBundlesTableModel() { - selected = new HashSet<Integer>(); - } - - @Override - public Class<?> getColumnClass(int columnIndex) { - return COLUMN_CLASSES[columnIndex]; - } - - @Override - public boolean isCellEditable(int rowIndex, int columnIndex) { - return columnIndex == 0; - } - - public void setUrls(List<URL> entries) { - // on nettoye toujours le model lors de l'init d'une entité - this.entries = new ArrayList<URL>(entries); -// selected.clear(); - // par defaut, on selectionne toutes les references - setSelectAll(true); - //fireTableDataChanged(); - } - - public List<URL> getSelectedUrls() { - List<URL> result = new ArrayList<URL>(); - for (Integer index : selected) { - result.add(entries.get(index)); - } - return result; - } - - public void setSelectedUrls(List<URL> selectedUrls) { - setSelectAll(false); - - for (URL selectedUrl : selectedUrls) { - // trouver l'inder de l'url - String selectedUrlStr = selectedUrl.toString(); - int index = 0; - for (URL u : entries) { - if (selectedUrlStr.equals(u.toString())) { - selected.add(index); - break; - } - index++; - } - } - } - - public int[] getSelected() { - int[] result = new int[selected.size()]; - int i = 0; - for (Integer index : selected) { - result[i++] = index; - } - return result; - } - - public boolean hasSelection() { - return !selected.isEmpty(); - } - - @Override - public int getRowCount() { - return entries == null ? 0 : entries.size(); - } - - @Override - public int getColumnCount() { - return COLUMN_CLASSES.length; - } - - @Override - public Object getValueAt(int rowIndex, int columnIndex) { - Object value = null; - switch (columnIndex) { - case 0: - value = selected.contains(rowIndex); - break; - case 1: - value = getURLAt(rowIndex); - break; - default: - throw new IllegalStateException("can not get value for row " + rowIndex + ", col " + columnIndex); - } - return value; - } - - public String getTextValueAt(int rowIndex, int columnIndex) { - Object value = null; - - String text = ""; - URL p; - switch (columnIndex) { - case 0: - break; - case 1: - value = getURLAt(rowIndex); - String path = value.toString(); - int index = path.lastIndexOf("/"); - text = path.substring(index + 1) + "(" + path.substring(0, index) + ")"; - break; - default: - throw new IllegalStateException("can not get value for column " + columnIndex); - } - return text; - } - - public URL getURLAt(int rowIndex) { - return entries.get(rowIndex); - } - - @Override - public void setValueAt(Object aValue, int rowIndex, int columnIndex) { - if (columnIndex == 0) { - Boolean value = (Boolean) aValue; - if (value) { - selected.add(rowIndex); - if (selected.size() == getRowCount()) { - selectAll = true; - } - } else { - selected.remove(rowIndex); - if (selected.isEmpty()) { - selectAll = false; - } - } - fireTableCellUpdated(rowIndex, columnIndex); - } - - // no edit for others columns - } - - public boolean isSelectAll() { - return selectAll; - } - - public void setSelectAll(boolean selectAll) { - this.selectAll = selectAll; - selected.clear(); - if (selectAll) { - for (int i = 0, max = getRowCount(); i < max; i++) { - selected.add(i); - } - } - fireTableDataChanged(); - } -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.css b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.css deleted file mode 100644 index e266f7f..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.css +++ /dev/null @@ -1,41 +0,0 @@ -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - -#tabPanel { - layout:{new BorderLayout()}; - border:{new LineBorder(Color.BLACK,1,true)}; -} - -#progress { - indeterminate:false; - stringPainted:true; - string:{getProgressString(model.getStepIndex(model.getStep()), model.getSteps().size())}; - value:{1 + model.getStepIndex(model.getStep())}; - maximum:{model.getSteps().size()}; -} - -#descriptionPane { - columnHeaderView:{new JLabel(t("i18neditor.common.descrition"), SwingUtil.getUIManagerActionIcon("information"), 10)}; -} - -#description { - rows:3; - editable:false; - focusable:false; -} diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.jaxx deleted file mode 100644 index c54afa4..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/AbstractProjectTabPanelUI.jaxx +++ /dev/null @@ -1,92 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<JPanel id="tabPanel" - abstract='true' - implements='jaxx.runtime.swing.wizard.WizardStepUI<ProjectStep, ProjectUIModel>'> - -<import> -org.nuiton.i18n.editor.I18nEditorContext -org.nuiton.i18n.editor.I18nEditorConfig -org.nuiton.i18n.editor.ui.I18nEditorUIHandler -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -javax.swing.border.LineBorder -javax.swing.JLabel -java.awt.Color - -static org.nuiton.i18n.I18n.n -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -protected I18nEditorUIHandler handler = getContextValue(I18nEditorUIHandler.class); -protected I18nEditorConfig config = getContextValue(I18nEditorConfig.class); -protected I18nEditorContext context = getContextValue(I18nEditorContext.class); -protected ProjectUIModel model = getContextValue(ProjectUIModel.class); - -@Override -public ProjectStep getStep() { - return (ProjectStep) getClientProperty("step"); -} - -public ProjectUIModel getModel() { - return model; -} - -protected void setDescriptionText(String text) { - description.setText(text); -} - -protected String getProgressString(int currentStep, int nbStep) { - ProjectStep step = getStep(); - String txt = ""; - if (step != null) { - txt = n("i18neditor.project.step.label"); - txt = t(txt, currentStep + 1, nbStep, t(step.getLabel())); - } - return txt; -} -]]></script> - - <!-- layout pour la configuration specifique de chaque type de projet - on expose ici le layout sinon cela ne fonctionne pas (layout cree - apres 'content' : a fixer dans JAXX) --> - <jaxx.runtime.swing.CardLayout2Ext id='contentLayout' - constructorParams='this, "content"'/> - - <!-- titre --> - <JPanel layout='{new BorderLayout()}' constraints='BorderLayout.NORTH'> - <JProgressBar id='progress' constraints='BorderLayout.CENTER'/> - </JPanel> - - <!-- content --> - <JPanel id='content' constraints='BorderLayout.CENTER'/> - - <!-- description --> - <JScrollPane id="descriptionPane" constraints='BorderLayout.SOUTH'> - <JTextArea id='description'/> - </JScrollPane> - -</JPanel> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ChooseProjectTypePanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ChooseProjectTypePanelUI.jaxx deleted file mode 100644 index b75505a..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ChooseProjectTypePanelUI.jaxx +++ /dev/null @@ -1,86 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> -<!-- ***************************************** --> -<!-- L'écran de sélection de type de connexion --> -<!-- ***************************************** --> -<AbstractProjectTabPanelUI _step='{ProjectStep.CHOOSE_PROJECT_TYPE}'> - -<import> -java.beans.PropertyChangeEvent -java.beans.PropertyChangeListener -org.nuiton.i18n.editor.project.I18nProjectProvider -org.nuiton.i18n.editor.project.I18nProjectFactory -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.ui.project.ProjectStep - -javax.swing.JRadioButton -javax.swing.AbstractButton - -java.awt.GridBagConstraints -java.awt.Insets - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -void $afterCompleteSetup() { - // ajout des types de projets connus a partir des providers connus - int index = 0; - for (I18nProjectProvider<?> p : I18nProjectFactory.getProviders()) { - JRadioButton b = new JRadioButton(); - String name = "$JRadioButton" + index; - $objectMap.put( name, b); - b.setName(name); - b.putClientProperty("$buttonGroup", mode); - mode.add(b); - b.setText(t(p.getLabel())); - b.setToolTipText(t(p.getDescription())); - b.putClientProperty("$value", p); - mode.updateSelectedValue(); - content.add(b, new GridBagConstraints(0, index++, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0)); - } - // on ecoute les changement de type de projet - model.addPropertyChangeListener(ProjectUIModel.TYPE_PROPERTY_NAME, new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - I18nProjectProvider<?> newMode = (I18nProjectProvider<?>) evt.getNewValue(); - if (newMode != null) { - log.info("new project type : " + newMode); - AbstractButton c = mode.getButton(newMode); - c.setSelected(true); - setDescriptionText(t(newMode.getDescription())); - } - } - }); -} -]]> - </script> - - <ButtonGroup id='mode' - onStateChanged='model.setType((I18nProjectProvider) mode.getSelectedValue())'/> - - <Table id='content' fill='both' weightx='1' constraints='BorderLayout.CENTER'/> - -</AbstractProjectTabPanelUI> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ConfigureProjectPanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ConfigureProjectPanelUI.jaxx deleted file mode 100644 index e2bb903..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ConfigureProjectPanelUI.jaxx +++ /dev/null @@ -1,74 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<AbstractProjectTabPanelUI _step='{ProjectStep.CONFIGURE_PROJECT}'> - -<import> - -java.lang.reflect.Constructor - -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.project.I18nProjectProvider -org.nuiton.i18n.editor.project.I18nProjectFactory -org.nuiton.i18n.editor.project.I18nProjectConfigurePanelUI - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -protected String updateContentLayout(I18nProjectProvider<?> projectType) { - if (projectType == null) { - return "null"; - } - return projectType.getType().getName(); -} - -void $afterCompleteSetup() { - if (getStep()!=null) { - setDescriptionText(t(getStep().getDescription())); - } - for (I18nProjectProvider<?> p : I18nProjectFactory.getProviders()) { - try { - Class<? extends I18nProjectConfigurePanelUI> c = p.getUIClass(); - Constructor<? extends I18nProjectConfigurePanelUI> constructor = c.getConstructor(jaxx.runtime.JAXXContext.class); - I18nProjectConfigurePanelUI ui = constructor.newInstance(this); - getContent().add((java.awt.Component) ui, p.getType().getName()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -} -]]> - </script> - - <jaxx.runtime.swing.CardLayout2Ext id='contentLayout' - selected='{updateContentLayout(model.getType())}'/> - - <JPanel id='content' layout='{contentLayout}'> - - <JLabel text='i18neditor.createproject.no.type' constraints='"null"'/> - - </JPanel> - -</AbstractProjectTabPanelUI> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/PersistPanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/PersistPanelUI.jaxx deleted file mode 100644 index 265abc3..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/PersistPanelUI.jaxx +++ /dev/null @@ -1,183 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<AbstractProjectTabPanelUI _step='{ProjectStep.PERSIST}'> - -<import> -jaxx.runtime.SwingUtil - -java.beans.PropertyChangeEvent -java.beans.PropertyChangeListener - -org.nuiton.i18n.editor.I18nEditorConfig -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.project.I18nProject -org.nuiton.i18n.editor.project.AbstractI18nProject - -java.io.File - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -protected final I18nEditorConfig config = getContextValue(I18nEditorConfig.class); - -protected final PropertyChangeListener storeProjectPropertyChangeListener = new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - Boolean oldValue = (Boolean) evt.getOldValue(); - Boolean newValue = (Boolean) evt.getNewValue(); - if (newValue != null && newValue) { - if (getProject().getStoreFile() == null || getProject().getStoreFile().getParentFile() == null) { - getProject().setStoreFile(new File(config.getProjectsDirectory(), model.getProject().getName() + ".i18nproject")); - } - } - } -}; - -public void chooseProjectDirectory() { - File f = model.chooseDirectory ( - this, - t("i18neditor.title.choose.projectDir"), - t("i18neditor.action.choose.projectDir"), - new File(directoryText.getText())); - changeDirectory(f); -} - -public I18nProject getProject() { - return model.getProject(); -} - -protected void changeDirectory(File f) { - getProject().setStoreFile(new File(f, getProject().getName() + ".i18nproject")); -} - -void $afterCompleteSetup() { - if (getStep()!=null) { - setDescriptionText(t(getStep().getDescription())); - } - model.addPropertyChangeListener(ProjectUIModel.PROJECT_PROPERTY_NAME, new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - I18nProject oldProject = (I18nProject) evt.getOldValue(); - if (oldProject!=null) { - oldProject.removePropertyChangeListener(AbstractI18nProject.STORE_PROJECT_PROPERTY_NAME, storeProjectPropertyChangeListener); - } - I18nProject newProject = (I18nProject) evt.getNewValue(); - if (newProject!=null) { - newProject.addPropertyChangeListener(AbstractI18nProject.STORE_PROJECT_PROPERTY_NAME, storeProjectPropertyChangeListener); - } - if (log.isDebugEnabled()) { - log.debug("update binding for changed project " + newProject); - } - SwingUtil.applyDataBinding(PersistPanelUI.this, - "storeProject.selected", - "storeFilePanel.visible", - "directoryText.text", - "storeFilePath.text"); - } - }); -} - -@Override -public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { - for (PropertyChangeListener l : getPropertyChangeListeners(propertyName)) { - if (l == listener) { - // already registred listener - if (log.isDebugEnabled()) { - log.debug("already registred listener for property " + propertyName + " : " + listener); - } - return; - } - } - super.addPropertyChangeListener(propertyName, listener); -} - -protected String getStoreDirectory(File storeFile) { - if (storeFile == null || storeFile.getParentFile() == null) { - return ""; - } - return storeFile.getParentFile().getAbsolutePath(); -} -]]> - </script> - - - <JPanel id='content' constraints='BorderLayout.CENTER' layout='{new BorderLayout()}'> - <JPanel constraints='BorderLayout.NORTH' - layout='{new BorderLayout()}' - border='{BorderFactory.createTitledBorder("")}'> - <JCheckBox id='storeProject' - constraints='BorderLayout.CENTER' - text='i18neditor.createproject.doPersist' - selected='{getProject().isStoreProject()}' - onStateChanged='getProject().setStoreProject(((JCheckBox)event.getSource()).isSelected())'/> - </JPanel> - - <Table id='storeFilePanel' - constraints='BorderLayout.CENTER' - visible='{getProject().isStoreProject()}'> - <row> - <cell weightx='1' fill="both"> - <Table fill='both'> - <row> - <cell columns='2'> - <JLabel text='i18neditor.createproject.storeProject.directory'/> - </cell> - </row> - <row> - <cell weightx='1' fill="horizontal"> - <JTextField id='directoryText' - text='{getStoreDirectory(getProject().getStoreFile())}' - onKeyReleased='changeDirectory(new File(((JTextField)event.getSource()).getText()))'/> - <!--visible='{model.getProject().isStoreProject()}'--> - </cell> - <cell anchor="east"> - <JButton actionIcon='fileChooser' - onActionPerformed="chooseProjectDirectory()"/> - <!--visible='{model.getProject().isStoreProject()}'--> - </cell> - </row> - <row> - <cell columns='2'> - <JLabel text='i18neditor.createproject.storeProject.path'/> - <!--visible='{model.getProject().isStoreProject()}'/>--> - </cell> - </row> - <row> - <cell columns='2'> - <JLabel id='storeFilePath' - text='{getProject().getStoreFile() + ""}'/> - <!--visible='{model.getProject().isStoreProject()}'/>--> - </cell> - </row> - </Table> - </cell> - </row> - </Table> - </JPanel> -</AbstractProjectTabPanelUI> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ResumePanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ResumePanelUI.jaxx deleted file mode 100644 index 3c05c8d..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/ResumePanelUI.jaxx +++ /dev/null @@ -1,65 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<AbstractProjectTabPanelUI _step='{ProjectStep.RESUME}'> - -<import> -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.project.I18nProject -org.nuiton.i18n.editor.project.AbstractI18nProject - -javax.swing.JLabel - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - -void $afterCompleteSetup() { - if (getStep()!=null) { - setDescriptionText(t(getStep().getDescription())); - } -} - -String computeReport(ProjectUIModel model, ProjectStep step) { - return "TODO"; -} -]]> - </script> - - <JPanel id='content' - constraints='BorderLayout.CENTER' - layout='{new BorderLayout()}'> - <JScrollPane columnHeaderView='{new JLabel(t("i18neditor.common.resume"))}' - constraints='BorderLayout.CENTER'> - <JTextArea id='resume' - text='{computeReport(model, model.getStep())}' - editable='false' - focusable='false' - rows='10' - /> - </JScrollPane> - </JPanel> - -</AbstractProjectTabPanelUI> diff --git a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/SelectBundlesPanelUI.jaxx b/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/SelectBundlesPanelUI.jaxx deleted file mode 100644 index 3fc7652..0000000 --- a/nuiton-i18n-editor/src/main/java/org/nuiton/i18n/editor/ui/project/tabs/SelectBundlesPanelUI.jaxx +++ /dev/null @@ -1,64 +0,0 @@ -<!-- - -/** - * *##% Nuiton I18n Editor - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* - */ - ---> - -<AbstractProjectTabPanelUI _step='{ProjectStep.SELECT_BUNDLES}'> - -<import> -jaxx.runtime.SwingUtil -org.nuiton.i18n.editor.I18nEditorConfig -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.ProjectUIModel -org.nuiton.i18n.editor.ui.project.ProjectStep -org.nuiton.i18n.editor.ui.project.SelectBundlesTableModel - -static org.nuiton.i18n.I18n.t -</import> - - <script><![CDATA[ - - -void $afterCompleteSetup() { - if (getStep() != null) { - setDescriptionText(t(getStep().getDescription())); - } -} -]]> - </script> - - <SelectBundlesTableModel id='bundlesModel' - onTableChanged='model.getProject().setUrls(bundlesModel.getSelectedUrls())'/> - - <Table id='content' constraints='BorderLayout.CENTER' fill='both' weightx='1' weighty='1'> - <row> - <cell> - <JScrollPane columnHeaderView="{bundles.getTableHeader()}" - verticalScrollBarPolicy="{JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED}"> - - <JTable id='bundles' - model='{bundlesModel}'/> - </JScrollPane> - </cell> - </row> - </Table> - -</AbstractProjectTabPanelUI> diff --git a/nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp b/nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp deleted file mode 100644 index 9f90ec8..0000000 --- a/nuiton-i18n-editor/src/main/jnlp/jxlayer.jnlp +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp spec="1.0+" codebase="@url@" href="jxlayer.jnlp"> - <information> - <title>Swing X</title> - <vendor>Swing X</vendor> - <offline-allowed/> - </information> - <resources> - <jar href="lib/@lib@"/> - </resources> - <component-desc/> -</jnlp> \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/jnlp/sun.jnlp b/nuiton-i18n-editor/src/main/jnlp/sun.jnlp deleted file mode 100644 index f345d95..0000000 --- a/nuiton-i18n-editor/src/main/jnlp/sun.jnlp +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp"> - <information> - <title>Sun MicroSystems</title> - <vendor>Sun MicroSystems, Inc.</vendor> - <offline-allowed/> - </information> - <resources> - <jar href="lib/@lib@"/> - </resources> - <component-desc/> -</jnlp> \ No newline at end of file diff --git a/nuiton-i18n-editor/src/main/resources/META-INF/services/org.nuiton.i18n.editor.project.I18nProjectProvider b/nuiton-i18n-editor/src/main/resources/META-INF/services/org.nuiton.i18n.editor.project.I18nProjectProvider deleted file mode 100644 index 11ba62d..0000000 --- a/nuiton-i18n-editor/src/main/resources/META-INF/services/org.nuiton.i18n.editor.project.I18nProjectProvider +++ /dev/null @@ -1,2 +0,0 @@ -org.nuiton.i18n.editor.project.impl.JarI18nProjectProvider -org.nuiton.i18n.editor.project.impl.DirectoryI18nProjectProvider diff --git a/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_en_GB.properties b/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_en_GB.properties deleted file mode 100644 index 6249029..0000000 --- a/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_en_GB.properties +++ /dev/null @@ -1,121 +0,0 @@ -i18neditor.about.message=<h3>Nuiton i18n editor</h3><hr/><p>Project realised by <a href\="http\://codelutin.com">Codelutin</a> in 2009.</p><br/><hr/>For more information, visit the <a href\="http\://maven-site.nuiton.org/i18n/i18neditor">project's site</a>. -i18neditor.action.about=About -i18neditor.action.about.tip=Show about screen -i18neditor.action.apply=Apply -i18neditor.action.apply.tip= -i18neditor.action.cancel=Cancel -i18neditor.action.cancel.tip=Cancel -i18neditor.action.choose.directory.source.description= -i18neditor.action.choose.jar.source= -i18neditor.action.choose.jar.source.description= -i18neditor.action.choose.project= -i18neditor.action.choose.project.description= -i18neditor.action.choose.projectDir= -i18neditor.action.closeProject=Close the project -i18neditor.action.commandline.configure=Configure the application -i18neditor.action.commandline.disable.main.ui=Do not launch main ui -i18neditor.action.commandline.help=Show this help -i18neditor.action.configuration=Preferences -i18neditor.action.configuration.tip=show preferences screen -i18neditor.action.create=Create -i18neditor.action.createProject=Create project -i18neditor.action.delete.key.tip= -i18neditor.action.deleteProject=Delete project -i18neditor.action.editProject=Modify project -i18neditor.action.exit=Exit -i18neditor.action.exit.tip=Quit -i18neditor.action.fullscreen=Full screen -i18neditor.action.fullscreen.tip=Go into full screen mode -i18neditor.action.goto.next.stage=Continue -i18neditor.action.goto.next.stage.tip= -i18neditor.action.goto.previous.stage=Go back -i18neditor.action.goto.previous.stage.tip= -i18neditor.action.help=Show help -i18neditor.action.help.tip=Show help -i18neditor.action.new.bundle=New -i18neditor.action.new.package=New -i18neditor.action.normalscreen=Frame mode -i18neditor.action.normalscreen.tip=Go back in frame mode -i18neditor.action.openOtherProject=Open other project -i18neditor.action.openProject=Open a project -i18neditor.action.reload.application= -i18neditor.action.reset.value.tip= -i18neditor.action.save.value.tip= -i18neditor.action.showHelp.tip=Show context sensitve help -i18neditor.action.site=Website -i18neditor.action.site.tip=Go to web site of application -i18neditor.bundle.name=Locale \: %1$s -i18neditor.choose.project.to.delete= -i18neditor.common.descrition= -i18neditor.common.resume=Resume -i18neditor.config.category.directories=Directories -i18neditor.config.category.directories.description=Directories used by the application -i18neditor.config.category.ui=Application -i18neditor.config.category.ui.description=Other options used by the application -i18neditor.config.configFileName.description=configuration file -i18neditor.config.defaultProjectsDirectory.description=default directory where to store project definitions (*.i18nproject) -i18neditor.config.defaultTmpDirectory.description=tempory directory used by the application -i18neditor.config.ui.fullscreen=choose initial ui mode (true for full screen, false otherwise) -i18neditor.config.ui.locale=Language used by application (fr_FR, en_GB) -i18neditor.createProject.table.bundles.select= -i18neditor.createProject.table.bundles.select.tip= -i18neditor.createProject.table.bundles.url= -i18neditor.createProject.table.bundles.url.tip= -i18neditor.createbundle.label=Create a new bundle for all packages known -i18neditor.createbundle.newlanguage=NEw language -i18neditor.createbundle.newlocale=New locale -i18neditor.createbundle.title=Create bundle -i18neditor.createpackage.label=Create a new package (for all bundles known) -i18neditor.createpackage.newpackage=NEw language -i18neditor.createpackage.title=Create package -i18neditor.createproject.common.select= -i18neditor.createproject.directory.source.label= -i18neditor.createproject.doPersist= -i18neditor.createproject.jar.source.label= -i18neditor.createproject.name.label= -i18neditor.createproject.no.type= -i18neditor.createproject.storeProject.directory= -i18neditor.createproject.storeProject.path= -i18neditor.createproject.uniqueJarDefinition= -i18neditor.createproject.uniqueJarDefinition.tip= -i18neditor.createproject.url= -i18neditor.init.closed=Application was closed at %1$s -i18neditor.init.context.done=Initialisation of context done in %1$s. -i18neditor.init.ui.done=GUI initialized -i18neditor.main.menu.file=File -i18neditor.menu.bundles=Bundles -i18neditor.menu.help=Help -i18neditor.menu.packages=Packages -i18neditor.menu.storeall=Save all -i18neditor.message.config.loaded=Config of nuiton-i18n-editor v %1$s was loaded. -i18neditor.message.help.usage=Help of nuiton-i18n-editor v %1$s -i18neditor.message.no.project.loaded=< No project loaded > -i18neditor.no.keys=< No defined key > -i18neditor.package.name=Package \: %1$s -i18neditor.project.info.tip=Click here to display project's informations -i18neditor.project.step.chooseProjectType= -i18neditor.project.step.chooseProjectType.description= -i18neditor.project.step.configureProject= -i18neditor.project.step.configureProject.description= -i18neditor.project.step.label= -i18neditor.project.step.persist= -i18neditor.project.step.persist.description= -i18neditor.project.step.resume= -i18neditor.project.step.resume.description= -i18neditor.project.step.selecteBundles= -i18neditor.project.step.selecteBundles.description= -i18neditor.project.type.directory= -i18neditor.project.type.directory.description= -i18neditor.project.type.jar= -i18neditor.project.type.jar.description= -i18neditor.resource.name=Resource \: %1$s -i18neditor.title=Nuiton i18n editor < Project %1$s > -i18neditor.title.about=About Nuiton i18n editor -i18neditor.title.choose.directory.source= -i18neditor.title.choose.jar.source= -i18neditor.title.choose.project= -i18neditor.title.choose.projectDir= -i18neditor.title.noproject=Nuiton i18n editor < no project loaded > -i18neditor.title.project.info=Project's informations -i18neditor.warning.nimbus.landf=Could not find nymbus look and feel, please use at least a 1.6u10 version of sun jre -i18neditor.warning.no.ui=No ui environment detected\! diff --git a/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_fr_FR.properties b/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_fr_FR.properties deleted file mode 100644 index 550aa71..0000000 --- a/nuiton-i18n-editor/src/main/resources/i18n/nuiton-i18n-editor_fr_FR.properties +++ /dev/null @@ -1,121 +0,0 @@ -i18neditor.about.message=<h3>Nuiton i18n editor</h3><hr/><p>Projet réalisé par la société <a href\="http\://codelutin.com">Codelutin</a> en 2009.</p><br/><hr/>Pour plus d'informations, vous pouvez visiter le <a href\="http\://maven-site.nuiton.org/i18n/i18neditor">site du projet</a>. -i18neditor.action.about=A propos -i18neditor.action.about.tip=Afficher l'à propos -i18neditor.action.apply=Appliquer -i18neditor.action.apply.tip=Appliquer -i18neditor.action.cancel=Annuler -i18neditor.action.cancel.tip=Annuler -i18neditor.action.choose.directory.source.description=Répertoire -i18neditor.action.choose.jar.source=Choisir ce jar -i18neditor.action.choose.jar.source.description=Fichier jar (*.jar) -i18neditor.action.choose.project=Choisir ce projet -i18neditor.action.choose.project.description=Fichier de définition de project (*.i18nproject) -i18neditor.action.choose.projectDir=Choisir ce répertoire -i18neditor.action.closeProject=Fermer le projet -i18neditor.action.commandline.configure=Configurer l'application -i18neditor.action.commandline.disable.main.ui=Ne pas lancer l'interface graphique principale -i18neditor.action.commandline.help=Voir l'aide -i18neditor.action.configuration=Préférences -i18neditor.action.configuration.tip=Modifier les préférences -i18neditor.action.create=Créer -i18neditor.action.createProject=Créer un projet -i18neditor.action.delete.key.tip=Supprimer cette traduction -i18neditor.action.deleteProject=Supprimer un projet -i18neditor.action.editProject=Modifier le projet -i18neditor.action.exit=Quitter -i18neditor.action.exit.tip=Quitter l'application -i18neditor.action.fullscreen=Plein écran -i18neditor.action.fullscreen.tip=Passer en mode Plein écran -i18neditor.action.goto.next.stage=Continuer -i18neditor.action.goto.next.stage.tip=Continuer vers l'étape suivante -i18neditor.action.goto.previous.stage=Revenir -i18neditor.action.goto.previous.stage.tip=Revenir à l'étape précédente -i18neditor.action.help=Aide -i18neditor.action.help.tip=Affichier l'aide -i18neditor.action.new.bundle=Nouveau -i18neditor.action.new.package=Nouveau -i18neditor.action.normalscreen=Mode fenêtre -i18neditor.action.normalscreen.tip=retour en mode fenêtre -i18neditor.action.openOtherProject=Ouvrir un projet (autre répertoire) -i18neditor.action.openProject=Ouvrir un projet... -i18neditor.action.reload.application= -i18neditor.action.reset.value.tip=Réinitialiser -i18neditor.action.save.value.tip=Sauver la traduction modifiée -i18neditor.action.showHelp.tip=Voir l'aide contextuelle -i18neditor.action.site=Site -i18neditor.action.site.tip=Accéder au site du projet -i18neditor.bundle.name=Localisation \: %1$s -i18neditor.choose.project.to.delete=Choisir le projet à supprimer -i18neditor.common.descrition=Description -i18neditor.common.resume=Résumé -i18neditor.config.category.directories=Répertoires -i18neditor.config.category.directories.description=Les répertoires utilisées par l'application -i18neditor.config.category.ui=Application -i18neditor.config.category.ui.description=Les autres options de l'application -i18neditor.config.configFileName.description=Le nom du fichier de configuration -i18neditor.config.defaultProjectsDirectory.description=Le répertoire où sont sauvegarder les définitions de projets -i18neditor.config.defaultTmpDirectory.description=Le répertoire temporaire par défaut -i18neditor.config.ui.fullscreen=Pour afficher l'aplication en mode pleine écran -i18neditor.config.ui.locale=Langue utilisée par l'application (fr_FR, en_GB) -i18neditor.createProject.table.bundles.select=... -i18neditor.createProject.table.bundles.select.tip=Sélectionner - Déselectionner toutes les urls -i18neditor.createProject.table.bundles.url=Localisation -i18neditor.createProject.table.bundles.url.tip=location du bundle -i18neditor.createbundle.label=Créer un nouveau bundle pour les paquetages données -i18neditor.createbundle.newlanguage=Langue -i18neditor.createbundle.newlocale=Pays -i18neditor.createbundle.title=Nouveau bundle -i18neditor.createpackage.label=Créer un nouveau paquetage (pour tous les bundles connus) -i18neditor.createpackage.newpackage=Nouveau paquetage -i18neditor.createpackage.title=Créer un nouveau paquetage -i18neditor.createproject.common.select=... -i18neditor.createproject.directory.source.label=Répertoire de sauvegarde -i18neditor.createproject.doPersist=Sauver la définition du projet -i18neditor.createproject.jar.source.label=Choisir le jar source -i18neditor.createproject.name.label=Nom du projet -i18neditor.createproject.no.type=< Aucune type de projet sélectionné > -i18neditor.createproject.storeProject.directory=Répertoire de sauvegarde -i18neditor.createproject.storeProject.path=Fichier de sauvegarde -i18neditor.createproject.uniqueJarDefinition=Utilisation d'un bundle final -i18neditor.createproject.uniqueJarDefinition.tip=Utilisation d'un bundle final (un seul bundle) -i18neditor.createproject.url=Localisation -i18neditor.init.closed=Nuiton-i18n-editor a été fermé à %1$s -i18neditor.init.context.done=Initialisation du contexte terminée en %1$s. -i18neditor.init.ui.done=Initialisation de l'interface graphique terminée. -i18neditor.main.menu.file=Fichier -i18neditor.menu.bundles=Bundles -i18neditor.menu.help=Aide -i18neditor.menu.packages=Paquetages -i18neditor.menu.storeall=Sauvegarder -i18neditor.message.config.loaded=Configuration de nuiton-i18n-editor v. %1$s chargée. -i18neditor.message.help.usage=Aide de nuiton-i18n-editor v %1$s -i18neditor.message.no.project.loaded=< Aucun projet chargé > -i18neditor.no.keys=< Aucune clef definie > -i18neditor.package.name=Paquetage \: %1$s -i18neditor.project.info.tip=Cliquer ici pour obtenir des informations sur le projet chargé -i18neditor.project.step.chooseProjectType=Type de projet -i18neditor.project.step.chooseProjectType.description=Choisir le type de projet à ouvrir -i18neditor.project.step.configureProject=Configuration -i18neditor.project.step.configureProject.description=Configurer le projet -i18neditor.project.step.label=Etape %1$d/%2$d \: %3$s -i18neditor.project.step.persist=Sauvegarde -i18neditor.project.step.persist.description=Permet de sauvegarder la définition du projet -i18neditor.project.step.resume=Resume -i18neditor.project.step.resume.description=Voir le résumé du projet à ouvrir -i18neditor.project.step.selecteBundles=Bundles -i18neditor.project.step.selecteBundles.description=Choisir les bundles du projet parmi ceux détectés -i18neditor.project.type.directory=Répertoire -i18neditor.project.type.directory.description=Ouvrir un projet à partir d'un répertoire -i18neditor.project.type.jar=Jar (ou zip) -i18neditor.project.type.jar.description=Ouvrir un projet à partir d'un jar -i18neditor.resource.name=Resource \: %1$s -i18neditor.title=Nuiton i18n editor < Projet %1$s > -i18neditor.title.about=A propos de nuiton-i18n-editor... -i18neditor.title.choose.directory.source=Choisir le répertoire -i18neditor.title.choose.jar.source=Choisir un fichier de type 'jar' -i18neditor.title.choose.project=Choisir le fichier de définition d'un projet -i18neditor.title.choose.projectDir=Choisir une définition de projet -i18neditor.title.noproject=Nuiton i18n editor < aucun projet chargé > -i18neditor.title.project.info=Informations sur le projet -i18neditor.warning.nimbus.landf=Le look and Feel Nimbus n'a pas été trouvé, il faut au moins la version 1.6u10 de java. -i18neditor.warning.no.ui=Aucun environnement graphique détecté diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-about.png b/nuiton-i18n-editor/src/main/resources/icons/action-about.png deleted file mode 100644 index 0d826bb..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-about.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-accept.png b/nuiton-i18n-editor/src/main/resources/icons/action-accept.png deleted file mode 100644 index 89c8129..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-accept.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-add.png b/nuiton-i18n-editor/src/main/resources/icons/action-add.png deleted file mode 100644 index 6332fef..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-add.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-calculator.png b/nuiton-i18n-editor/src/main/resources/icons/action-calculator.png deleted file mode 100644 index 701a60a..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-calculator.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-cancel.png b/nuiton-i18n-editor/src/main/resources/icons/action-cancel.png deleted file mode 100644 index c149c2b..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-cancel.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-close.png b/nuiton-i18n-editor/src/main/resources/icons/action-close.png deleted file mode 100644 index 2541d2b..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-close.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-closeTab.png b/nuiton-i18n-editor/src/main/resources/icons/action-closeTab.png deleted file mode 100644 index 93edaf0..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-closeTab.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-collapseAll.png b/nuiton-i18n-editor/src/main/resources/icons/action-collapseAll.png deleted file mode 100644 index f88a24a..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-collapseAll.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-combobox-reset.png b/nuiton-i18n-editor/src/main/resources/icons/action-combobox-reset.png deleted file mode 100644 index 0fb00f9..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-combobox-reset.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-combobox-sort.png b/nuiton-i18n-editor/src/main/resources/icons/action-combobox-sort.png deleted file mode 100644 index 188e1c1..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-combobox-sort.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-config.png b/nuiton-i18n-editor/src/main/resources/icons/action-config.png deleted file mode 100644 index 9460dfc..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-config.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-connect_creating.png b/nuiton-i18n-editor/src/main/resources/icons/action-connect_creating.png deleted file mode 100644 index 258b65b..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-connect_creating.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-connect_no.png b/nuiton-i18n-editor/src/main/resources/icons/action-connect_no.png deleted file mode 100644 index 3c832d4..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-connect_no.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-connect_ok.png b/nuiton-i18n-editor/src/main/resources/icons/action-connect_ok.png deleted file mode 100644 index 2bd16cc..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-connect_ok.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-connect_untested.png b/nuiton-i18n-editor/src/main/resources/icons/action-connect_untested.png deleted file mode 100644 index 61a8556..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-connect_untested.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-connected.png b/nuiton-i18n-editor/src/main/resources/icons/action-connected.png deleted file mode 100644 index 024138e..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-connected.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-db-change.png b/nuiton-i18n-editor/src/main/resources/icons/action-db-change.png deleted file mode 100644 index 3a11197..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-db-change.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-db-local.png b/nuiton-i18n-editor/src/main/resources/icons/action-db-local.png deleted file mode 100644 index fed6221..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-db-local.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-db-none.png b/nuiton-i18n-editor/src/main/resources/icons/action-db-none.png deleted file mode 100644 index cce652e..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-db-none.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-db-remote.png b/nuiton-i18n-editor/src/main/resources/icons/action-db-remote.png deleted file mode 100644 index 49b2691..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-db-remote.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-delete.png b/nuiton-i18n-editor/src/main/resources/icons/action-delete.png deleted file mode 100644 index 184f762..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-delete.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-edit.png b/nuiton-i18n-editor/src/main/resources/icons/action-edit.png deleted file mode 100644 index 188e1c1..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-edit.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-exit.png b/nuiton-i18n-editor/src/main/resources/icons/action-exit.png deleted file mode 100644 index a77152b..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-exit.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-expandAll.png b/nuiton-i18n-editor/src/main/resources/icons/action-expandAll.png deleted file mode 100644 index 3c19e48..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-expandAll.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-fileChooser.png b/nuiton-i18n-editor/src/main/resources/icons/action-fileChooser.png deleted file mode 100644 index 523a651..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-fileChooser.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-fullscreen.png b/nuiton-i18n-editor/src/main/resources/icons/action-fullscreen.png deleted file mode 100644 index 6845e04..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-fullscreen.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-go-back.png b/nuiton-i18n-editor/src/main/resources/icons/action-go-back.png deleted file mode 100644 index 5dc6967..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-go-back.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-go-detail.png b/nuiton-i18n-editor/src/main/resources/icons/action-go-detail.png deleted file mode 100644 index aba044b..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-go-detail.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-go-down.png b/nuiton-i18n-editor/src/main/resources/icons/action-go-down.png deleted file mode 100644 index 2c4e279..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-go-down.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-go-jump.png b/nuiton-i18n-editor/src/main/resources/icons/action-go-jump.png deleted file mode 100644 index 1d218c3..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-go-jump.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-go-up.png b/nuiton-i18n-editor/src/main/resources/icons/action-go-up.png deleted file mode 100644 index 1ebb193..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-go-up.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-help.png b/nuiton-i18n-editor/src/main/resources/icons/action-help.png deleted file mode 100644 index 4ed65a9..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-help.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-es.png b/nuiton-i18n-editor/src/main/resources/icons/action-i18n-es.png deleted file mode 100644 index c2de2d7..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-es.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-fr.png b/nuiton-i18n-editor/src/main/resources/icons/action-i18n-fr.png deleted file mode 100644 index 8332c4e..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-fr.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-gb.png b/nuiton-i18n-editor/src/main/resources/icons/action-i18n-gb.png deleted file mode 100644 index ff701e1..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-i18n-gb.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-import-gps.png b/nuiton-i18n-editor/src/main/resources/icons/action-import-gps.png deleted file mode 100644 index 68f21d3..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-import-gps.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-information.png b/nuiton-i18n-editor/src/main/resources/icons/action-information.png deleted file mode 100644 index 12cd1ae..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-information.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-leave-fullscreen.png b/nuiton-i18n-editor/src/main/resources/icons/action-leave-fullscreen.png deleted file mode 100644 index fc6638e..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-leave-fullscreen.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-local-export.png b/nuiton-i18n-editor/src/main/resources/icons/action-local-export.png deleted file mode 100644 index 91e3b24..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-local-export.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-local-import.png b/nuiton-i18n-editor/src/main/resources/icons/action-local-import.png deleted file mode 100644 index cafac61..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-local-import.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-mode-create.png b/nuiton-i18n-editor/src/main/resources/icons/action-mode-create.png deleted file mode 100644 index e2f0847..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-mode-create.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-mode-read.png b/nuiton-i18n-editor/src/main/resources/icons/action-mode-read.png deleted file mode 100644 index d8e23ec..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-mode-read.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-mode-update.png b/nuiton-i18n-editor/src/main/resources/icons/action-mode-update.png deleted file mode 100644 index 6e756cc..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-mode-update.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-next-step.png b/nuiton-i18n-editor/src/main/resources/icons/action-next-step.png deleted file mode 100644 index 6ef8de7..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-next-step.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-open.png b/nuiton-i18n-editor/src/main/resources/icons/action-open.png deleted file mode 100644 index 41676a0..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-open.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-previous-step.png b/nuiton-i18n-editor/src/main/resources/icons/action-previous-step.png deleted file mode 100644 index 659cd90..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-previous-step.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-remote-export.png b/nuiton-i18n-editor/src/main/resources/icons/action-remote-export.png deleted file mode 100644 index 44c06dd..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-remote-export.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-remote-import.png b/nuiton-i18n-editor/src/main/resources/icons/action-remote-import.png deleted file mode 100644 index ff803be..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-remote-import.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-revert.png b/nuiton-i18n-editor/src/main/resources/icons/action-revert.png deleted file mode 100644 index 197b8a7..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-revert.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-save.png b/nuiton-i18n-editor/src/main/resources/icons/action-save.png deleted file mode 100644 index 41b3f43..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-save.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-select-ssl-cert.png b/nuiton-i18n-editor/src/main/resources/icons/action-select-ssl-cert.png deleted file mode 100644 index ca93f0d..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-select-ssl-cert.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-show-help.png b/nuiton-i18n-editor/src/main/resources/icons/action-show-help.png deleted file mode 100644 index f6bc721..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-show-help.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-site.png b/nuiton-i18n-editor/src/main/resources/icons/action-site.png deleted file mode 100644 index ac5957a..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-site.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-synch.png b/nuiton-i18n-editor/src/main/resources/icons/action-synch.png deleted file mode 100644 index 3fd71d6..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-synch.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-pause.png b/nuiton-i18n-editor/src/main/resources/icons/action-synchro-pause.png deleted file mode 100644 index 2d9ce9c..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-pause.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-start.png b/nuiton-i18n-editor/src/main/resources/icons/action-synchro-start.png deleted file mode 100644 index 0846555..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-start.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-stop.png b/nuiton-i18n-editor/src/main/resources/icons/action-synchro-stop.png deleted file mode 100644 index 893bb60..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-synchro-stop.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-translate.png b/nuiton-i18n-editor/src/main/resources/icons/action-translate.png deleted file mode 100644 index 63ce64d..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-translate.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-unconnected.png b/nuiton-i18n-editor/src/main/resources/icons/action-unconnected.png deleted file mode 100644 index b335cb1..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-unconnected.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/action-validate.png b/nuiton-i18n-editor/src/main/resources/icons/action-validate.png deleted file mode 100644 index a9925a0..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/action-validate.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/logo OT_rvb.png b/nuiton-i18n-editor/src/main/resources/icons/logo OT_rvb.png deleted file mode 100644 index 1c35a25..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/logo OT_rvb.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/logo-OT_web.png b/nuiton-i18n-editor/src/main/resources/icons/logo-OT_web.png deleted file mode 100644 index e6b87bd..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/logo-OT_web.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/icons/logo_ird.png b/nuiton-i18n-editor/src/main/resources/icons/logo_ird.png deleted file mode 100644 index 87405cc..0000000 Binary files a/nuiton-i18n-editor/src/main/resources/icons/logo_ird.png and /dev/null differ diff --git a/nuiton-i18n-editor/src/main/resources/log4j.properties b/nuiton-i18n-editor/src/main/resources/log4j.properties deleted file mode 100644 index ee9f182..0000000 --- a/nuiton-i18n-editor/src/main/resources/log4j.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Global logging configuration -log4j.rootLogger=ERROR, stdout -# Console output... -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n -#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X -# package level -log4j.logger.org.nuiton=WARN -log4j.logger.org.nuiton.i18n.editor=INFO -#log4j.logger.org.nuiton.util.Resource=DEBUG -#log4j.logger.org.nuiton.i18n.editor.I18nEditorConfig=DEBUG -log4j.logger.jaxx.runtime.swing.editor.config=DEBUG -log4j.logger.jaxx.runtime.swing.editor=DEBUG diff --git a/nuiton-i18n-editor/src/site/apt/index.apt b/nuiton-i18n-editor/src/site/apt/index.apt deleted file mode 100644 index fc25dc0..0000000 --- a/nuiton-i18n-editor/src/site/apt/index.apt +++ /dev/null @@ -1,25 +0,0 @@ ----- -Nuiton-i18n-editor ----- ----- -2009-08-22 ----- - -Présentation - - Application swing pour éditer des bundles i18n. - -Set it in action from Web - -~~[images/webstart.gif] webstart - - To run this application in - {{{http://java.sun.com/products/javawebstart/} Java Web Start}}, - click the {{{launch-nuiton-i18n-editor.jnlp}following link}}. - - Actually does not work very well, prefer use the zip version... - -Set it in action from Zip - - You can download at the section download the zip file, extract it and then - launch <go.sh> or <go.bat>. diff --git a/nuiton-i18n-editor/src/site/site_fr.xml b/nuiton-i18n-editor/src/site/site_fr.xml deleted file mode 100644 index 0efc98e..0000000 --- a/nuiton-i18n-editor/src/site/site_fr.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project name="${project.name}"> - - <skin> - <groupId>org.nuiton</groupId> - <artifactId>maven-nuiton-skin</artifactId> - <version>1.0.0</version> - </skin> - - <bannerLeft> - <name>${project.name}</name> - <href>index.html</href> - </bannerLeft> - - <bannerRight> - <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src> - <href>${project.organization.url}</href> - </bannerRight> - - <poweredBy> - <logo href="${siteCommonResourcesUrl}/jaxx" name="JAXX" img="images/jaxx-logo.png"/> - <logo href="http://jrst.labs.libre-entreprise.org/jrst" name="JRst" - img="images/jrst-logo.png"/> - - <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" - img="images/restructuredtext-logo.png"/> - </poweredBy> - - <body> - - <breadcrumbs> - <item name="${project.name}" href="${project.url}" /> - </breadcrumbs> - - <menu name="Utilisateur"> - <item name="Accueil" href="index.html"/> - <item href="launch-${project.artifactId}.jnlp" - src="images/webstart.gif" - name="Démarrer la dernière version"/> - <item href="${project.build.finalName}-bin.zip" - name="Télécharger la dernière version"/> - </menu> - - <menu name="Développeur"> - <item name="A faire" href="Todo.html"/> - </menu> - - <menu ref="reports"/> - - </body> -</project> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm