Author: tchemit Date: 2008-02-20 18:43:44 +0000 (Wed, 20 Feb 2008) New Revision: 1142 Added: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx Removed: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx Log: move ui to ui package Copied: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util (from rev 1132, trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util) Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx 2008-02-19 21:13:55 UTC (rev 1132) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -1,34 +0,0 @@ -<JDialog title='simexplorer.error.dialog.title'> - <script> - JRootPane rootPane = getRootPane(); - rootPane.setDefaultButton(close); - rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "close"); - rootPane.getActionMap().put("close", close.getAction()); - </script> - <Table> - <row fill='both'> - <cell> - <JPanel> - <JLabel text='simexplorer.error.dialog.message'/> - </JPanel> - </cell> - </row> - <row fill='both'> - <cell> - <JLabel id='errorMessage' /> - </cell> - </row> - <row fill='both' weightx='1' weighty='1'> - <cell> - <JScrollPane width='600' height='200'> - <JTextArea id='errorStack' editable='false' font-size='9'/> - </JScrollPane> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JButton id='close' text='simexplorer.common.close' onActionPerformed='dispose()'/> - </cell> - </row> - </Table> -</JDialog> Copied: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx (from rev 1140, trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx) =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx (rev 0) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/ui/util/ErrorDialog.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -0,0 +1,53 @@ +<JDialog title='simexplorer.error.dialog.title'> + <script> + +/** le dialogue pour afficher les erreurs */ +protected static ErrorDialog instance; + +public static void showError(Exception e) { + if (instance == null) { + instance = new ErrorDialog(); + } + instance.getErrorMessage().setText(e.getMessage()); + StringWriter w = new StringWriter(); + e.printStackTrace(new PrintWriter(w)); + instance.getErrorStack().setText(w.toString()); + instance.getErrorStack().setCaretPosition(0); + instance.pack(); + instance.setVisible(true); +} +public static void disposeUI() { + instance=null; +} +JRootPane rootPane = getRootPane(); +rootPane.setDefaultButton(close); +rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "close"); +rootPane.getActionMap().put("close", close.getAction()); + </script> + <Table> + <row fill='both'> + <cell> + <JPanel> + <JLabel text='simexplorer.error.dialog.message'/> + </JPanel> + </cell> + </row> + <row fill='both'> + <cell> + <JLabel id='errorMessage' /> + </cell> + </row> + <row fill='both' weightx='1' weighty='1'> + <cell> + <JScrollPane width='600' height='200'> + <JTextArea id='errorStack' editable='false' font-size='9'/> + </JScrollPane> + </cell> + </row> + <row fill='horizontal'> + <cell> + <JButton id='close' text='simexplorer.common.close' onActionPerformed='dispose()'/> + </cell> + </row> + </Table> +</JDialog> Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx 2008-02-20 18:42:52 UTC (rev 1141) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFile.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -1,37 +0,0 @@ -<JDialog title='simexplorer.error.dialog.title'> - <script> - 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> Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx 2008-02-20 18:42:52 UTC (rev 1141) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ChooseFilePanel.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -1,36 +0,0 @@ -<Table> - <script> -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> Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx 2008-02-20 18:42:52 UTC (rev 1141) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/ErrorDialog.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -1,53 +0,0 @@ -<JDialog title='simexplorer.error.dialog.title'> - <script> - -/** le dialogue pour afficher les erreurs */ -protected static ErrorDialog instance; - -public static void showError(Exception e) { - if (instance == null) { - instance = new ErrorDialog(); - } - instance.getErrorMessage().setText(e.getMessage()); - StringWriter w = new StringWriter(); - e.printStackTrace(new PrintWriter(w)); - instance.getErrorStack().setText(w.toString()); - instance.getErrorStack().setCaretPosition(0); - instance.pack(); - instance.setVisible(true); -} -public static void disposeUI() { - instance=null; -} -JRootPane rootPane = getRootPane(); -rootPane.setDefaultButton(close); -rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "close"); -rootPane.getActionMap().put("close", close.getAction()); - </script> - <Table> - <row fill='both'> - <cell> - <JPanel> - <JLabel text='simexplorer.error.dialog.message'/> - </JPanel> - </cell> - </row> - <row fill='both'> - <cell> - <JLabel id='errorMessage' /> - </cell> - </row> - <row fill='both' weightx='1' weighty='1'> - <cell> - <JScrollPane width='600' height='200'> - <JTextArea id='errorStack' editable='false' font-size='9'/> - </JScrollPane> - </cell> - </row> - <row fill='horizontal'> - <cell> - <JButton id='close' text='simexplorer.common.close' onActionPerformed='dispose()'/> - </cell> - </row> - </Table> -</JDialog> Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx 2008-02-20 18:42:52 UTC (rev 1141) +++ trunk/simexplorer-is/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx 2008-02-20 18:43:44 UTC (rev 1142) @@ -1,18 +0,0 @@ -<Table insets='0,0,0,0' opaque='false'> - <row fill='both'> - <cell anchor='west' weightx="1" insets='0,0,0,0'> - <JLabel id='label' opaque='false' font-size='12' - verticalAlignment='center' verticalTextPosition='0'/> - </cell> - <cell anchor='east' insets='2,15,0,0' weighty='1'> - <JButton id='closeTab' preferredSize='{new Dimension(18,18)}' - verticalAlignment='0' - verticalTextPosition='0' - opaque='true' - borderPainted='true' - focusPainted='false' - enabled='false' - horizontalTextPosition='0'/> - </cell> - </row> -</Table>