Author: tchemit Date: 2013-11-12 09:22:10 +0100 (Tue, 12 Nov 2013) New Revision: 2745 Url: http://nuiton.org/projects/jaxx/repository/revisions/2745 Log: fixes #2909: Add a reset button on FileEditor fixes #2907: Updates mavenpom to 4.3 fixes #2908: improve jws launching Added: trunk/jaxx-widgets/src/main/resources/icons/action-fileeditor-reset.png Modified: trunk/jaxx-demo/pom.xml trunk/jaxx-demo/src/main/java/jaxx/demo/component/jaxx/editor/FileEditorDemo.jaxx trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_en_GB.properties trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_es_ES.properties trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_fr_FR.properties trunk/jaxx-demo/src/main/resources/log4j.properties trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_en_GB.properties trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_es_ES.properties trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_fr_FR.properties trunk/pom.xml Modified: trunk/jaxx-demo/pom.xml =================================================================== --- trunk/jaxx-demo/pom.xml 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/pom.xml 2013-11-12 08:22:10 UTC (rev 2745) @@ -293,82 +293,6 @@ <profiles> - <profile> - <id>jnlpwar-profile</id> - <dependencies> - <dependency> - <groupId>org.codehaus.mojo</groupId> - <artifactId>webstart-jnlp-servlet</artifactId> - <version>${webstartPluginVersion}</version> - </dependency> - </dependencies> - <build> - <plugins> - <!-- key store secrets availables --> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>helper-maven-plugin</artifactId> - <executions> - <execution> - <id>get-keystore</id> - <goals> - <goal>share-server-secret</goal> - </goals> - <phase>package</phase> - <configuration> - <serverId>codelutin-keystore</serverId> - <privateKeyOut>keystorepath</privateKeyOut> - <passwordOut>keystorepass</passwordOut> - <usernameOut>keyalias</usernameOut> - <passphraseOut>keypass</passphraseOut> - </configuration> - </execution> - </executions> - </plugin> - - <!-- make webstart --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>webstart-maven-plugin</artifactId> - <executions> - <execution> - <id>generate-jnlp</id> - <phase>package</phase> - <goals> - <goal>jnlp-download-servlet</goal> - </goals> - <configuration> - <outputDirectoryName>jnlp</outputDirectoryName> - <excludeTransitive>false</excludeTransitive> - <libPath>apps</libPath> - <outputJarVersions>true</outputJarVersions> - <!--dependencies> - <includes> - <include>be.irisnet.nova:nova-common</include> - </includes> - </dependencies--> - <jnlpFiles> - <jnlpFile> - <!--templateFilename>template_com.jnlp</templateFilename> - <outputFilename>client_com.jnlp</outputFilename--> - <jarResources> - <jarResource> - <groupId>${project.groupId}</groupId> - <artifactId>jaxx-demo</artifactId> - <version>${project.version}</version> - <mainClass>${maven.jar.main.class}</mainClass> - </jarResource> - </jarResources> - </jnlpFile> - </jnlpFiles> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <!-- by default jnlp is only perform on a release stage when using the maven-release-plugin --> <profile> <id>release-jnlp-profile</id> @@ -436,25 +360,14 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>webstart-maven-plugin</artifactId> <version>${webstartPluginVersion}</version> + <configuration> + <siteJnlpFile>${jnlpFileName}</siteJnlpFile> + </configuration> </plugin> </plugins> </reporting> </profile> - <profile> - <id>staging-site-profile</id> - <activation> - <property> - <name>stagingSite</name> - <value>true</value> - </property> - </activation> - <properties> - <jnlp.codebase>http://maven-site.liosalfar/jaxx/jaxx-demo/jnlp - </jnlp.codebase> - </properties> - </profile> - </profiles> </project> Modified: trunk/jaxx-demo/src/main/java/jaxx/demo/component/jaxx/editor/FileEditorDemo.jaxx =================================================================== --- trunk/jaxx-demo/src/main/java/jaxx/demo/component/jaxx/editor/FileEditorDemo.jaxx 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/src/main/java/jaxx/demo/component/jaxx/editor/FileEditorDemo.jaxx 2013-11-12 08:22:10 UTC (rev 2745) @@ -32,6 +32,7 @@ <Boolean id='acceptAllFileFilterUsed' javaBean='Boolean.TRUE'/> <Boolean id='directoryEnabled' javaBean='Boolean.TRUE'/> <Boolean id='fileEnabled' javaBean='Boolean.FALSE'/> + <Boolean id='showReset' javaBean='Boolean.TRUE'/> <Table fill='both' constraints='BorderLayout.CENTER'> <row> @@ -97,11 +98,22 @@ </cell> </row> <row> + <cell fill='horizontal' weightx='1'> + <JLabel text='jaxxdemo.fileEditor.showResetLabel'/> + </cell> + <cell fill='horizontal' weightx='1'> + <JCheckBox id='showResetCheckBox' + selected='{isShowReset()}' + onActionPerformed='setShowReset(showResetCheckBox.isSelected())'/> + </cell> + </row> + <row> <cell fill='horizontal' weightx='1' columns='2'> <FileEditor id='fileChooser' title='{getTitle()}' exts='{getExts()}' directoryEnabled='{isDirectoryEnabled()}' + showReset='{isShowReset()}' fileEnabled='{isFileEnabled()}' acceptAllFileFilterUsed='{isAcceptAllFileFilterUsed()}' extsDescription='{getExtsDescription()}'/> Modified: trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_en_GB.properties =================================================================== --- trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_en_GB.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_en_GB.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -249,6 +249,7 @@ jaxxdemo.fileEditor.extsDescLbl=Extensions description (separated by comma, ex \: text (*.txt), images (*.png)) jaxxdemo.fileEditor.extsLbl=Extensions (separated by comma, ex \: txt, png) jaxxdemo.fileEditor.fileEnabled=Enable file selection +jaxxdemo.fileEditor.showResetLabel=Show Reset button jaxxdemo.fileEditor.titleLbl=Open dialog title jaxxdemo.fun=Fun jaxxdemo.i18neditor.configuration=Configuration Modified: trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_es_ES.properties =================================================================== --- trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_es_ES.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_es_ES.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -250,6 +250,7 @@ jaxxdemo.fileEditor.extsDescLbl=Description des extensions (séparées par des virgules, ex \: Texte (*.txt), Images (*.png)) jaxxdemo.fileEditor.extsLbl=Extensions (separated by comma, ex \: txt, png) jaxxdemo.fileEditor.fileEnabled=Activer la sélection des fichiers +jaxxdemo.fileEditor.showResetLabel= jaxxdemo.fileEditor.titleLbl=Titre du dialog d'ouverture de fichier jaxxdemo.fun=Fun jaxxdemo.i18neditor.configuration=Configuration Modified: trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_fr_FR.properties =================================================================== --- trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_fr_FR.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/src/main/resources/i18n/jaxx-demo_fr_FR.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -249,6 +249,7 @@ jaxxdemo.fileEditor.extsDescLbl=Description des extensions (séparées par des virgules, ex \: Texte (*.txt), Images (*.png)) jaxxdemo.fileEditor.extsLbl=Extensions (separated by comma, ex \: txt, png) jaxxdemo.fileEditor.fileEnabled=Activer la sélection des fichiers +jaxxdemo.fileEditor.showResetLabel=Voir le bouton réintialiser jaxxdemo.fileEditor.titleLbl=Titre de la fenêtre de sélection de fichier jaxxdemo.fun=Fun jaxxdemo.i18neditor.configuration=Configuration Modified: trunk/jaxx-demo/src/main/resources/log4j.properties =================================================================== --- trunk/jaxx-demo/src/main/resources/log4j.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-demo/src/main/resources/log4j.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -31,8 +31,8 @@ log4j.logger.jaxx=INFO #log4j.logger.jaxx.demo=INFO -log4j.logger.jaxx.demo.tree=DEBUG -log4j.logger.jaxx.runtime.swing.tree=DEBUG +#log4j.logger.jaxx.demo.tree=DEBUG +#log4j.logger.jaxx.runtime.swing.tree=DEBUG #log4j.logger.jaxx.demo.component.jaxx.tree=DEBUG #log4j.logger.jaxx.demo.config.DemoConfig=DEBUG #log4j.logger.jaxx.runtime.swing.editor.config=INFO Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/FileEditor.jaxx 2013-11-12 08:22:10 UTC (rev 2745) @@ -47,22 +47,27 @@ <String id='extsDescription' javaBean='null'/> + <!-- show reset property --> + <Boolean id='showReset' javaBean='false'/> + <script><![CDATA[ protected File selectedFile; public void setSelectedFile(File selectedFile) { this.selectedFile = selectedFile; - if (selectedFile != null) { - setStartPath(selectedFile.getAbsolutePath()); - fireActionEvent(); - } + setStartPath(selectedFile == null ? null : selectedFile.getAbsolutePath()); + fireActionEvent(); } -public void setSelectedFile(String startPath) { +public void setSelectedFilePath(String startPath) { + setSelectedFile(startPath == null ? null : new File(startPath)); +} + +/**public void setSelectedFile(String startPath) { this.selectedFile = null; setStartPath(startPath); fireActionEvent(); -} +}*/ public File getSelectedFile() { if (selectedFile == null) { @@ -79,11 +84,26 @@ ]]></script> + <JToolBar id='toolbar' + floatable='false' + borderPainted='false' + visible='{isShowReset()}' + constraints='BorderLayout.WEST'> + <JButton id='resetButton' + actionIcon='fileeditor-reset' + toolTipText='fileeditor.action.reset.tip' + focusable='false' + focusPainted='false' + enabled='{isEnabled()}' + onActionPerformed='setSelectedFile(null)'/> + </JToolBar> + + <JTextField id='pathField' constraints='BorderLayout.CENTER' enabled='{isEnabled()}' text='{getStartPath()}' - onKeyReleased='setSelectedFile(pathField.getText())'/> + onKeyReleased='setSelectedFilePath(pathField.getText())'/> <JButton id='boutonXslLocation' constraints='BorderLayout.EAST' Modified: trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_en_GB.properties =================================================================== --- trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_en_GB.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_en_GB.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -68,6 +68,7 @@ errorUI.action.close=Close errorUI.message=An error wad detected... errorUI.title=Error... +fileeditor.action.reset.tip=Reset fontsize.action.default.tip=Restore default font size fontsize.action.down.tip=Decrease font size fontsize.action.up.tip=Increase font size Modified: trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_es_ES.properties =================================================================== --- trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_es_ES.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_es_ES.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -68,6 +68,7 @@ errorUI.action.close=Cerrar errorUI.message=ha habido un error \! errorUI.title=Error... +fileeditor.action.reset.tip=Reinicializar fontsize.action.default.tip=Volver al tamaño por defecto fontsize.action.down.tip=Disminuir el tamaño del origen fontsize.action.up.tip=Aumentar el tamaño de la fuente Modified: trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_fr_FR.properties =================================================================== --- trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_fr_FR.properties 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/jaxx-widgets/src/main/resources/i18n/jaxx-widgets_fr_FR.properties 2013-11-12 08:22:10 UTC (rev 2745) @@ -68,6 +68,7 @@ errorUI.action.close=Fermer errorUI.message=Une erreur est survenue \! errorUI.title=Erreur... +fileeditor.action.reset.tip=Réinitialiser fontsize.action.default.tip=Retour sur la taille par défaut fontsize.action.down.tip=Diminuer la taille de la police fontsize.action.up.tip=Augmenter la taille de la police Copied: trunk/jaxx-widgets/src/main/resources/icons/action-fileeditor-reset.png (from rev 2744, trunk/jaxx-widgets/src/main/resources/icons/action-numbereditor-reset.png) =================================================================== (Binary files differ) Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-10-25 15:51:24 UTC (rev 2744) +++ trunk/pom.xml 2013-11-12 08:22:10 UTC (rev 2745) @@ -23,14 +23,16 @@ <http://www.gnu.org/licenses/lgpl-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/xsd/maven-4.0.0.xsd"> +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom4redmineAndCentral</artifactId> - <version>4.1</version> + <version>4.3</version> </parent> <artifactId>jaxx</artifactId> @@ -128,6 +130,10 @@ <i18n.bundles>fr_FR,en_GB,es_ES</i18n.bundles> <site.verbose>true</site.verbose> + + <!-- jnlp configuration --> + <jnlpFileName>jaxx-demo.jnlp</jnlpFileName> + <!-- FIXME-tchemit-2012-07-02 Still not working, normalize all rst docs --> <!--pdfGenerationEnabled>true</pdfGenerationEnabled--> </properties> @@ -306,7 +312,7 @@ <version>${swingXVersion}</version> <scope>compile</scope> </dependency> - + <dependency> <groupId>org.swinglabs.swingx</groupId> <artifactId>swingx-common</artifactId> @@ -443,11 +449,18 @@ <libPath>lib</libPath> <makeArchive>false</makeArchive> <verbose>false</verbose> - <canUnsign>false</canUnsign> + <updateManifestEntries> + <Application-Name>jTimer ${project.version}</Application-Name> + <Permissions>all-permissions</Permissions> + <Codebase>*</Codebase> + </updateManifestEntries> + <!-- TODO Use this this webstart 1.0-beta-5 --> + <!--<outputJarVersions>true</outputJarVersions>--> <jnlp> <mainClass>${maven.jar.main.class}</mainClass> <allPermissions>true</allPermissions> <offlineAllowed>true</offlineAllowed> + <outputFile>${jnlpFileName}</outputFile> </jnlp> <sign> <keystore>${keystorepath}</keystore> @@ -462,9 +475,15 @@ </sign> <gzip>true</gzip> <unsign>true</unsign> - <canUnsign>false</canUnsign> + <canUnsign>true</canUnsign> + <unsignAlreadySignedJars>true</unsignAlreadySignedJars> <!--Can't use pack2000 since there is some already signed jar--> - <!--<pack200>true</pack200>--> + <pack200> + <enabled>true</enabled> + <passFiles> + <passFile></passFile> + </passFiles> + </pack200> <jnlpExtensions> <!--jnlpExtension> <name>sun</name>