r801 - trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util
Author: tchemit Date: 2008-02-11 13:17:01 +0000 (Mon, 11 Feb 2008) New Revision: 801 Added: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx Log: ajout dialogue jaxx pour choisir un fichier... Added: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx =================================================================== --- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx (rev 0) +++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx 2008-02-11 13:17:01 UTC (rev 801) @@ -0,0 +1,39 @@ +<JDialog title='{_("simexplorer.error.dialog.title")}'> + <script> + import static org.codelutin.i18n.I18n._; + import static jaxx.runtime.UIHelper.createImageIcon; + JRootPane rootPane = getRootPane(); + rootPane.setDefaultButton(cancel); + rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "cancel"); + rootPane.getActionMap().put("cancel", cancel.getAction()); + + protected void doOk() { + // TODO implements it + } + + protected void doCancel() { + dispose(); + } + + </script> + <Table> + <row fill='both' weightx="1"> + <cell> + <fr.cemagref.simexplorer.is.ui.swing.util.ChooseFilePanel /> + </cell> + </row> + <row fill='both' weightx='1' weighty='1'> + <cell> + <JPanel id='content' visible='false'/> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JPanel layout='{new GridLayout(1, 0, 6, 6)}'> + <JButton id='ok' text='{_("simexplorer.common.ok")}' onActionPerformed='doOk()'/> + <JButton id='cancel' text='{_("simexplorer.common.cancel")}' onActionPerformed='doCancel()'/> + </JPanel> + </cell> + </row> + </Table> +</JDialog> Added: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx =================================================================== --- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx (rev 0) +++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx 2008-02-11 13:17:01 UTC (rev 801) @@ -0,0 +1,39 @@ +<Table> + <script> +import static org.codelutin.i18n.I18n._; +import static jaxx.runtime.UIHelper.createImageIcon; + +protected void chooseDir() { + String dir= org.codelutin.util.FileUtil.getDirectory(); + if (dir!=null) { + directory.setText(dir); + } +} + </script> + <row fill='both'> + <cell> + <JPanel> + <JLabel id='message'/> + </JPanel> + </cell> + </row> + <row fill='both'> + <cell> + <JTextField id='directory'/> + </cell> + <cell> + <JButton id='chooseDirectory' + icon='{createImageIcon("action/fileChooser.png")}' + onActionPerformed='chooseDir()'/> + </cell> + </row> + + <row fill='both'> + <cell> + <JLabel id='fileLabel' labelFor='{file}'/> + </cell> + <cell weightx='1'> + <JTextField id='file'/> + </cell> + </row> +</Table>
participants (1)
-
tchemit@users.labs.libre-entreprise.org