Author: chatellier Date: 2010-12-10 09:58:50 +0000 (Fri, 10 Dec 2010) New Revision: 387 Log: Add split pane and fix accordion pane minimum size Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 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 2010-12-09 16:00:43 UTC (rev 386) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 09:58:50 UTC (rev 387) @@ -54,7 +54,7 @@ </BeanValidator> <row> - <cell weightx="1" fill="horizontal" columns="2"> + <cell weightx="1" fill="horizontal"> <JToolBar floatable="false"> <JButton id="saveSelectionButton" text="coser.ui.selection.details.saveSelection" icon="disk.png" onActionPerformed="getHandler().saveSelection(this)" /> @@ -65,210 +65,211 @@ </row> <row> <cell weightx="1" weighty="1" fill="both"> - <AccordionPane id="detailAccordionPane"> - <AccordionPaneSubPanel title="coser.ui.selection.detail.mainAccordion"> - <Table> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.selection.details.name" /> - </cell> - <cell weightx="1" fill="horizontal" columns="3"> - <JTextField id="detailsSelectionNameField" text="{getSelection().getName()}" - enabled="{isCreationState()}"/> - <javax.swing.text.Document javaBean="detailsSelectionNameField.getDocument()" - onInsertUpdate='getSelection().setName(detailsSelectionNameField.getText())' - onRemoveUpdate='getSelection().setName(detailsSelectionNameField.getText())' /> - </cell> - </row> - <row> - <cell anchor="west"> - <JLabel text="coser.ui.selection.details.description" /> - </cell> - <cell weightx="1" fill="horizontal" columns="3"> - <JScrollPane> - <JTextArea id="detailsDescription" text="{getSelection().getDescription()}" rows="3" /> - </JScrollPane> - <javax.swing.text.Document javaBean="detailsDescription.getDocument()" - onInsertUpdate='getSelection().setDescription(detailsDescription.getText())' - onRemoveUpdate='getSelection().setDescription(detailsDescription.getText())' /> - </cell> - </row> - <row> - <cell anchor="northwest"> - <JLabel text="coser.ui.selection.details.comment" /> - </cell> - <cell anchor="north" fill="horizontal" weighty="1" columns="3"> - <JScrollPane> - <JTextArea id="detailsComment" rows="3" /> - <javax.swing.text.Document javaBean="detailsComment.getDocument()" - onInsertUpdate='getSelection().setComment(detailsComment.getText())' - onRemoveUpdate='getSelection().setComment(detailsComment.getText())' /> - </JScrollPane> - </cell> - </row> - </Table> - </AccordionPaneSubPanel> - <AccordionPaneSubPanel title="coser.ui.selection.detail.yearAccordion"> - <Table> - <row> - <cell anchor="west" columns="2"> - <JLabel text="coser.ui.selection.details.dates" /> - </cell> - </row> - <row> - <cell weighty="1" weightx="1" fill="both"> - <JScrollPane> - <YearListModel id="datesListModel" /> - <JList id="datesList" model="{datesListModel}" - selectionModel="{new CoserListSelectionModel(datesList.getSelectionModel(), datesListModel)}" - onValueChanged="setYearsValidated(false)" /> - <ListSelectionModel id="datesListSelectionModel" javaBean="datesList.getSelectionModel()" /> - </JScrollPane> - </cell> - <cell anchor="south"> - <JButton id="validDatesButton" text="coser.ui.selection.details.validDates" - onActionPerformed="getHandler().updateSelectionDateData(this);setYearsValidated(true)" - enabled="{!isYearsValidated()}"/> - </cell> - </row> - </Table> - </AccordionPaneSubPanel> - <AccordionPaneSubPanel title="coser.ui.selection.detail.strataAccordion"> - <Table> - <row> - <cell fill="horizontal"> - <JLabel id="strataLabel" text='{_("coser.ui.selection.details.strata", 0, 0)}' /> - </cell> - </row> - <row> - <cell weightx="1" weighty="2" fill="both" rows="2"> - <JScrollPane> - <StrataListModel id="strataListModel" - onContentsChanged='strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/> - <JList id="strataList" model="{strataListModel}" - selectionModel="{new CoserListSelectionModel(strataList.getSelectionModel(), strataListModel)}" - onValueChanged='setStrataValidated(false); strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/> - </JScrollPane> - </cell> - <cell anchor="northeast"> - <JButton icon="map.png" toolTipText="coser.ui.selection.details.showMapTip" - onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "ZONEMAP");' /> - </cell> - <cell anchor="northeast"> - <JButton icon="table.png" toolTipText="coser.ui.selection.details.showSpreciesTip" - onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "SPECIESDATA");getHandler().showSamplingEffort(this);' /> - </cell> - </row> - <row> - <cell anchor="south" columns="2"> - <JButton id="validStrataButton" text="coser.ui.selection.details.validStrata" - onActionPerformed="getHandler().strataListChanged(this);setStrataValidated(true)" - enabled="{isYearsValidated() && !isStrataValidated()}"/> - </cell> - </row> - </Table> - </AccordionPaneSubPanel> - <AccordionPaneSubPanel title="coser.ui.selection.detail.speciesAccordion"> - <Table> - <row> - <cell fill="horizontal" columns="4"> - <JLabel id="typeSpecyLabel" text='{_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize())}' /> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" columns="2"> - <JScrollPane> - <SpecyTypesListModel id="typeSpecyModel" constructorParams="this" - onContentsChanged='typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))'/> - <JList id="typeSpecyList" model="{typeSpecyModel}" - selectionModel="{new CoserListSelectionModel(typeSpecyList.getSelectionModel(), typeSpecyModel)}" - enabled="{isYearsValidated() && isStrataValidated()}" - onValueChanged='validFilterButton.setEnabled(true); typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))' /> - </JScrollPane> - </cell> - <cell anchor="south" columns="2"> - <JButton id="validFilterButton" text="coser.ui.selection.details.validFilter" - onActionPerformed="getHandler().updateSelectionSpecies(this);validFilterButton.setEnabled(false)" - enabled="false"/> - </cell> - </row> - <row> - <cell weighty="3" fill="both" columns="4"> - <Table> - <row> - <cell fill="horizontal" columns="2"> - <JLabel id="filteredSpecyLabel" text='{_("coser.ui.selection.details.filteredSpecies", 0, 0)}' /> - </cell> - <cell fill="horizontal"> - <JLabel id="selectedSpecyLabel" text='{_("coser.ui.selection.details.selectedSpecies", 0, 0)}' /> - </cell> - </row> - <row> - <cell weightx="1" weighty="1" fill="both"> - <JScrollPane> - <SpecyListModel id="filteredSpecyListModel" - onContentsChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))'/> - <JList id="filteredSpecyList" model="{filteredSpecyListModel}" - onMouseClicked="getHandler().showFilteredSpeciesContextMenu(this, event)" - selectionModel="{new CoserListSelectionModel(filteredSpecyList.getSelectionModel(), filteredSpecyListModel)}" - enabled="{isYearsValidated() && isStrataValidated()}" - onValueChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))' /> - <ListSelectionModel id="filteredSpecyListSelectionModel" javaBean="filteredSpecyList.getSelectionModel()" /> - </JScrollPane> - </cell> - <cell anchor="north"> - <Table> - <row> - <cell> - <JButton icon="arrow_right.png" - toolTipText="coser.ui.selection.details.addToSelectedListTip" - onActionPerformed="getHandler().addSelectedFilteredSpecies(this)" - enabled="{getFilteredSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/> - </cell> - </row> - <row> - <cell> - <JButton icon="arrow_left.png" - toolTipText="coser.ui.selection.details.removeFromSelectedListTip" - onActionPerformed="getHandler().removeSelectedSpecies(this)" - enabled="{getSelectedSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/> - </cell> - </row> - </Table> - </cell> - <cell weightx="1" weighty="1" fill="both"> - <JScrollPane> - <SpecyListModel id="selectedSpecyListModel" - onContentsChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/> - <JList id="selectedSpecyList" model="{selectedSpecyListModel}" - onMouseClicked="getHandler().showSelectedSpeciesContextMenu(this, event)" - selectionModel="{new CoserListSelectionModel(selectedSpecyList.getSelectionModel(), selectedSpecyListModel)}" - enabled="{isYearsValidated() && isStrataValidated()}" - onValueChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/> - <ListSelectionModel id="selectedSpecyListSelectionModel" javaBean="selectedSpecyList.getSelectionModel()" /> - </JScrollPane> - </cell> - </row> - </Table> - </cell> - </row> - </Table> - </AccordionPaneSubPanel> - </AccordionPane> + <JSplitPane> + <AccordionPane id="detailAccordionPane" minimumSize="{new Dimension(100, 0)}"> + <AccordionPaneSubPanel title="coser.ui.selection.detail.mainAccordion"> + <Table> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.selection.details.name" /> + </cell> + <cell weightx="1" fill="horizontal" columns="3"> + <JTextField id="detailsSelectionNameField" text="{getSelection().getName()}" + enabled="{isCreationState()}"/> + <javax.swing.text.Document javaBean="detailsSelectionNameField.getDocument()" + onInsertUpdate='getSelection().setName(detailsSelectionNameField.getText())' + onRemoveUpdate='getSelection().setName(detailsSelectionNameField.getText())' /> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel text="coser.ui.selection.details.description" /> + </cell> + <cell weightx="1" fill="horizontal" columns="3"> + <JScrollPane> + <JTextArea id="detailsDescription" text="{getSelection().getDescription()}" rows="3" /> + </JScrollPane> + <javax.swing.text.Document javaBean="detailsDescription.getDocument()" + onInsertUpdate='getSelection().setDescription(detailsDescription.getText())' + onRemoveUpdate='getSelection().setDescription(detailsDescription.getText())' /> + </cell> + </row> + <row> + <cell anchor="northwest"> + <JLabel text="coser.ui.selection.details.comment" /> + </cell> + <cell anchor="north" fill="horizontal" weighty="1" columns="3"> + <JScrollPane> + <JTextArea id="detailsComment" rows="3" /> + <javax.swing.text.Document javaBean="detailsComment.getDocument()" + onInsertUpdate='getSelection().setComment(detailsComment.getText())' + onRemoveUpdate='getSelection().setComment(detailsComment.getText())' /> + </JScrollPane> + </cell> + </row> + </Table> + </AccordionPaneSubPanel> + <AccordionPaneSubPanel title="coser.ui.selection.detail.yearAccordion"> + <Table> + <row> + <cell anchor="west" columns="2"> + <JLabel text="coser.ui.selection.details.dates" /> + </cell> + </row> + <row> + <cell weighty="1" weightx="1" fill="both"> + <JScrollPane> + <YearListModel id="datesListModel" /> + <JList id="datesList" model="{datesListModel}" + selectionModel="{new CoserListSelectionModel(datesList.getSelectionModel(), datesListModel)}" + onValueChanged="setYearsValidated(false)" /> + <ListSelectionModel id="datesListSelectionModel" javaBean="datesList.getSelectionModel()" /> + </JScrollPane> + </cell> + <cell anchor="south"> + <JButton id="validDatesButton" text="coser.ui.selection.details.validDates" + onActionPerformed="getHandler().updateSelectionDateData(this);setYearsValidated(true)" + enabled="{!isYearsValidated()}"/> + </cell> + </row> + </Table> + </AccordionPaneSubPanel> + <AccordionPaneSubPanel title="coser.ui.selection.detail.strataAccordion"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel id="strataLabel" text='{_("coser.ui.selection.details.strata", 0, 0)}' /> + </cell> + </row> + <row> + <cell weightx="1" weighty="2" fill="both" rows="2"> + <JScrollPane> + <StrataListModel id="strataListModel" + onContentsChanged='strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/> + <JList id="strataList" model="{strataListModel}" + selectionModel="{new CoserListSelectionModel(strataList.getSelectionModel(), strataListModel)}" + onValueChanged='setStrataValidated(false); strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/> + </JScrollPane> + </cell> + <cell anchor="northeast"> + <JButton icon="map.png" toolTipText="coser.ui.selection.details.showMapTip" + onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "ZONEMAP");' /> + </cell> + <cell anchor="northeast"> + <JButton icon="table.png" toolTipText="coser.ui.selection.details.showSpreciesTip" + onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "SPECIESDATA");getHandler().showSamplingEffort(this);' /> + </cell> + </row> + <row> + <cell anchor="south" columns="2"> + <JButton id="validStrataButton" text="coser.ui.selection.details.validStrata" + onActionPerformed="getHandler().strataListChanged(this);setStrataValidated(true)" + enabled="{isYearsValidated() && !isStrataValidated()}"/> + </cell> + </row> + </Table> + </AccordionPaneSubPanel> + <AccordionPaneSubPanel title="coser.ui.selection.detail.speciesAccordion"> + <Table> + <row> + <cell fill="horizontal" columns="4"> + <JLabel id="typeSpecyLabel" text='{_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize())}' /> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" columns="2"> + <JScrollPane> + <SpecyTypesListModel id="typeSpecyModel" constructorParams="this" + onContentsChanged='typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))'/> + <JList id="typeSpecyList" model="{typeSpecyModel}" + selectionModel="{new CoserListSelectionModel(typeSpecyList.getSelectionModel(), typeSpecyModel)}" + enabled="{isYearsValidated() && isStrataValidated()}" + onValueChanged='validFilterButton.setEnabled(true); typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))' /> + </JScrollPane> + </cell> + <cell anchor="south" columns="2"> + <JButton id="validFilterButton" text="coser.ui.selection.details.validFilter" + onActionPerformed="getHandler().updateSelectionSpecies(this);validFilterButton.setEnabled(false)" + enabled="false"/> + </cell> + </row> + <row> + <cell weighty="3" fill="both" columns="4"> + <Table> + <row> + <cell fill="horizontal" columns="2"> + <JLabel id="filteredSpecyLabel" text='{_("coser.ui.selection.details.filteredSpecies", 0, 0)}' /> + </cell> + <cell fill="horizontal"> + <JLabel id="selectedSpecyLabel" text='{_("coser.ui.selection.details.selectedSpecies", 0, 0)}' /> + </cell> + </row> + <row> + <cell weightx="1" weighty="1" fill="both"> + <JScrollPane> + <SpecyListModel id="filteredSpecyListModel" + onContentsChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))'/> + <JList id="filteredSpecyList" model="{filteredSpecyListModel}" + onMouseClicked="getHandler().showFilteredSpeciesContextMenu(this, event)" + selectionModel="{new CoserListSelectionModel(filteredSpecyList.getSelectionModel(), filteredSpecyListModel)}" + enabled="{isYearsValidated() && isStrataValidated()}" + onValueChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))' /> + <ListSelectionModel id="filteredSpecyListSelectionModel" javaBean="filteredSpecyList.getSelectionModel()" /> + </JScrollPane> + </cell> + <cell anchor="north"> + <Table> + <row> + <cell> + <JButton icon="arrow_right.png" + toolTipText="coser.ui.selection.details.addToSelectedListTip" + onActionPerformed="getHandler().addSelectedFilteredSpecies(this)" + enabled="{getFilteredSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/> + </cell> + </row> + <row> + <cell> + <JButton icon="arrow_left.png" + toolTipText="coser.ui.selection.details.removeFromSelectedListTip" + onActionPerformed="getHandler().removeSelectedSpecies(this)" + enabled="{getSelectedSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/> + </cell> + </row> + </Table> + </cell> + <cell weightx="1" weighty="1" fill="both"> + <JScrollPane> + <SpecyListModel id="selectedSpecyListModel" + onContentsChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/> + <JList id="selectedSpecyList" model="{selectedSpecyListModel}" + onMouseClicked="getHandler().showSelectedSpeciesContextMenu(this, event)" + selectionModel="{new CoserListSelectionModel(selectedSpecyList.getSelectionModel(), selectedSpecyListModel)}" + enabled="{isYearsValidated() && isStrataValidated()}" + onValueChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/> + <ListSelectionModel id="selectedSpecyListSelectionModel" javaBean="selectedSpecyList.getSelectionModel()" /> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + </row> + </Table> + </AccordionPaneSubPanel> + </AccordionPane> + + <CardLayout id="detailDecisionPanelLayout" /> + <JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}"> + <JScrollPane id="zonesScrollPane" constraints='"ZONEMAP"'> + <JXImageView id="zonesMap" /> + </JScrollPane> + <JScrollPane constraints='"SPECIESDATA"'> + <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" /> + </JScrollPane> + <JScrollPane constraints='"SPECIESGRAPH"'> + <JPanel id="speciesGraphPanel" layout="{new GridBagLayout()}"/> + </JScrollPane> + </JPanel> + </JSplitPane> </cell> - <cell weightx="3" weighty="1" fill="both"> - <CardLayout id="detailDecisionPanelLayout" /> - <JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}"> - <JScrollPane id="zonesScrollPane" constraints='"ZONEMAP"'> - <JXImageView id="zonesMap" /> - </JScrollPane> - <JScrollPane constraints='"SPECIESDATA"'> - <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" /> - </JScrollPane> - <JScrollPane constraints='"SPECIESGRAPH"'> - <JPanel id="speciesGraphPanel" layout="{new GridBagLayout()}"/> - </JScrollPane> - </JPanel> - </cell> </row> </Table>
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org