Author: tchemit Date: 2008-04-16 20:40:38 +0000 (Wed, 16 Apr 2008) New Revision: 525 Added: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-filechooser.png trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-generatekey.png trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-test.png Removed: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/Button_C32.png Modified: trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfigUI.jaxx trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/config.css Log: config ui Deleted: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/Button_C32.png =================================================================== (Binary files differ) Added: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-filechooser.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-filechooser.png ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-generatekey.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-generatekey.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-test.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/ui/jaxx/src/main/resources/icons/action-test.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfigUI.jaxx =================================================================== --- trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfigUI.jaxx 2008-04-15 08:49:43 UTC (rev 524) +++ trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfigUI.jaxx 2008-04-16 20:40:38 UTC (rev 525) @@ -1,6 +1,98 @@ -<ConfigUI title='lutinvcs.config.title' resizable='false'> +<ConfigUI title='lutinvcs.config.title'> + <!--ConfigUI title='lutinvcs.config.title' resizable='false'--> <style source="config.css"/> - <script>import static org.codelutin.vcs.type.VCSConnexionMode.*;</script> + <script> + import static org.codelutin.vcs.type.VCSConnexionMode.*; + import static org.codelutin.vcs.ui.util.UIHelper.createActionIcon; + + public String getElementValue(Element element) { + JComponent o = getElement(element); + if (o instanceof JPasswordField) { + return Arrays.toString(((JPasswordField) o).getPassword()); + } + if (o instanceof JTextField) { + return ((JTextField) o).getText(); + } + if (o instanceof JRadioButton) { + return String.valueOf(((JRadioButton) o).isSelected()); + } + if (o instanceof JCheckBox) { + return String.valueOf(((JCheckBox) o).isSelected()); + } + return ""; + } + + public JLabel getElementLabel(Element element) { + return (JLabel) $objectMap.get(element.name() + "Label"); + } + + public JComponent getElement(Element element) { + return (JComponent) $objectMap.get(element.name()); + } + </script> + + <java.awt.CardLayout id='connexionPanelLayout'> + <Table id='anonymousPanel' insets='2,2,2,2'> + <row> + <cell columns="3"> + <JLabel text="lutinvcs.no.config" enabled='false'/> + </cell> + </row> + </Table> + <Table id='passwordPanel' insets='2,2,2,2'> + <row fill='horizontal'> + <cell> + <JLabel id='loginLabel'/> + </cell> + <cell> + <JTextField id='login' onKeyReleased="doCheck(Element.login)"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='passwordLabel' labelFor='{password}'/> + </cell> + <cell> + <JPasswordField id='password' onKeyReleased="doCheck(Element.password)"/> + </cell> + </row> + </Table> + <Table id='sshPanel' opaque="false" insets='2,2,2,2'> + <row fill='horizontal'> + <cell> + <JLabel id='sshLoginLabel'/> + </cell> + <cell> + <JTextField id='sshLogin' onKeyReleased="doCheck(Element.sshlogin)"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='passphraseLabel'/> + </cell> + <cell> + <JToolBar opaque='false' borderPainted='false' height="24"> + <JCheckBox id='noPassPhrase' onKeyReleased="doCheck(Element.nopassphrase)"/> + <JPasswordField id='passphrase' onKeyReleased="doCheck(Element.passphrase)" + enabled='{!noPassPhrase.isSelected()}'/> + </JToolBar> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='privateKeyFileLabel'/> + </cell> + <cell> + <JToolBar opaque='false' borderPainted='false' height="24"> + <JTextField id='privateKeyFile' onKeyReleased="doCheck(Element.privatekey)"/> + <JButton id='changePrivateKeyFile' icon='{createActionIcon("filechooser")}' + onActionPerformed="changePrivateKeyFile()"/> + </JToolBar> + </cell> + </row> + </Table> + </java.awt.CardLayout> + <JToolBar id='top'> <JLabel text='lutinvcs.config.message'/> <Table fill='both' insets='0,0,0,0'> @@ -8,113 +100,87 @@ <cell fill='both'/> </row> </Table> - <JButton id='help' action='{createHelpAction()}'/> + <JButton id='help' action='{createHelpAction()}' borderPainted='false'/> </JToolBar> + + <JToolBar id='connexionHead' opaque='false' height='30'> + <JLabel id='connexionModeLabel'/> + <JRadioButton id='connexionModeAnonymous' onActionPerformed="changeAutheticationMode(ANONYMOUS)"/> + <JRadioButton id='connexionModePassword' onActionPerformed="changeAutheticationMode(PASSWORD)"/> + <JRadioButton id='connexionModeSsh' onActionPerformed="changeAutheticationMode(SSH)"/> + <Table fill='both' insets='0,0,0,0'> + <row> + <cell fill='both'/> + </row> + </Table> + <JButton id='generateKey' icon='{createActionIcon("generatekey")}' onActionPerformed="generateKey()" + borderPainted='false'/> + <JButton id='reset' onActionPerformed="reset()" icon='{createActionIcon("revert")}' borderPainted='false'/> + <JButton id='testConnection' onActionPerformed="testConnexion()" icon='{createActionIcon("test")}' + borderPainted='false'/> + </JToolBar> + + <!--JToolBar id='identityHead' opaque='false' onMouseClicked="identityContent.setVisible(!identityContent.isVisible());if (!identityContent.isVisible()) identityScroll.setSize(0,0);pack();identityScroll.invalidate();"--> + <JToolBar id='identityHead' opaque='false'> + <JLabel id='identityLabel'/> + </JToolBar> <Table fill='both' insets="1,1,1,1"> <row fill='horizontal'> <cell columns='2'> - <JScrollPane height="60" columnHeaderView='{top}'> + <JScrollPane columnHeaderView='{top}'> + <!--JScrollPane height="60" columnHeaderView='{top}' width="420"--> <JEditorPane id="doc"/> </JScrollPane> </cell> </row> <row fill='horizontal'> - <cell> - <JLabel id='firstnameLabel'/> + <cell columns="2" fill='both'> + <JScrollPane columnHeaderView='{identityHead}' styleClass='connexionScroll' id='identityScroll'> + <Table id="identityContent"> + <row fill='horizontal'> + <cell> + <JLabel id='firstnameLabel'/> + </cell> + <cell> + <JTextField id='firstname' onKeyReleased="doCheck(Element.firstname)"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='lastnameLabel'/> + </cell> + <cell> + <JTextField id='lastname' onKeyReleased="doCheck(Element.lastname)"/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JLabel id='emailLabel'/> + </cell> + <cell> + <JTextField id='email' onKeyReleased="doCheck(Element.email)"/> + </cell> + </row> + </Table> + </JScrollPane> </cell> - <cell> - <JTextField id='firstname' onKeyReleased="doCheck(Element.firstname)"/> - </cell> </row> <row fill='horizontal'> - <cell> - <JLabel id='lastnameLabel'/> + <cell columns="2" fill='both'> + <JScrollPane columnHeaderView='{connexionHead}' styleClass='connexionScroll'> + <!--JScrollPane columnHeaderView='{connexionHead}' height="120" width="420" styleClass='connexionScroll'--> + <JPanel id='connexionPanel' layout='{connexionPanelLayout}'/> + </JScrollPane> </cell> - <cell> - <JTextField id='lastname' onKeyReleased="doCheck(Element.lastname)"/> - </cell> </row> <row fill='horizontal'> - <cell> - <JLabel id='emailLabel'/> + <cell weightx='1'> + <JButton id='ok' onActionPerformed="save()"/> </cell> - <cell> - <JTextField id='email' onKeyReleased="doCheck(Element.email)"/> + <cell weightx='1'> + <JButton id='cancel' onActionPerformed="dispose()"/> </cell> </row> - <row fill='horizontal'> - <cell> - <JLabel width='150' height='20' id='serverAuthenticationMethodLabel'/> - </cell> - <cell> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JRadioButton id='serverAuthenticationMethodAnonymous' value='anonymous' onActionPerformed="changeAutheticationMode(ANONYMOUS)"/> - <JRadioButton id='serverAuthenticationMethodPassword' value='pass' onActionPerformed="changeAutheticationMode(PASSWORD)"/> - <JRadioButton id='serverAuthenticationMethodSsh' value='ssh' onActionPerformed="changeAutheticationMode(SSH)"/> - </JPanel> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverLoginLabel' visible='{!serverAuthenticationMethodAnonymous.isSelected()}'/> - </cell> - <cell> - <JTextField id='serverLogin' onKeyReleased="doCheck(Element.login)" visible='{!serverAuthenticationMethodAnonymous.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverPasswordLabel' visible='{serverAuthenticationMethodPassword.isSelected()}'/> - </cell> - <cell> - <JPasswordField id='serverPassword' visible='{serverAuthenticationMethodPassword.isSelected()}' onKeyReleased="doCheck(Element.password)"/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverLoginNoPassPhraseLabel' visible='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - <cell> - <JCheckBox id='serverNoPassPhrase' onKeyReleased="doCheck(Element.nopassphrase)" visible='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverPassphraseLabel' visible='{serverAuthenticationMethodSsh.isSelected()}' enabled='{!serverNoPassPhrase.isSelected()}'/> - </cell> - <cell> - <JPasswordField id='serverPassphrase' onKeyReleased="doCheck(Element.passphrase)" visible='{serverAuthenticationMethodSsh.isSelected()}' enabled='{!serverNoPassPhrase.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JLabel id='serverPrivateKeyFileLabel' visible='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - <cell> - <JTextField id='serverPrivateKeyFile' onKeyReleased="doCheck(Element.privatekey)" visible='{serverAuthenticationMethodSsh.isSelected()}'/> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JToolBar> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JButton id='serverPrivateKeyChangeFile' text='lutinvcs.config.server.ssh.key.change' visible='{serverAuthenticationMethodSsh.isSelected()}' onActionPerformed="changePrivateKeyFile()"/> - <JButton id='serverPrivateKeyGenerate' text='lutinvcs.config.server.ssh.key.generate' visible='{serverAuthenticationMethodSsh.isSelected()}'/> - <JButton id='testConnection' text='lutinvcs.config.test'/> - </JPanel> - </JToolBar> - </cell> - </row> - <row fill='horizontal'> - <cell columns="2"> - <JToolBar> - <JPanel layout='{new GridLayout(0, 3, 2, 2)}'> - <JButton id='ok' text='lutinvcs.apply' onActionPerformed="save();"/> - <JButton id='reset' text='lutinvcs.reset' onActionPerformed="reset();"/> - <JButton id='cancelAction' text='lutinvcs.cancel' onActionPerformed="dispose();"/> - </JPanel> - </JToolBar> - </cell> - </row> </Table> + </ConfigUI> Modified: trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css =================================================================== --- trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-15 08:49:43 UTC (rev 524) +++ trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-16 20:40:38 UTC (rev 525) @@ -36,7 +36,7 @@ } .updateScroll, .diffScroll, .confirmScroll { - verticalScrollBarPolicy: 20; + verticalScrollBarPolicy: 21; horizontalScrollBarPolicy: 31; } Modified: trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/config.css =================================================================== --- trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/config.css 2008-04-15 08:49:43 UTC (rev 524) +++ trunk/lutinvcs/ui/jaxx/src/main/uimodel/org/codelutin/vcs/ui/config.css 2008-04-16 20:40:38 UTC (rev 525) @@ -9,26 +9,17 @@ } JTextField { - columns: 30; + columns: 27; } #top, #help { borderPainted: false; - opaque: false; + opaque: false; } -#serverPrivateKeyFileLabel { - text: "lutinvcs.config.server.ssh.privateKeyFile"; +#identityLabel { + text: "lutinvcs.config.identiy"; } - -#serverLoginNoPassPhraseLabel { - text: "lutinvcs.config.server.ssh.no.passphrase"; -} - -#serverLoginLabel { - text: "lutinvcs.config.server.login"; -} - #firstnameLabel { text: "lutinvcs.config.firstname"; } @@ -41,29 +32,74 @@ text: "lutinvcs.config.email"; } -#serverAuthenticationMethodLabel { +#connexionModeLabel { text: "lutinvcs.config.server.authenticationMethod"; } -#serverPasswordLabel { +#connexionModeAnonymous { + text: "lutinvcs.config.anonymous"; + buttonGroup: "connexionMode"; +} + +#connexionModePassword { + text: "lutinvcs.config.pass"; + buttonGroup: "connexionMode"; +} + +#connexionModeSsh { + text: "lutinvcs.config.ssh"; + buttonGroup: "connexionMode"; +} + +#loginLabel,#sshLoginLabel { + text: "lutinvcs.config.server.login"; +} + +#passwordLabel { text: "lutinvcs.config.server.password"; } -#serverPassphraseLabel { +#noPassPhraseLabel { + text: "lutinvcs.config.server.ssh.no.passphrase"; +} + +#passphraseLabel { text: "lutinvcs.config.server.passphrase"; } -#serverAuthenticationMethodAnonymous { - text: "lutinvcs.config.anonymous"; - buttonGroup: "serverMethod"; +#privateKeyFileLabel { + text: "lutinvcs.config.server.ssh.privateKeyFile"; } -#serverAuthenticationMethodPassword { - text: "lutinvcs.config.pass"; - buttonGroup: "serverMethod"; +#changePrivateKeyFile { + toolTipText: "lutinvcs.config.server.ssh.key.change"; + opaque:false; + borderPainted:false; + margin:0; } -#serverAuthenticationMethodSsh { - text: "lutinvcs.config.ssh"; - buttonGroup: "serverMethod"; +#generateKey { + toolTipText: "lutinvcs.config.server.ssh.key.generate"; } + +#testConnection { + /*text: "lutinvcs.config.test";*/ + toolTipText: "lutinvcs.config.test.tip"; +} + +#ok { + text: "lutinvcs.apply"; +} + +#reset { + toolTipText: "lutinvcs.reset"; +} + +#cancel { + text: "lutinvcs.cancel"; +} + +.connexionScroll{ + verticalScrollBarPolicy: 20; + horizontalScrollBarPolicy: 31; +} \ No newline at end of file