Author: chatellier Date: 2010-11-04 09:56:07 +0000 (Thu, 04 Nov 2010) New Revision: 162 Log: Move project ui to project package Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx Removed: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectOpenView.jaxx Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-11-04 09:47:44 UTC (rev 161) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-11-04 09:56:07 UTC (rev 162) @@ -62,12 +62,14 @@ import fr.ifremer.coser.services.ProjectService; import fr.ifremer.coser.ui.control.ControlHandler; import fr.ifremer.coser.ui.control.ControlView; +import fr.ifremer.coser.ui.project.ProjectCreationView; +import fr.ifremer.coser.ui.project.ProjectOpenView; import fr.ifremer.coser.ui.selection.SelectionHandler; import fr.ifremer.coser.ui.selection.SelectionView; import fr.ifremer.coser.ui.widgets.LookAndFeelViewMenuItem; /** - * Coser hendler for main frame. + * Coser handler for main frame. * * @author chatellier * @version $Revision$ Deleted: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx 2010-11-04 09:47:44 UTC (rev 161) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx 2010-11-04 09:56:07 UTC (rev 162) @@ -1,153 +0,0 @@ -<!-- - #%L - Coser :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<Table> - <CoserFrameHandler id="handler" javaBean="null" /> - - <!-- Validation --> - <fr.ifremer.coser.bean.Project id="project" /> - <jaxx.runtime.validator.swing.SwingValidatorMessageTableModel id='errorsTableModel' - onTableChanged='createProjectButton.setEnabled(errorsTableModel.getRowCount()==0)'/> - <BeanValidator id='validatorProject' bean='project' - uiClass="jaxx.runtime.validator.swing.ui.ImageValidationUI" - errorTableModel="errorsTableModel"> - <field name="name" component="projectProjectName" /> - </BeanValidator> - - <script><![CDATA[ - JCheckBox customReferenceCheckBox = new JCheckBox(_("coser.ui.project.useCustomReferenceSpeciesFile")); - void $afterCompleteSetup() { - fr.ifremer.coser.ui.widgets.ComponentTitledBorder componentBorder = - new fr.ifremer.coser.ui.widgets.ComponentTitledBorder(customReferenceCheckBox, useCustomReferenceFilePanel, BorderFactory.createEtchedBorder()); - useCustomReferenceFilePanel.setBorder(componentBorder); - } - public JCheckBox getCustomReferenceCheckBox() { - return customReferenceCheckBox; - } - ]]></script> - - <row> - <cell weightx="1" fill="horizontal"> - <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.newProject"))}'> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.projectname" /> - </cell> - <cell anchor="west"> - <JTextField id="projectProjectName" text="{project.getName()}" /> - <javax.swing.text.Document javaBean="projectProjectName.getDocument()" - onInsertUpdate='getProject().setName(projectProjectName.getText())' - onRemoveUpdate='getProject().setName(projectProjectName.getText())' /> - - </cell> - </row> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.captureFile" /> - </cell> - <cell weightx="1" fill="horizontal"> - <JTextField id="projectCapturesFileField" /> - </cell> - <cell> - <JButton id="projectCapturesSelectButton" text="coser.ui.common.selectFile" - onActionPerformed="getHandler().selectInputFile(this, projectCapturesFileField)" /> - </cell> - </row> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.stratesFile" /> - </cell> - <cell fill="horizontal"> - <JTextField id="projectStratesFileField" /> - </cell> - <cell> - <JButton id="projectStratesFileSelectButton" text="coser.ui.common.selectFile" - onActionPerformed="getHandler().selectInputFile(this, projectStratesFileField)" /> - </cell> - </row> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.lengthFile" /> - </cell> - <cell fill="horizontal"> - <JTextField id="projectLengthFileField" /> - </cell> - <cell> - <JButton id="projectSizeFileSelectButton" text="coser.ui.common.selectFile" - onActionPerformed="getHandler().selectInputFile(this, projectLengthFileField)" /> - </cell> - </row> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.traitsFile" /> - </cell> - <cell fill="horizontal"> - <JTextField id="projectTraitsFileField" /> - </cell> - <cell> - <JButton id="projectTraitsFileSelectButton" text="coser.ui.common.selectFile" - onActionPerformed="getHandler().selectInputFile(this, projectTraitsFileField)" /> - </cell> - </row> - <row> - <cell> - <JLabel id="referenceSpeciesDescriptionLabel" text="coser.ui.project.usedReferenceSpeciesFile" - enabled="{!customReferenceCheckBox.isSelected()}" /> - </cell> - <cell anchor="west"> - <JLabel id="referenceSpeciesFileLabel" text="{getContextValue(fr.ifremer.coser.CoserConfig.class).getReferenceSpeciesPath()}" - enabled="{!customReferenceCheckBox.isSelected()}" /> - </cell> - </row> - <row> - <cell columns="3" fill="horizontal"> - <Table id="useCustomReferenceFilePanel"> - <row> - <cell> - <JLabel id="customReferenceSpeciesFileLabel" text="coser.ui.project.customReferenceSpeciesFile" - enabled="{customReferenceCheckBox.isSelected()}"/> - </cell> - <cell weightx="1" fill="horizontal"> - <JTextField id="customReferenceSpeciesFileTextField" - enabled="{customReferenceCheckBox.isSelected()}"/> - </cell> - <cell> - <JButton text="coser.ui.common.selectFile" - onActionPerformed="getHandler().selectInputFile(this, customReferenceSpeciesFileTextField)" - enabled="{customReferenceCheckBox.isSelected()}"/> - </cell> - </row> - </Table> - </cell> - </row> - <row> - <cell columns="3" anchor="east"> - <JButton id="createProjectButton" text="coser.ui.project.createProject" - onActionPerformed="getHandler().createProject(this)" /> - </cell> - </row> - </Table> - </cell> - </row> -</Table> Deleted: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectOpenView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectOpenView.jaxx 2010-11-04 09:47:44 UTC (rev 161) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectOpenView.jaxx 2010-11-04 09:56:07 UTC (rev 162) @@ -1,54 +0,0 @@ -<!-- - #%L - Coser :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<Table> - <CoserFrameHandler id="handler" javaBean="null" /> - - <row> - <cell weightx="1" fill="horizontal"> - <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.openProjectTitle"))}'> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.project.project" /> - </cell> - <cell anchor="west" weightx="1"> - <JComboBox id="projectsComboBox" model="{new fr.ifremer.coser.ui.project.ProjectNamesListModel(this)}" /> - </cell> - </row> - <row> - <cell weightx="1" anchor="east" columns="2"> - <JButton text="coser.ui.project.openProject" - enabled="{projectsComboBox.getSelectedItem() != null}" - onActionPerformed="getHandler().loadProject(this)" /> - </cell> - </row> - <row> - <cell weightx="1" fill="horizontal" columns="2"> - <JProgressBar id="loadingProgressBar" indeterminate="true" visible="false" /> - </cell> - </row> - </Table> - </cell> - </row> -</Table> Copied: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx (from rev 155, trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx) =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx 2010-11-04 09:56:07 UTC (rev 162) @@ -0,0 +1,153 @@ +<!-- + #%L + Coser :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<Table> + <fr.ifremer.coser.ui.CoserFrameHandler id="handler" javaBean="null" /> + + <!-- Validation --> + <fr.ifremer.coser.bean.Project id="project" /> + <jaxx.runtime.validator.swing.SwingValidatorMessageTableModel id='errorsTableModel' + onTableChanged='createProjectButton.setEnabled(errorsTableModel.getRowCount()==0)'/> + <BeanValidator id='validatorProject' bean='project' + uiClass="jaxx.runtime.validator.swing.ui.ImageValidationUI" + errorTableModel="errorsTableModel"> + <field name="name" component="projectProjectName" /> + </BeanValidator> + + <script><![CDATA[ + JCheckBox customReferenceCheckBox = new JCheckBox(_("coser.ui.project.useCustomReferenceSpeciesFile")); + void $afterCompleteSetup() { + fr.ifremer.coser.ui.widgets.ComponentTitledBorder componentBorder = + new fr.ifremer.coser.ui.widgets.ComponentTitledBorder(customReferenceCheckBox, useCustomReferenceFilePanel, BorderFactory.createEtchedBorder()); + useCustomReferenceFilePanel.setBorder(componentBorder); + } + public JCheckBox getCustomReferenceCheckBox() { + return customReferenceCheckBox; + } + ]]></script> + + <row> + <cell weightx="1" fill="horizontal"> + <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.newProject"))}'> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.projectname" /> + </cell> + <cell anchor="west"> + <JTextField id="projectProjectName" text="{project.getName()}" /> + <javax.swing.text.Document javaBean="projectProjectName.getDocument()" + onInsertUpdate='getProject().setName(projectProjectName.getText())' + onRemoveUpdate='getProject().setName(projectProjectName.getText())' /> + + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.captureFile" /> + </cell> + <cell weightx="1" fill="horizontal"> + <JTextField id="projectCapturesFileField" /> + </cell> + <cell> + <JButton id="projectCapturesSelectButton" text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, projectCapturesFileField)" /> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.stratesFile" /> + </cell> + <cell fill="horizontal"> + <JTextField id="projectStratesFileField" /> + </cell> + <cell> + <JButton id="projectStratesFileSelectButton" text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, projectStratesFileField)" /> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.lengthFile" /> + </cell> + <cell fill="horizontal"> + <JTextField id="projectLengthFileField" /> + </cell> + <cell> + <JButton id="projectSizeFileSelectButton" text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, projectLengthFileField)" /> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.traitsFile" /> + </cell> + <cell fill="horizontal"> + <JTextField id="projectTraitsFileField" /> + </cell> + <cell> + <JButton id="projectTraitsFileSelectButton" text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, projectTraitsFileField)" /> + </cell> + </row> + <row> + <cell> + <JLabel id="referenceSpeciesDescriptionLabel" text="coser.ui.project.usedReferenceSpeciesFile" + enabled="{!customReferenceCheckBox.isSelected()}" /> + </cell> + <cell anchor="west"> + <JLabel id="referenceSpeciesFileLabel" text="{getContextValue(fr.ifremer.coser.CoserConfig.class).getReferenceSpeciesPath()}" + enabled="{!customReferenceCheckBox.isSelected()}" /> + </cell> + </row> + <row> + <cell columns="3" fill="horizontal"> + <Table id="useCustomReferenceFilePanel"> + <row> + <cell> + <JLabel id="customReferenceSpeciesFileLabel" text="coser.ui.project.customReferenceSpeciesFile" + enabled="{customReferenceCheckBox.isSelected()}"/> + </cell> + <cell weightx="1" fill="horizontal"> + <JTextField id="customReferenceSpeciesFileTextField" + enabled="{customReferenceCheckBox.isSelected()}"/> + </cell> + <cell> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, customReferenceSpeciesFileTextField)" + enabled="{customReferenceCheckBox.isSelected()}"/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell columns="3" anchor="east"> + <JButton id="createProjectButton" text="coser.ui.project.createProject" + onActionPerformed="getHandler().createProject(this)" /> + </cell> + </row> + </Table> + </cell> + </row> +</Table> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java 2010-11-04 09:47:44 UTC (rev 161) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectNamesListModel.java 2010-11-04 09:56:07 UTC (rev 162) @@ -31,7 +31,6 @@ import javax.swing.ComboBoxModel; import fr.ifremer.coser.services.ProjectService; -import fr.ifremer.coser.ui.ProjectOpenView; /** * Validation categories list model. Copied: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx (from rev 84, trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectOpenView.jaxx) =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectOpenView.jaxx 2010-11-04 09:56:07 UTC (rev 162) @@ -0,0 +1,54 @@ +<!-- + #%L + Coser :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<Table> + <fr.ifremer.coser.ui.CoserFrameHandler id="handler" javaBean="null" /> + + <row> + <cell weightx="1" fill="horizontal"> + <Table border='{BorderFactory.createTitledBorder(_("coser.ui.project.openProjectTitle"))}'> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.project.project" /> + </cell> + <cell anchor="west" weightx="1"> + <JComboBox id="projectsComboBox" model="{new fr.ifremer.coser.ui.project.ProjectNamesListModel(this)}" /> + </cell> + </row> + <row> + <cell weightx="1" anchor="east" columns="2"> + <JButton text="coser.ui.project.openProject" + enabled="{projectsComboBox.getSelectedItem() != null}" + onActionPerformed="getHandler().loadProject(this)" /> + </cell> + </row> + <row> + <cell weightx="1" fill="horizontal" columns="2"> + <JProgressBar id="loadingProgressBar" indeterminate="true" visible="false" /> + </cell> + </row> + </Table> + </cell> + </row> +</Table>