r1553 - in isis-fish/trunk/src/main: java/fr/ifremer/isisfish/logging/console uimodel/fr/ifremer/isisfish/logging/console uimodel/fr/ifremer/isisfish/ui uimodel/fr/ifremer/isisfish/ui/logging uimodel/fr/ifremer/isisfish/ui/logging/console uimodel/fr/ifremer/isisfish/ui/script uimodel/fr/ifremer/isisfish/ui/script/jaxx uimodel/fr/ifremer/isisfish/ui/versionning uimodel/fr/ifremer/isisfish/ui/versionning/jaxx uimodel/fr/ifremer/isisfish/versionning/ui/jaxx
Author: tchemit Date: 2008-10-13 17:01:29 +0000 (Mon, 13 Oct 2008) New Revision: 1553 Added: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogConsoleUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogMailUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ExportDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ImportDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/CommitDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateConfirmDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSConfigUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSGenerateSshKeyUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSPassPhraseUI.jaxx Removed: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogConsoleUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogMailUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ExportDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ImportDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/CommitDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateConfirmDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateDialogUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSConfigUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSGenerateSshKeyUI.jaxx isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSPassPhraseUI.jaxx Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogConsole.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogMail.java Log: normalize jaxx file name: all in ***UI.jaxx in ui package remove jaxx package Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogConsole.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogConsole.java 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogConsole.java 2008-10-13 17:01:29 UTC (rev 1553) @@ -37,6 +37,7 @@ import java.io.IOException; import fr.ifremer.isisfish.IsisFish; +import fr.ifremer.isisfish.ui.logging.console.LogConsoleUI; /** * this is the console of log Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogMail.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogMail.java 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/logging/console/LogMail.java 2008-10-13 17:01:29 UTC (rev 1553) @@ -55,6 +55,8 @@ import java.awt.event.ActionListener; import java.awt.event.ActionEvent; +import fr.ifremer.isisfish.ui.logging.console.LogMailUI; + /** * This is the dialog to send mail from LogConsole * Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogConsoleUI.jaxx =================================================================== (Binary files differ) Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogMailUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogMailUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogMailUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,57 +0,0 @@ -<JDialog> - <script> - public boolean isEmailValid(String text) { - if (text==null || "".equals(text)) { - return false; - } - //TODO make it better - //return text.match("^.*@.*\..*$"); - return true; - } - </script> - <Table> - <row fill='horizontal'> - <cell anchor="east" fill="both" columns="2"> - <JCheckBox id='sendAll' selected='true' - text='isisfish.log.sendAll' - toolTipText='isisfish.log.tooltip.sendAll'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel labelFor='{mailTo}' - text='isisfish.log.mailTo' - toolTipText='isisfish.log.tooltip.mailTo'/> - </cell> - <cell> - <JTextField id='mailTo' font-size='11' columns='30' - height='20'/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JLabel labelFor='{content}' - text='isisfish.log.body' - toolTipText='isisfish.log.tooltip.body'/> - </cell> - </row> - <row fill='both'> - <cell columns='2' weighty="1" fill='both'> - <JScrollPane height="200"> - <JEditorPane id="content"/> - </JScrollPane> - </cell> - </row> - <row fill="horizontal"> - <cell columns="2" fill="both"> - <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> - <JButton id='sendMail' text='isisfish.log.sendMail' - toolTipText='isisfish.log.tooltip.sendMail' - enabled='{isEmailValid(mailTo.getText())}'/> - <JButton id='cancel' text='isisfish.common.cancel' - onActionPerformed='dispose()'/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> \ No newline at end of file Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogConsoleUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogConsoleUI.jaxx) =================================================================== (Binary files differ) Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogConsoleUI.jaxx ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogMailUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/logging/console/LogMailUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogMailUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogMailUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,57 @@ +<JDialog> + <script> + public boolean isEmailValid(String text) { + if (text==null || "".equals(text)) { + return false; + } + //TODO make it better + //return text.match("^.*@.*\..*$"); + return true; + } + </script> + <Table> + <row fill='horizontal'> + <cell anchor="east" fill="both" columns="2"> + <JCheckBox id='sendAll' selected='true' + text='isisfish.log.sendAll' + toolTipText='isisfish.log.tooltip.sendAll'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel labelFor='{mailTo}' + text='isisfish.log.mailTo' + toolTipText='isisfish.log.tooltip.mailTo'/> + </cell> + <cell> + <JTextField id='mailTo' font-size='11' columns='30' + height='20'/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2"> + <JLabel labelFor='{content}' + text='isisfish.log.body' + toolTipText='isisfish.log.tooltip.body'/> + </cell> + </row> + <row fill='both'> + <cell columns='2' weighty="1" fill='both'> + <JScrollPane height="200"> + <JEditorPane id="content"/> + </JScrollPane> + </cell> + </row> + <row fill="horizontal"> + <cell columns="2" fill="both"> + <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> + <JButton id='sendMail' text='isisfish.log.sendMail' + toolTipText='isisfish.log.tooltip.sendMail' + enabled='{isEmailValid(mailTo.getText())}'/> + <JButton id='cancel' text='isisfish.common.cancel' + onActionPerformed='dispose()'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> \ No newline at end of file Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/logging/console/LogMailUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ExportDialogUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ExportDialogUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ExportDialogUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ExportDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,67 @@ +<JDialog modal="true" resizable='false' title='isisfish.script.export'> + <script> + // FIXME a refaire + +// public org.codelutin.vcs.ui.FieldModelUtil.ModuleFile model; + public Object model = null; + public boolean isOkEnabled() { + return !isEmpty(); // && model.getSelected(0).size() > 0; + } + public boolean isEmpty() { + return model == null; // || model.getRowCount() == 0; + } + + public void doCheckAll() { +// if (model!=null) model.checkAll(); + doRefresh(); + } + + public void doRefresh() { + fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"items.enabled", + "checkAll.enabled","ok.enabled","chooseDir.enabled", + "archivePath.enabled"); + } + + </script> + <Table anchor='center'> + <!--row fill='horizontal'> + <cell columns='2' weightx="1"> + <JLabel id='label' font-size='12' foreground='{new Color(051,102,225)}'/> + </cell> + </row--> + <row weighty="2"> + <cell columns='2' fill='both'> + <JScrollPane id='table'> + <JTable id="items" autoResizeMode='3' + enabled='{!isEmpty()}' onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + <row fill='horizontal'> + <cell weightx="1" fill='both'> + <JTextField id='archivePath' font-size='11' columns='30' height='25' enabled='{!isEmpty()}'/> + </cell> + <cell fill='both'> + <JButton id='chooseDir' + text='isisfish.script.export.chooseDir' + toolTipText='isisfish.script.export.tooltip.chooseDir' + enabled='{!isEmpty()}' + onActionPerformed="fr.ifremer.isisfish.ui.UIHelper.openDirChooser(archivePath,ok)"/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2" fill='both'> + <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> + <JCheckBox id='checkAll' + text='isisfish.script.export.checkAll' + toolTipText='isisfish.script.export.tooltip.checkAll' + enabled='{!isEmpty()}' + onActionPerformed="doCheckAll()" /> + <JButton id='ok' text='isisfish.script.export.ok' + enabled='{isOkEnabled()}'/> + <JButton id='cancel' text='isisfish.script.export.cancel'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ExportDialogUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ImportDialogUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ImportDialogUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ImportDialogUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ImportDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,107 @@ +<JDialog modal="true" resizable='false' title='isisfish.script.import'> + <script> + // FIXME a refaire + +// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; + +// protected ModuleFile modelItems; +// protected ModuleFile modelNewItems; + protected Object modelItems; + protected Object modelNewItems; + + public boolean isOkEnabled() { + return true; +// (!isItemEmpty() && modelItems.getSelected(0).size() > 0) || +// (!isNewItemEmpty() && modelNewItems.getSelected(0).size() > 0); + } + + protected boolean isItemEmpty() { + return modelItems == null;// || modelItems.getRowCount() == 0; + } + + protected boolean isNewItemEmpty() { + return modelNewItems == null;// || modelNewItems.getRowCount() == 0; + } + + public boolean isEmpty() { + return isItemEmpty() && isNewItemEmpty(); + } + + public void doRefresh() { + fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"table1.visible", + "table2.visible","label2.visible", "label3.visible", + "checkAll.enabled", "ok.enabled"); + } + + public void doCheckAll() { +// if (!isItemEmpty()) modelItems.checkAll(); +// if (!isNewItemEmpty()) modelNewItems.checkAll(); + doRefresh(); + } +</script> + <Table> + <row fill='horizontal'> + <cell columns='3' weightx="1"> + <JLabel id='label' font-size='12' + foreground='{new Color(051,102,225)}'/> + </cell> + </row> + <row weighty="1" fill='both'> + <cell columns='3' weighty="1" weightx="1" fill="both"> + <Table> + <row> + <cell weightx="1"> + <JLabel id='label2' font-size='12' visible='{!isNewItemEmpty()}' + text='isisfish.script.import.labelAdd' + foreground='{new Color(051,102,225)}'/> + </cell> + </row> + <row fill='both'> + <cell weighty="1"> + <!-- TODO SHould put the both table in this cell --> + <JScrollPane id='table1' visible='{!isNewItemEmpty()}'> + <JTable id="newItems" autoResizeMode='3' + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell weightx="1"> + <JLabel id='label3' font-size='12' visible='{!isItemEmpty()}' + text='isisfish.script.import.labelOverwrite' + foreground='{Color.RED}'/> + </cell> + </row> + <row fill='both' > + <cell weighty="1"> + <!-- TODO SHould put the both table in this cell --> + <JScrollPane id='table2' visible='{!isItemEmpty()}'> + <JTable id="items" autoResizeMode='3' + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + </row> + <row fill='horizontal'> + <cell weightx="1" columns="3" fill='both'> + <JTextField id='archivePath' font-size='12' columns='28' + editable='false' height='25'/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="3" fill='both'> + <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> + <JCheckBox id='checkAll' text='isisfish.script.import.checkAll' + toolTipText='isisfish.script.import.tooltip.checkAll' + enabled='{!isEmpty()}' + onActionPerformed="doCheckAll()" /> + <JButton id='ok' text='isisfish.script.import.ok' + enabled='{isOkEnabled()}'/> + <JButton id='cancel' text='isisfish.script.import.cancel'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/ImportDialogUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ExportDialogUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ExportDialogUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ExportDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,67 +0,0 @@ -<JDialog modal="true" resizable='false' title='isisfish.script.export'> - <script> - // FIXME a refaire - -// public org.codelutin.vcs.ui.FieldModelUtil.ModuleFile model; - public Object model = null; - public boolean isOkEnabled() { - return !isEmpty(); // && model.getSelected(0).size() > 0; - } - public boolean isEmpty() { - return model == null; // || model.getRowCount() == 0; - } - - public void doCheckAll() { -// if (model!=null) model.checkAll(); - doRefresh(); - } - - public void doRefresh() { - fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"items.enabled", - "checkAll.enabled","ok.enabled","chooseDir.enabled", - "archivePath.enabled"); - } - - </script> - <Table anchor='center'> - <!--row fill='horizontal'> - <cell columns='2' weightx="1"> - <JLabel id='label' font-size='12' foreground='{new Color(051,102,225)}'/> - </cell> - </row--> - <row weighty="2"> - <cell columns='2' fill='both'> - <JScrollPane id='table'> - <JTable id="items" autoResizeMode='3' - enabled='{!isEmpty()}' onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - <row fill='horizontal'> - <cell weightx="1" fill='both'> - <JTextField id='archivePath' font-size='11' columns='30' height='25' enabled='{!isEmpty()}'/> - </cell> - <cell fill='both'> - <JButton id='chooseDir' - text='isisfish.script.export.chooseDir' - toolTipText='isisfish.script.export.tooltip.chooseDir' - enabled='{!isEmpty()}' - onActionPerformed="fr.ifremer.isisfish.ui.UIHelper.openDirChooser(archivePath,ok)"/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2" fill='both'> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JCheckBox id='checkAll' - text='isisfish.script.export.checkAll' - toolTipText='isisfish.script.export.tooltip.checkAll' - enabled='{!isEmpty()}' - onActionPerformed="doCheckAll()" /> - <JButton id='ok' text='isisfish.script.export.ok' - enabled='{isOkEnabled()}'/> - <JButton id='cancel' text='isisfish.script.export.cancel'/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ImportDialogUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ImportDialogUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/script/jaxx/ImportDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,107 +0,0 @@ -<JDialog modal="true" resizable='false' title='isisfish.script.import'> - <script> - // FIXME a refaire - -// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; - -// protected ModuleFile modelItems; -// protected ModuleFile modelNewItems; - protected Object modelItems; - protected Object modelNewItems; - - public boolean isOkEnabled() { - return true; -// (!isItemEmpty() && modelItems.getSelected(0).size() > 0) || -// (!isNewItemEmpty() && modelNewItems.getSelected(0).size() > 0); - } - - protected boolean isItemEmpty() { - return modelItems == null;// || modelItems.getRowCount() == 0; - } - - protected boolean isNewItemEmpty() { - return modelNewItems == null;// || modelNewItems.getRowCount() == 0; - } - - public boolean isEmpty() { - return isItemEmpty() && isNewItemEmpty(); - } - - public void doRefresh() { - fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"table1.visible", - "table2.visible","label2.visible", "label3.visible", - "checkAll.enabled", "ok.enabled"); - } - - public void doCheckAll() { -// if (!isItemEmpty()) modelItems.checkAll(); -// if (!isNewItemEmpty()) modelNewItems.checkAll(); - doRefresh(); - } -</script> - <Table> - <row fill='horizontal'> - <cell columns='3' weightx="1"> - <JLabel id='label' font-size='12' - foreground='{new Color(051,102,225)}'/> - </cell> - </row> - <row weighty="1" fill='both'> - <cell columns='3' weighty="1" weightx="1" fill="both"> - <Table> - <row> - <cell weightx="1"> - <JLabel id='label2' font-size='12' visible='{!isNewItemEmpty()}' - text='isisfish.script.import.labelAdd' - foreground='{new Color(051,102,225)}'/> - </cell> - </row> - <row fill='both'> - <cell weighty="1"> - <!-- TODO SHould put the both table in this cell --> - <JScrollPane id='table1' visible='{!isNewItemEmpty()}'> - <JTable id="newItems" autoResizeMode='3' - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell weightx="1"> - <JLabel id='label3' font-size='12' visible='{!isItemEmpty()}' - text='isisfish.script.import.labelOverwrite' - foreground='{Color.RED}'/> - </cell> - </row> - <row fill='both' > - <cell weighty="1"> - <!-- TODO SHould put the both table in this cell --> - <JScrollPane id='table2' visible='{!isItemEmpty()}'> - <JTable id="items" autoResizeMode='3' - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - </Table> - </cell> - </row> - <row fill='horizontal'> - <cell weightx="1" columns="3" fill='both'> - <JTextField id='archivePath' font-size='12' columns='28' - editable='false' height='25'/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="3" fill='both'> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JCheckBox id='checkAll' text='isisfish.script.import.checkAll' - toolTipText='isisfish.script.import.tooltip.checkAll' - enabled='{!isEmpty()}' - onActionPerformed="doCheckAll()" /> - <JButton id='ok' text='isisfish.script.import.ok' - enabled='{isOkEnabled()}'/> - <JButton id='cancel' text='isisfish.script.import.cancel'/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/CommitDialogUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/CommitDialogUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/CommitDialogUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/CommitDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,64 @@ +<JDialog id="Update" modal="true" title='isisfish.vcs.commit'> + <!--width="400" height="300">--> + <script> + // FIXME a refaire + +// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; +// import org.codelutin.vcs.VCSFileState; + +// protected ModuleFile<VCSFileState> model; + protected Object model; + + public CommitDialogUI(Dialog owner, boolean modal) { + super(owner, modal); + } + public boolean isEmpty() { + return items.getRowCount()==0; + } + public boolean isOkEnabled() { + return !isEmpty(); + } + public void doRefresh() { + fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"ok.enabled"); + } + protected void reSize(JTable table) { + // implements me... + } + + </script> + <Table weightx="1"> + <row> + <cell columns='2'> + <JLabel id='label' font-size='12' + foreground='{new Color(051,102,225)}' + text='isisfish.vcs.commit.label'/> + </cell> + </row> + <row> + <cell columns='2' weighty="1" weightx='1' fill='both'> + <JScrollPane id='scroll' verticalScrollBarPolicy='20' > + <JTable id="items" onComponentResized="reSize(items)"/> + </JScrollPane> + </cell> + </row> + <row> + <cell columns='2' fill='horizontal'> + <JScrollPane height='50' verticalScrollBarPolicy='21' + horizontalScrollBarPolicy='30'> + <JTextArea id='message' rows='2' columns='80'/> + </JScrollPane> + </cell> + </row> + <row weightx="1" fill='horizontal'> + <cell> + <JButton id='ok' text='isisfish.vcs.commit.ok' + enabled='{isOkEnabled()}' + onActionPerformed='/*fr.ifremer.isisfish.versionning.ui.VCSUIHelper.COMMIT_MSG=message.getText();*/dispose()'/> + </cell> + <cell> + <JButton id='cancel' text='isisfish.vcs.commit.cancel' + onActionPerformed='dispose()'/> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/CommitDialogUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateConfirmDialogUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateConfirmDialogUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateConfirmDialogUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateConfirmDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,70 @@ +<JDialog modal="true" title='isisfish.vcs.updateconfirm'> + <script> + // FIXME a refaire + + +// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; +// import org.codelutin.vcs.VCSFileState; + +// protected ModuleFile<VCSFileState> model; + protected Object model; + + public void doCheckAll() { +// if (model != null && model.getRowCount()>0) { +// model.checkAll(); +// doRefresh(); +// } + } + public boolean isEmpty() { + return model==null; // || model.getRowCount()==0; + } + public boolean isOkEnabled() { + return !isEmpty(); // && model.getSelectedSize(0)>0; + } + protected void reSize(JTable table) { + // implements me... + } + public void doRefresh() { + fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"checkAll.enabled","ok.enabled"); + } + </script> + <Table weightx="1"> + <row> + <cell columns='4'> + <JLabel font-size='12' foreground='{new Color(051,102,225)}' + text='isisfish.vcs.updateconfirm.label'/> + </cell> + </row> + <row> + <cell columns='4'> + <JLabel id='label2' font-size='12' foreground='{Color.RED}' + text='isisfish.vcs.updateconfirm.label2'/> + </cell> + </row> + <row> + <cell columns='4' weighty="1" fill='both'> + <JScrollPane id='table'> + <JTable id="items" autoResizeMode='3' + rowSelectionAllowed="true" + onMouseClicked="doRefresh()" + onComponentResized="reSize(items)"/> + </JScrollPane> + </cell> + </row> + <row weightx="1" fill='horizontal'> + <cell columns="2" fill='both'> + <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> + <JCheckBox id='checkAll' + text='isisfish.vcs.updateconfirm.checkAll' + toolTipText='isisfish.vcs.updateconfirm.tooltip.checkAll' + enabled='{!isEmpty()}' + onActionPerformed="doCheckAll()"/> + <JButton id='ok' text='isisfish.vcs.updateconfirm.ok' + enabled='{isOkEnabled()}'/> + <JButton id='cancel' + text='isisfish.vcs.updateconfirm.cancel'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateConfirmDialogUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateDialogUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateDialogUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateDialogUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,165 @@ +<JDialog modal="true" title='isisfish.vcs.update'> + <script> + // FIXME a refaire + +// import static org.codelutin.vcs.VCSState.*; +// import org.codelutin.vcs.VCSState; + +// protected org.codelutin.vcs.VCSRepositoryState model; + protected Object model; + + public void doCheckAll() { +// if (model!=null) { +// model.checkAll(checkAll.isSelected()); +// doRefresh(); +// } + } + + public boolean isEmpty() { + return model==null; // || model.isModelEmpty(); + } + + public boolean isOkEnabled() { + return !isEmpty(); // && model.getModelSelectedSize()>0; + } + + public void doRefresh() { + fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"checkAll.enabled","ok.enabled"); + } + +// protected void reSize(VCSState state,JTable table) { +// +// } + </script> + <Table weightx="1"> + <row> + <cell columns='3' weighty="1" fill='both'> + <JSplitPane id='splitPane' orientation='vertical' + oneTouchExpandable='true'> + <JSplitPane id='splitPane2' orientation='horizontal' + oneTouchExpandable='true'> + <Table weightx="1" id='tableRemote'> + <row> + <cell columns="2" anchor='northwest'> + <JLabel text='isisfish.vcs.update.remote' + toolTipText='isisfish.vcs.update.tooltip.remote'/> + </cell> + </row> + <row> + <cell> + <JLabel id='label_missing' + text='isisfish.vcs.update.remote.missing' + toolTipText='isisfish.vcs.update.remote.tooltip.missing'/> + </cell> + </row> + <row> + <cell weighty="1" fill='both'> + <JScrollPane id='scroll_missing'> + <JTable id="table_missing" + autoResizeMode='3' + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell> + <JLabel id='label_outofdate' + text='isisfish.vcs.update.remote.outofdate' + toolTipText='isisfish.vcs.update.remote.tooltip.outofdate'/> + </cell> + </row> + <row> + <cell weighty="1" fill='both'> + <JScrollPane id='scroll_outofdate'> + <JTable id="table_outofdate" + autoResizeMode='3' + onMouseClicked="doRefresh()" + rowSelectionAllowed="true"/> + </JScrollPane> + </cell> + </row> + </Table> + <Table weightx="1" id='tableLocal'> + <row> + <cell columns="2" anchor='west'> + <JLabel text='isisfish.vcs.update.local' + toolTipText='isisfish.vcs.update.tooltip.local'/> + </cell> + </row> + <row> + <cell> + <JLabel id='label_unversionned' + text='isisfish.vcs.update.local.unversionned' + toolTipText='isisfish.vcs.update.local.tooltip.unversionned'/> + </cell> + </row> + <row> + <cell weighty="1" fill='both'> + <JScrollPane id='scroll_unversionned'> + <JTable id="table_unversionned" + autoResizeMode='3' + rowSelectionAllowed="true" + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell> + <JLabel id='label_modified' + text='isisfish.vcs.update.local.modified' + toolTipText='isisfish.vcs.update.local.tooltip.modified'/> + </cell> + </row> + <row> + <cell weighty="1" fill='both'> + <JScrollPane id='scroll_modified'> + <JTable id="table_modified" + autoResizeMode='3' + rowSelectionAllowed="true" + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell> + <JLabel id='label_outofdateAndModified' + text='isisfish.vcs.update.local.outofdateAndModified' + toolTipText='isisfish.vcs.update.local.tooltip.outofdateAndModified'/> + </cell> + </row> + <row> + <cell weighty="1" fill='both'> + <JScrollPane id='scroll_outofdateAndModified'> + <JTable id="table_outofdateAndModified" + autoResizeMode='3' + rowSelectionAllowed="true" + onMouseClicked="doRefresh()"/> + </JScrollPane> + </cell> + </row> + </Table> + </JSplitPane> + <JScrollPane> + <JTextPane id="logText" editable="false" + focusable='false'/> + </JScrollPane> + </JSplitPane> + </cell> + </row> + <row weightx="1" fill='horizontal'> + <cell columns="3" fill='both'> + <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> + <JCheckBox id='checkAll' + text='isisfish.vcs.update.checkAll' + toolTipText='isisfish.vcs.update.tooltip.checkAll' + enabled='{!isEmpty()}' + onActionPerformed="doCheckAll()"/> + <JButton id='ok' text='isisfish.vcs.update.ok' + enabled='{isOkEnabled()}' + onActionPerformed="dispose()"/> + <JButton id='cancel' text='isisfish.vcs.update.cancel'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/UpdateDialogUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSConfigUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSConfigUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSConfigUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSConfigUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,170 @@ +<JDialog> + <script> + import javax.swing.text.html.HTMLEditorKit; + import javax.swing.text.html.HTMLDocument; + import javax.swing.event.HyperlinkListener; + import javax.swing.text.html.HTMLFrameHyperlinkEvent; + import javax.swing.event.HyperlinkEvent; + import java.io.PrintWriter; + import java.io.StringWriter; + + public boolean cancel; + protected boolean invalidFirstName; + protected boolean invalidLastName; + protected boolean invalidKey; + protected boolean invalidEmail; + protected boolean invalidLogin; + + private String oldEmail; + private String oldServerLogin; + private boolean oldUseSsh; + private boolean oldNoPassPhrase; + private String oldLastname; + private String oldFirstname; + private String oldServerPrivateKeyFile; + + protected void saveOld() { + this.oldFirstname=firstname.getText(); + this.oldLastname=lasstname.getText(); + this.oldEmail =email.getText(); + this.oldServerLogin=serverLogin.getText(); + this.oldServerPrivateKeyFile=serverPrivateKeyFile.getText(); + this.oldUseSsh=serverAuthenticationMethodSsh.isSelected(); + this.oldNoPassPhrase =serverNoPassPhrase.isSelected(); + doCheck(); + } + + protected void restoreOld() { + firstname.setText(oldFirstname); + lasstname.setText(oldLastname); + email.setText(oldEmail); + serverLogin.setText(oldServerLogin); + serverPrivateKeyFile.setText(oldServerPrivateKeyFile); + serverAuthenticationMethodSsh.setSelected(oldUseSsh); + serverNoPassPhrase.setSelected(oldNoPassPhrase); + doCheck(); + } + public boolean isConfigValid() { + return check(serverAuthenticationMethodSsh.isSelected()); + } + + protected boolean check(boolean ssh) { + invalidFirstName=firstname.isVisible() && firstname.getText().isEmpty(); + invalidLastName=lasstname.isVisible() && lasstname.getText().isEmpty(); + invalidEmail=email.isVisible() && email.getText().isEmpty(); + if (ssh) { + String file = serverPrivateKeyFile.getText(); + invalidKey=file.isEmpty() || !new java.io.File(file).exists(); + invalidLogin=serverLogin.getText().isEmpty(); + } else { + invalidLogin=false; + invalidKey=false; + } + return !(invalidEmail||invalidFirstName||invalidLastName||invalidLogin||invalidKey); + } + + protected void doCheck() { + boolean ssh = serverAuthenticationMethodSsh.isSelected(); + ok.setEnabled(check(ssh)); + if (ssh) { + serverPrivateKeyGenerate.setEnabled(!invalidLogin); + } else { + serverPrivateKeyGenerate.setEnabled(false); + } + setColor(invalidFirstName, firstnameLabel); + setColor(invalidLastName, lasstnameLabel); + setColor(invalidEmail, emailLabel); + setColor(invalidLogin, serverLoginLabel); + setColor(invalidKey, serverPrivateKeyFileLabel); + } + + protected void setColor(boolean invalid, JComponent component) { + component.setForeground(invalid ? Color.red: Color.black); + } + </script> + <Table> + <row fill='horizontal'> + <cell columns='2' weighty="1" fill='both'> + <JScrollPane height="60"> + <JEditorPane id="doc" /> + </JScrollPane> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='firstnameLabel' text='isisfish.launch.firstname'/> + </cell> + <cell> + <JTextField id='firstname' onKeyReleased="doCheck()"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='lasstnameLabel' text='isisfish.launch.lasstname'/> + </cell> + <cell> + <JTextField id='lasstname' onKeyReleased="doCheck()"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='emailLabel' text='isisfish.launch.email'/> + </cell> + <cell> + <JTextField id='email' onKeyReleased="doCheck()"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverAuthenticationMethodLabel' text='isisfish.launch.server.authenticationMethod'/> + </cell> + <cell> + <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> + <JRadioButton id='serverAuthenticationMethodAnonymous' text='isisfish.launch.anonymous' buttonGroup='serverMethod' value='anonymous' onActionPerformed="doCheck()"/> + <JRadioButton id='serverAuthenticationMethodSsh' text='isisfish.launch.ssh' buttonGroup='serverMethod' value='ssh' onActionPerformed="doCheck()"/> + </JPanel> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverLoginLabel' text='isisfish.launch.server.login' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + </cell> + <cell> + <JTextField id='serverLogin' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverLoginNoPassPhraseLabel' text='isisfish.launch.server.ssh.no.passphrase' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + </cell> + <cell> + <JCheckBox id='serverNoPassPhrase' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}' selected="true"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverPrivateKeyFileLabel' text='isisfish.launch.server.ssh.privateKeyFile' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + </cell> + <cell> + <JTextField id='serverPrivateKeyFile' font-size='12' columns='28' height='25' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2"> + <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> + <JButton id='serverPrivateKeyChangeFile' text='isisfish.launch.server.ssh.key.change' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> + <JButton id='serverPrivateKeyGenerate' text='isisfish.launch.server.ssh.key.generate' /> + </JPanel> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2"> + <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> + <JButton id='ok' text='isisfish.common.apply' enabled='false'/> + <JButton id='reset' text='isisfish.common.reset' onActionPerformed="restoreOld();"/> + <JButton id='cancelAction' text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSConfigUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSGenerateSshKeyUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSGenerateSshKeyUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSGenerateSshKeyUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSGenerateSshKeyUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,128 @@ +<JDialog title='isisfish.server.ssh.generateKey.title' modal='true'> + <script> + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; + import com.sshtools.j2ssh.transport.publickey.OpenSSHPublicKeyFormat; + import com.sshtools.j2ssh.transport.publickey.SshKeyGenerator; + import org.codelutin.util.FileUtil; + import java.io.File; + import java.io.IOException; + import java.util.ArrayList; + import java.util.Arrays; + import java.util.HashMap; + import java.util.Map; + + static protected final Log log = LogFactory.getLog(VCSGenerateSshKeyUI.class); + + private static VCSGenerateSshKeyUI instance; + + public static VCSGenerateSshKeyUI getInstance(JDialog parent) { + if (instance == null) { + instance = new VCSGenerateSshKeyUI(parent); + } + return instance; + } + + public boolean cancel; + public boolean noPassPhrase; + public Exception error; + protected boolean invalidPassPhrase; + protected String vcsLogin; + + private VCSGenerateSshKeyUI(JDialog instance) { + super(instance); + // block close operation + setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); + } + + public void setData(String vcsLogin, File privateKeyFile) { + this.vcsLogin = vcsLogin ; + serverPrivateKeyFile.setText(privateKeyFile.getAbsolutePath()); + serverPublicKeyFile.setText(privateKeyFile.getAbsolutePath() + ".pub"); + noPassPhrase=true; + error=null; + doCheck(); + } + + protected boolean doGenerate() { + File f = new File(getServerPrivateKeyFile().getText()); + try { + SshKeyGenerator sshkeygenerator = new SshKeyGenerator(); + char[] password = getServerPassPhrase().getPassword(); + noPassPhrase=password.length==0; + if (password.length > 0) { + sshkeygenerator.generateKeyPair("dsa", 1024, f.getAbsolutePath(), vcsLogin, Arrays.toString(password)); + Arrays.fill(password, '0'); + } else { + sshkeygenerator.generateKeyPair("dsa", 1024, f.getAbsolutePath(), vcsLogin, ""); + } + // convert to openSSH ? + File publicKeyFile = new File(serverPublicKeyFile.getText()); + log.info("public key before OpenSsh : "+ FileUtil.readAsString(publicKeyFile)); + String openSshPublicKey = SshKeyGenerator.convertPublicKeyFile(publicKeyFile, new OpenSSHPublicKeyFormat(vcsLogin + "@forIsisFish 1024-bit dsa")); + log.info("public key OpenSsh : "+openSshPublicKey); + FileUtil.writeString(publicKeyFile, openSshPublicKey); + } catch (Exception e) { + error=e; + return true; + } + return false; + } + protected boolean check() { + invalidPassPhrase=!Arrays.equals(serverPassPhrase.getPassword(),serverConfirmPassPhrase.getPassword()); + return !invalidPassPhrase; + } + + protected void doCheck() { + ok.setEnabled(check()); + setColor(invalidPassPhrase, serverPassPhraseLabel); + setColor(invalidPassPhrase, serverConfirmPassPhraseLabel); + } + + protected void setColor(boolean invalid, JComponent component) { + component.setForeground(invalid ? Color.red: Color.black); + } + </script> + <Table> + <row fill='horizontal'> + <cell> + <JLabel text='isisfish.launch.server.ssh.privateKeyFile'/> + </cell> + <cell> + <JTextField id='serverPrivateKeyFile' font-size='12' editable='false' columns='28' height='25'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel text='isisfish.launch.server.ssh.publicKeyFile'/> + </cell> + <cell> + <JTextField id='serverPublicKeyFile' font-size='12' editable='false' columns='28' height='25'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverPassPhraseLabel' text='isisfish.launch.server.ssh.passphrase'/> + </cell> + <cell> + <JPasswordField id='serverPassPhrase' onKeyReleased="doCheck()"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='serverConfirmPassPhraseLabel' text='isisfish.launch.server.ssh.confirm.passphrase'/> + </cell> + <cell> + <JPasswordField id='serverConfirmPassPhrase' onKeyReleased="doCheck()"/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2"> + <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> + <JButton id='ok' text='isisfish.common.apply' enabled='false' onActionPerformed="cancel = doGenerate();dispose()"/> + <JButton id='cancelAction' text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSGenerateSshKeyUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Copied: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSPassPhraseUI.jaxx (from rev 1552, isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSPassPhraseUI.jaxx) =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSPassPhraseUI.jaxx (rev 0) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSPassPhraseUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -0,0 +1,62 @@ +<JDialog title='isisfish.vcs.ask.passphrase.title' modal='true'> + <script> + private boolean cancel; + private static VCSPassPhraseUI instance; + + public static char[] getPassPhrase(boolean useUI) { + if (!useUI) { + System.out.print("Enter passphrase: "); + java.io.BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(java.lang.System.in)); + try { + java.lang.String s = ""; + s = bufferedreader.readLine(); + return s.toCharArray(); + } catch (IOException e) { + return null; + } finally { + if (bufferedreader!=null) { + try { + bufferedreader.close(); + } catch (IOException e) { + // ignore + } + } + } + } + if (instance == null) { + instance = new VCSPassPhraseUI(); + } + instance.setVisible(true); + if (instance.cancel) { + // use cancel + return null; + } + return instance.getServerPassPhrase().getPassword(); + } + private VCSPassPhraseUI(JDialog instance) { + super(instance); + // block close operation + setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); + } + </script> + <Table> + <row fill='horizontal'> + <cell> + <JLabel text='isisfish.vcs.ask.passphrase'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JPasswordField id='serverPassPhrase'/> + </cell> + </row> + <row fill='horizontal'> + <cell columns="2"> + <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> + <JButton text='isisfish.common.apply' onActionPerformed="dispose()"/> + <JButton text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Property changes on: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/ui/versionning/jaxx/VCSPassPhraseUI.jaxx ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/CommitDialogUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/CommitDialogUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/CommitDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,64 +0,0 @@ -<JDialog id="Update" modal="true" title='isisfish.vcs.commit'> - <!--width="400" height="300">--> - <script> - // FIXME a refaire - -// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; -// import org.codelutin.vcs.VCSFileState; - -// protected ModuleFile<VCSFileState> model; - protected Object model; - - public CommitDialogUI(Dialog owner, boolean modal) { - super(owner, modal); - } - public boolean isEmpty() { - return items.getRowCount()==0; - } - public boolean isOkEnabled() { - return !isEmpty(); - } - public void doRefresh() { - fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"ok.enabled"); - } - protected void reSize(JTable table) { - // implements me... - } - - </script> - <Table weightx="1"> - <row> - <cell columns='2'> - <JLabel id='label' font-size='12' - foreground='{new Color(051,102,225)}' - text='isisfish.vcs.commit.label'/> - </cell> - </row> - <row> - <cell columns='2' weighty="1" weightx='1' fill='both'> - <JScrollPane id='scroll' verticalScrollBarPolicy='20' > - <JTable id="items" onComponentResized="reSize(items)"/> - </JScrollPane> - </cell> - </row> - <row> - <cell columns='2' fill='horizontal'> - <JScrollPane height='50' verticalScrollBarPolicy='21' - horizontalScrollBarPolicy='30'> - <JTextArea id='message' rows='2' columns='80'/> - </JScrollPane> - </cell> - </row> - <row weightx="1" fill='horizontal'> - <cell> - <JButton id='ok' text='isisfish.vcs.commit.ok' - enabled='{isOkEnabled()}' - onActionPerformed='/*fr.ifremer.isisfish.versionning.ui.VCSUIHelper.COMMIT_MSG=message.getText();*/dispose()'/> - </cell> - <cell> - <JButton id='cancel' text='isisfish.vcs.commit.cancel' - onActionPerformed='dispose()'/> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateConfirmDialogUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateConfirmDialogUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateConfirmDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,70 +0,0 @@ -<JDialog modal="true" title='isisfish.vcs.updateconfirm'> - <script> - // FIXME a refaire - - -// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile; -// import org.codelutin.vcs.VCSFileState; - -// protected ModuleFile<VCSFileState> model; - protected Object model; - - public void doCheckAll() { -// if (model != null && model.getRowCount()>0) { -// model.checkAll(); -// doRefresh(); -// } - } - public boolean isEmpty() { - return model==null; // || model.getRowCount()==0; - } - public boolean isOkEnabled() { - return !isEmpty(); // && model.getSelectedSize(0)>0; - } - protected void reSize(JTable table) { - // implements me... - } - public void doRefresh() { - fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"checkAll.enabled","ok.enabled"); - } - </script> - <Table weightx="1"> - <row> - <cell columns='4'> - <JLabel font-size='12' foreground='{new Color(051,102,225)}' - text='isisfish.vcs.updateconfirm.label'/> - </cell> - </row> - <row> - <cell columns='4'> - <JLabel id='label2' font-size='12' foreground='{Color.RED}' - text='isisfish.vcs.updateconfirm.label2'/> - </cell> - </row> - <row> - <cell columns='4' weighty="1" fill='both'> - <JScrollPane id='table'> - <JTable id="items" autoResizeMode='3' - rowSelectionAllowed="true" - onMouseClicked="doRefresh()" - onComponentResized="reSize(items)"/> - </JScrollPane> - </cell> - </row> - <row weightx="1" fill='horizontal'> - <cell columns="2" fill='both'> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JCheckBox id='checkAll' - text='isisfish.vcs.updateconfirm.checkAll' - toolTipText='isisfish.vcs.updateconfirm.tooltip.checkAll' - enabled='{!isEmpty()}' - onActionPerformed="doCheckAll()"/> - <JButton id='ok' text='isisfish.vcs.updateconfirm.ok' - enabled='{isOkEnabled()}'/> - <JButton id='cancel' - text='isisfish.vcs.updateconfirm.cancel'/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateDialogUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateDialogUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/UpdateDialogUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,165 +0,0 @@ -<JDialog modal="true" title='isisfish.vcs.update'> - <script> - // FIXME a refaire - -// import static org.codelutin.vcs.VCSState.*; -// import org.codelutin.vcs.VCSState; - -// protected org.codelutin.vcs.VCSRepositoryState model; - protected Object model; - - public void doCheckAll() { -// if (model!=null) { -// model.checkAll(checkAll.isSelected()); -// doRefresh(); -// } - } - - public boolean isEmpty() { - return model==null; // || model.isModelEmpty(); - } - - public boolean isOkEnabled() { - return !isEmpty(); // && model.getModelSelectedSize()>0; - } - - public void doRefresh() { - fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"checkAll.enabled","ok.enabled"); - } - -// protected void reSize(VCSState state,JTable table) { -// -// } - </script> - <Table weightx="1"> - <row> - <cell columns='3' weighty="1" fill='both'> - <JSplitPane id='splitPane' orientation='vertical' - oneTouchExpandable='true'> - <JSplitPane id='splitPane2' orientation='horizontal' - oneTouchExpandable='true'> - <Table weightx="1" id='tableRemote'> - <row> - <cell columns="2" anchor='northwest'> - <JLabel text='isisfish.vcs.update.remote' - toolTipText='isisfish.vcs.update.tooltip.remote'/> - </cell> - </row> - <row> - <cell> - <JLabel id='label_missing' - text='isisfish.vcs.update.remote.missing' - toolTipText='isisfish.vcs.update.remote.tooltip.missing'/> - </cell> - </row> - <row> - <cell weighty="1" fill='both'> - <JScrollPane id='scroll_missing'> - <JTable id="table_missing" - autoResizeMode='3' - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell> - <JLabel id='label_outofdate' - text='isisfish.vcs.update.remote.outofdate' - toolTipText='isisfish.vcs.update.remote.tooltip.outofdate'/> - </cell> - </row> - <row> - <cell weighty="1" fill='both'> - <JScrollPane id='scroll_outofdate'> - <JTable id="table_outofdate" - autoResizeMode='3' - onMouseClicked="doRefresh()" - rowSelectionAllowed="true"/> - </JScrollPane> - </cell> - </row> - </Table> - <Table weightx="1" id='tableLocal'> - <row> - <cell columns="2" anchor='west'> - <JLabel text='isisfish.vcs.update.local' - toolTipText='isisfish.vcs.update.tooltip.local'/> - </cell> - </row> - <row> - <cell> - <JLabel id='label_unversionned' - text='isisfish.vcs.update.local.unversionned' - toolTipText='isisfish.vcs.update.local.tooltip.unversionned'/> - </cell> - </row> - <row> - <cell weighty="1" fill='both'> - <JScrollPane id='scroll_unversionned'> - <JTable id="table_unversionned" - autoResizeMode='3' - rowSelectionAllowed="true" - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell> - <JLabel id='label_modified' - text='isisfish.vcs.update.local.modified' - toolTipText='isisfish.vcs.update.local.tooltip.modified'/> - </cell> - </row> - <row> - <cell weighty="1" fill='both'> - <JScrollPane id='scroll_modified'> - <JTable id="table_modified" - autoResizeMode='3' - rowSelectionAllowed="true" - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell> - <JLabel id='label_outofdateAndModified' - text='isisfish.vcs.update.local.outofdateAndModified' - toolTipText='isisfish.vcs.update.local.tooltip.outofdateAndModified'/> - </cell> - </row> - <row> - <cell weighty="1" fill='both'> - <JScrollPane id='scroll_outofdateAndModified'> - <JTable id="table_outofdateAndModified" - autoResizeMode='3' - rowSelectionAllowed="true" - onMouseClicked="doRefresh()"/> - </JScrollPane> - </cell> - </row> - </Table> - </JSplitPane> - <JScrollPane> - <JTextPane id="logText" editable="false" - focusable='false'/> - </JScrollPane> - </JSplitPane> - </cell> - </row> - <row weightx="1" fill='horizontal'> - <cell columns="3" fill='both'> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JCheckBox id='checkAll' - text='isisfish.vcs.update.checkAll' - toolTipText='isisfish.vcs.update.tooltip.checkAll' - enabled='{!isEmpty()}' - onActionPerformed="doCheckAll()"/> - <JButton id='ok' text='isisfish.vcs.update.ok' - enabled='{isOkEnabled()}' - onActionPerformed="dispose()"/> - <JButton id='cancel' text='isisfish.vcs.update.cancel'/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSConfigUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSConfigUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSConfigUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,170 +0,0 @@ -<JDialog> - <script> - import javax.swing.text.html.HTMLEditorKit; - import javax.swing.text.html.HTMLDocument; - import javax.swing.event.HyperlinkListener; - import javax.swing.text.html.HTMLFrameHyperlinkEvent; - import javax.swing.event.HyperlinkEvent; - import java.io.PrintWriter; - import java.io.StringWriter; - - public boolean cancel; - protected boolean invalidFirstName; - protected boolean invalidLastName; - protected boolean invalidKey; - protected boolean invalidEmail; - protected boolean invalidLogin; - - private String oldEmail; - private String oldServerLogin; - private boolean oldUseSsh; - private boolean oldNoPassPhrase; - private String oldLastname; - private String oldFirstname; - private String oldServerPrivateKeyFile; - - protected void saveOld() { - this.oldFirstname=firstname.getText(); - this.oldLastname=lasstname.getText(); - this.oldEmail =email.getText(); - this.oldServerLogin=serverLogin.getText(); - this.oldServerPrivateKeyFile=serverPrivateKeyFile.getText(); - this.oldUseSsh=serverAuthenticationMethodSsh.isSelected(); - this.oldNoPassPhrase =serverNoPassPhrase.isSelected(); - doCheck(); - } - - protected void restoreOld() { - firstname.setText(oldFirstname); - lasstname.setText(oldLastname); - email.setText(oldEmail); - serverLogin.setText(oldServerLogin); - serverPrivateKeyFile.setText(oldServerPrivateKeyFile); - serverAuthenticationMethodSsh.setSelected(oldUseSsh); - serverNoPassPhrase.setSelected(oldNoPassPhrase); - doCheck(); - } - public boolean isConfigValid() { - return check(serverAuthenticationMethodSsh.isSelected()); - } - - protected boolean check(boolean ssh) { - invalidFirstName=firstname.isVisible() && firstname.getText().isEmpty(); - invalidLastName=lasstname.isVisible() && lasstname.getText().isEmpty(); - invalidEmail=email.isVisible() && email.getText().isEmpty(); - if (ssh) { - String file = serverPrivateKeyFile.getText(); - invalidKey=file.isEmpty() || !new java.io.File(file).exists(); - invalidLogin=serverLogin.getText().isEmpty(); - } else { - invalidLogin=false; - invalidKey=false; - } - return !(invalidEmail||invalidFirstName||invalidLastName||invalidLogin||invalidKey); - } - - protected void doCheck() { - boolean ssh = serverAuthenticationMethodSsh.isSelected(); - ok.setEnabled(check(ssh)); - if (ssh) { - serverPrivateKeyGenerate.setEnabled(!invalidLogin); - } else { - serverPrivateKeyGenerate.setEnabled(false); - } - setColor(invalidFirstName, firstnameLabel); - setColor(invalidLastName, lasstnameLabel); - setColor(invalidEmail, emailLabel); - setColor(invalidLogin, serverLoginLabel); - setColor(invalidKey, serverPrivateKeyFileLabel); - } - - protected void setColor(boolean invalid, JComponent component) { - component.setForeground(invalid ? Color.red: Color.black); - } - </script> - <Table> - <row fill='horizontal'> - <cell columns='2' weighty="1" fill='both'> - <JScrollPane height="60"> - <JEditorPane id="doc" /> - </JScrollPane> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='firstnameLabel' text='isisfish.launch.firstname'/> - </cell> - <cell> - <JTextField id='firstname' onKeyReleased="doCheck()"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='lasstnameLabel' text='isisfish.launch.lasstname'/> - </cell> - <cell> - <JTextField id='lasstname' onKeyReleased="doCheck()"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='emailLabel' text='isisfish.launch.email'/> - </cell> - <cell> - <JTextField id='email' onKeyReleased="doCheck()"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverAuthenticationMethodLabel' text='isisfish.launch.server.authenticationMethod'/> - </cell> - <cell> - <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> - <JRadioButton id='serverAuthenticationMethodAnonymous' text='isisfish.launch.anonymous' buttonGroup='serverMethod' value='anonymous' onActionPerformed="doCheck()"/> - <JRadioButton id='serverAuthenticationMethodSsh' text='isisfish.launch.ssh' buttonGroup='serverMethod' value='ssh' onActionPerformed="doCheck()"/> - </JPanel> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverLoginLabel' text='isisfish.launch.server.login' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - <cell> - <JTextField id='serverLogin' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverLoginNoPassPhraseLabel' text='isisfish.launch.server.ssh.no.passphrase' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - <cell> - <JCheckBox id='serverNoPassPhrase' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}' selected="true"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverPrivateKeyFileLabel' text='isisfish.launch.server.ssh.privateKeyFile' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - <cell> - <JTextField id='serverPrivateKeyFile' font-size='12' columns='28' height='25' onKeyReleased="doCheck()" enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> - <JButton id='serverPrivateKeyChangeFile' text='isisfish.launch.server.ssh.key.change' enabled='{serverAuthenticationMethodSsh.isSelected()}'/> - <JButton id='serverPrivateKeyGenerate' text='isisfish.launch.server.ssh.key.generate' /> - </JPanel> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JButton id='ok' text='isisfish.common.apply' enabled='false'/> - <JButton id='reset' text='isisfish.common.reset' onActionPerformed="restoreOld();"/> - <JButton id='cancelAction' text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSGenerateSshKeyUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSGenerateSshKeyUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSGenerateSshKeyUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,128 +0,0 @@ -<JDialog title='isisfish.server.ssh.generateKey.title' modal='true'> - <script> - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; - import com.sshtools.j2ssh.transport.publickey.OpenSSHPublicKeyFormat; - import com.sshtools.j2ssh.transport.publickey.SshKeyGenerator; - import org.codelutin.util.FileUtil; - import java.io.File; - import java.io.IOException; - import java.util.ArrayList; - import java.util.Arrays; - import java.util.HashMap; - import java.util.Map; - - static protected final Log log = LogFactory.getLog(VCSGenerateSshKeyUI.class); - - private static VCSGenerateSshKeyUI instance; - - public static VCSGenerateSshKeyUI getInstance(JDialog parent) { - if (instance == null) { - instance = new VCSGenerateSshKeyUI(parent); - } - return instance; - } - - public boolean cancel; - public boolean noPassPhrase; - public Exception error; - protected boolean invalidPassPhrase; - protected String vcsLogin; - - private VCSGenerateSshKeyUI(JDialog instance) { - super(instance); - // block close operation - setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); - } - - public void setData(String vcsLogin, File privateKeyFile) { - this.vcsLogin = vcsLogin ; - serverPrivateKeyFile.setText(privateKeyFile.getAbsolutePath()); - serverPublicKeyFile.setText(privateKeyFile.getAbsolutePath() + ".pub"); - noPassPhrase=true; - error=null; - doCheck(); - } - - protected boolean doGenerate() { - File f = new File(getServerPrivateKeyFile().getText()); - try { - SshKeyGenerator sshkeygenerator = new SshKeyGenerator(); - char[] password = getServerPassPhrase().getPassword(); - noPassPhrase=password.length==0; - if (password.length > 0) { - sshkeygenerator.generateKeyPair("dsa", 1024, f.getAbsolutePath(), vcsLogin, Arrays.toString(password)); - Arrays.fill(password, '0'); - } else { - sshkeygenerator.generateKeyPair("dsa", 1024, f.getAbsolutePath(), vcsLogin, ""); - } - // convert to openSSH ? - File publicKeyFile = new File(serverPublicKeyFile.getText()); - log.info("public key before OpenSsh : "+ FileUtil.readAsString(publicKeyFile)); - String openSshPublicKey = SshKeyGenerator.convertPublicKeyFile(publicKeyFile, new OpenSSHPublicKeyFormat(vcsLogin + "@forIsisFish 1024-bit dsa")); - log.info("public key OpenSsh : "+openSshPublicKey); - FileUtil.writeString(publicKeyFile, openSshPublicKey); - } catch (Exception e) { - error=e; - return true; - } - return false; - } - protected boolean check() { - invalidPassPhrase=!Arrays.equals(serverPassPhrase.getPassword(),serverConfirmPassPhrase.getPassword()); - return !invalidPassPhrase; - } - - protected void doCheck() { - ok.setEnabled(check()); - setColor(invalidPassPhrase, serverPassPhraseLabel); - setColor(invalidPassPhrase, serverConfirmPassPhraseLabel); - } - - protected void setColor(boolean invalid, JComponent component) { - component.setForeground(invalid ? Color.red: Color.black); - } - </script> - <Table> - <row fill='horizontal'> - <cell> - <JLabel text='isisfish.launch.server.ssh.privateKeyFile'/> - </cell> - <cell> - <JTextField id='serverPrivateKeyFile' font-size='12' editable='false' columns='28' height='25'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel text='isisfish.launch.server.ssh.publicKeyFile'/> - </cell> - <cell> - <JTextField id='serverPublicKeyFile' font-size='12' editable='false' columns='28' height='25'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverPassPhraseLabel' text='isisfish.launch.server.ssh.passphrase'/> - </cell> - <cell> - <JPasswordField id='serverPassPhrase' onKeyReleased="doCheck()"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverConfirmPassPhraseLabel' text='isisfish.launch.server.ssh.confirm.passphrase'/> - </cell> - <cell> - <JPasswordField id='serverConfirmPassPhrase' onKeyReleased="doCheck()"/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> - <JButton id='ok' text='isisfish.common.apply' enabled='false' onActionPerformed="cancel = doGenerate();dispose()"/> - <JButton id='cancelAction' text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> Deleted: isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSPassPhraseUI.jaxx =================================================================== --- isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSPassPhraseUI.jaxx 2008-10-13 16:53:11 UTC (rev 1552) +++ isis-fish/trunk/src/main/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/VCSPassPhraseUI.jaxx 2008-10-13 17:01:29 UTC (rev 1553) @@ -1,62 +0,0 @@ -<JDialog title='isisfish.vcs.ask.passphrase.title' modal='true'> - <script> - private boolean cancel; - private static VCSPassPhraseUI instance; - - public static char[] getPassPhrase(boolean useUI) { - if (!useUI) { - System.out.print("Enter passphrase: "); - java.io.BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(java.lang.System.in)); - try { - java.lang.String s = ""; - s = bufferedreader.readLine(); - return s.toCharArray(); - } catch (IOException e) { - return null; - } finally { - if (bufferedreader!=null) { - try { - bufferedreader.close(); - } catch (IOException e) { - // ignore - } - } - } - } - if (instance == null) { - instance = new VCSPassPhraseUI(); - } - instance.setVisible(true); - if (instance.cancel) { - // use cancel - return null; - } - return instance.getServerPassPhrase().getPassword(); - } - private VCSPassPhraseUI(JDialog instance) { - super(instance); - // block close operation - setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); - } - </script> - <Table> - <row fill='horizontal'> - <cell> - <JLabel text='isisfish.vcs.ask.passphrase'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JPasswordField id='serverPassPhrase'/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JPanel layout='{new GridLayout(0, 2, 2, 2)}'> - <JButton text='isisfish.common.apply' onActionPerformed="dispose()"/> - <JButton text='isisfish.common.cancel' onActionPerformed="cancel = true;dispose()"/> - </JPanel> - </cell> - </row> - </Table> -</JDialog>
participants (1)
-
tchemit@users.labs.libre-entreprise.org