r740 - in trunk: . coser-business/src/main/java/fr/ifremer/coser/services coser-ui/src/main/java/fr/ifremer/coser/ui coser-ui/src/main/java/fr/ifremer/coser/ui/selection coser-ui/src/main/resources/i18n
Author: chatellier Date: 2011-02-11 13:53:50 +0000 (Fri, 11 Feb 2011) New Revision: 740 Log: In selection details sort strata by names Add comparison catch/length graph on lists selection ui Add title for sampling effort data table Modified: trunk/changelog.txt trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/changelog.txt 2011-02-11 13:53:50 UTC (rev 740) @@ -4,6 +4,9 @@ 1.0.1 ----- + * In selection details sort strata by names + * Add comparison catch/length graph on lists selection ui + * Add title for sampling effort data table * Fix resources copy on javawebstart launch * Fix selection file filtering after year/strata/species selection Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2011-02-11 13:53:50 UTC (rev 740) @@ -1622,7 +1622,8 @@ } /** - * Get strata name in project with data in selected {@code years}. + * Filter data on selected years and return resulting strata name sorted + * by names. * * This methods set {@link Selection#setSelectedYears(List)}, and use * it to known if control data need to be reloaded (don't set it yourself). @@ -1701,6 +1702,9 @@ // the only place to set this value selection.setSelectedYears(selectedYears); + // sort strata by names + Collections.sort(result); + return result; } 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 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2011-02-11 13:53:50 UTC (rev 740) @@ -423,7 +423,7 @@ SelectionHandler handler = new SelectionHandler(); selectionView.setHandler(handler); - handler.initMap(selectionView.getSelectionDetailsTab()); + handler.initView(selectionView.getSelectionDetailsTab()); handler.initSelection(selectionView); // restore session size @@ -469,7 +469,7 @@ SelectionHandler handler = new SelectionHandler(); selectionView.setHandler(handler); - handler.initMap(selectionView.getSelectionDetailsTab()); + handler.initView(selectionView.getSelectionDetailsTab()); handler.reloadSelection(selectionView); // restore session size @@ -539,7 +539,7 @@ SelectionHandler handler = new SelectionHandler(); selectionView.setHandler(handler); - handler.initMap(selectionView.getSelectionDetailsTab()); + handler.initView(selectionView.getSelectionDetailsTab()); // FIXME chatellier 20101126 il faut faire un mix de init && reload handler.initSelection(selectionView); Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2011-02-11 13:53:50 UTC (rev 740) @@ -278,13 +278,24 @@ <CardLayout id="detailDecisionPanelLayout" /> <JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}"> + <JScrollPane constraints='"SPECIESDATA"'> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="coser.ui.selection.details.speciesDataDescription" /> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1"> + <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" /> + </cell> + </row> + </Table> + </JScrollPane> <JPanel layout="{new BorderLayout()}" constraints='"ZONEMAP"'> <com.bbn.openmap.gui.ToolPanel id='strataMapToolBar' javaBean='new com.bbn.openmap.gui.ToolPanel()' constraints='BorderLayout.NORTH' /> <fr.ifremer.coser.ui.maps.CoserMap id="strataMap" constraints='BorderLayout.CENTER' /> </JPanel> - <JScrollPane constraints='"SPECIESDATA"'> - <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" /> - </JScrollPane> <JScrollPane constraints='"SPECIESGRAPH"'> <JPanel id="speciesGraphPanel" layout="{new GridBagLayout()}"/> </JScrollPane> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2011-02-11 13:53:50 UTC (rev 740) @@ -42,6 +42,7 @@ import java.util.Set; import javax.swing.JFileChooser; +import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JMenuItem; import javax.swing.JOptionPane; @@ -73,6 +74,9 @@ import fr.ifremer.coser.services.ProjectService; import fr.ifremer.coser.services.PublicationService; import fr.ifremer.coser.ui.common.DataHandler; +import fr.ifremer.coser.ui.control.ControlGraphFrame; +import fr.ifremer.coser.ui.control.ControlHandler; +import fr.ifremer.coser.ui.control.ControlView; import fr.ifremer.coser.ui.result.SelectionAddResultDialog; import fr.ifremer.coser.ui.result.SelectionEditResultDialog; import fr.ifremer.coser.ui.selection.model.OccurrenceDensitySpeciesListModel; @@ -366,7 +370,7 @@ * * @param view view */ - public void initMap(SelectionDetailsView view) { + public void initView(SelectionDetailsView view) { // add layers Project project = view.getContextValue(Project.class); @@ -376,6 +380,9 @@ OMToolSet toolSet = new OMToolSet(); toolSet.setupListeners(view.getStrataMap()); view.getStrataMapToolBar().add((Tool)toolSet); + + // default show sampling effort + showSamplingEffort(view); } /** @@ -1025,6 +1032,45 @@ } /** + * Display data graph, initialized with graph for selected specy + * selected. + * + * TODO chatellier 20110215 : set this code in common with control same code + * + * @param view view + */ + public void displayCompareNumberCatchGraph(SelectionListsView view) { + Project project = view.getContextValue(Project.class); + Selection selection = view.getContextValue(Selection.class); + SwingSession session = view.getContextValue(SwingSession.class); + + // get matrix (form context by method #checkData) + PublicationService publicationService = view.getContextValue(PublicationService.class); + Map<String, JFreeChart> charts = publicationService.getCompareCatchLengthGraph(project, selection, null); + view.setContextValue(charts, "CompareCatchLengthGraph"); + List<String> species = view.getSelectionSizeAllYearListModel().getSpecies(); + + // close previous opened + JFrame previousFrame = (JFrame)view.getContextValue(JFrame.class, "comparenumberframe"); + if (previousFrame != null) { + previousFrame.dispose(); + } + + ControlGraphFrame frame = new ControlGraphFrame(view); + frame.setHandler(new ControlHandler()); + frame.setContextValue(charts); + frame.getSpecyComboModel().setSpecy(species); + frame.pack(); + frame.setLocationRelativeTo(view); + session.add(frame); // session restore + frame.toFront(); + frame.setVisible(true); + + // register current frame + view.setContextValue(frame, "comparenumberframe"); + } + + /** * Display lengthStructure matrix in matrixviewerpanel. * * @param view view Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2011-02-11 13:53:50 UTC (rev 740) @@ -93,8 +93,12 @@ </JPanel> </cell> <cell columns="2"> - <JButton icon="chart_bar.png" toolTipText="coser.ui.graph.lengthStructure" - onActionPerformed="getHandler().displayLengthStructureGraph(this)" /> + <JPanel> + <JButton icon="chart_curve.png" toolTipText="coser.ui.graph.compareNumberCatchLength" + onActionPerformed="getHandler().displayCompareNumberCatchGraph(this)" /> + <JButton icon="chart_bar.png" toolTipText="coser.ui.graph.lengthStructure" + onActionPerformed="getHandler().displayLengthStructureGraph(this)" /> + </JPanel> </cell> <cell /> <cell /> Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2011-02-11 13:53:50 UTC (rev 740) @@ -185,6 +185,7 @@ coser.ui.selection.details.selectedSpecies=L1 \: Selected species (%d/%d) \: coser.ui.selection.details.showMapTip=Display strata map coser.ui.selection.details.showSpreciesTip=Display sampling effort table +coser.ui.selection.details.speciesDataDescription=Haul count by strata and year \: coser.ui.selection.details.speciescontextmenu=For more options, use species lists contextual menu coser.ui.selection.details.strata=Strata (%d/%d) \: coser.ui.selection.details.type=Filter by type (%d/%d) \: Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2011-02-11 11:19:01 UTC (rev 739) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2011-02-11 13:53:50 UTC (rev 740) @@ -185,6 +185,7 @@ coser.ui.selection.details.selectedSpecies=L1 \: Esp\u00E8ces s\u00E9lectionn\u00E9es (%d/%d) \: coser.ui.selection.details.showMapTip=Afficher la carte des strates coser.ui.selection.details.showSpreciesTip=Afficher la table de l'effort d'\u00E9chantillonage +coser.ui.selection.details.speciesDataDescription=Nombre de traits par strate par ann\u00E9e \: coser.ui.selection.details.speciescontextmenu=Pour plus d'options, utilisez le menu contextuel sur les listes d'esp\u00E8ces coser.ui.selection.details.strata=Strates (%d/%d) \: coser.ui.selection.details.type=Filtrer par type (%d/%d) \:
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org