Commit 5f32c594 authored by PECQUOT's avatar PECQUOT

[fix] Change measurements fullscreen button (Mantis #48592)

[enh] Change behavior of Programs, Campaigns and Rule Lists screens when synchro server is unavailable TODO to finish (Mantis #48600)
Signed-off-by: PECQUOT's avatarlp1ee9d <ludovic.pecquot@e-is.pro>
parent f706acee
......@@ -114,36 +114,26 @@ public class CampaignsUIHandler extends AbstractReefDbUIHandler<CampaignsUIModel
// affect campaigns
getModel().getCampaignsTableUIModel().setBeans((Collection<CampaignDTO>) evt.getNewValue());
if (getModel().getCampaignsTableUIModel().getRowCount() > 0) {
getModel().getCampaignsTableUIModel().getRows().forEach(campaign -> {
// set rows editable if
campaign.setEditable(
// save is allowed
getModel().isSaveEnabled()
// and user or recorder department is the same as the current user
&& (campaign.getManager().getId().equals(getContext().getDataContext().getRecorderPersonId())
|| campaign.getRecorderDepartment().getId().equals(getContext().getDataContext().getRecorderDepartmentId()))
);
});
}
getModel().getCampaignsTableUIModel().getRows().forEach(campaign -> {
// set rows editable if save is allowed
campaign.setEditable(getModel().isSaveEnabled());
// set row read-only if user or recorder department is not the same as the current user
campaign.setReadOnly(!(campaign.getManager().getId().equals(getContext().getDataContext().getRecorderPersonId())
|| campaign.getRecorderDepartment().getId().equals(getContext().getDataContext().getRecorderDepartmentId())));
});
});
// Listen valid state
// listenModelValid(getModel().getCampaignsTableUIModel());
getModel().getCampaignsTableUIModel().addPropertyChangeListener(AbstractReefDbBeanUIModel.PROPERTY_VALID, evt -> getValidator().doValidate());
listenModelModify(getModel().getCampaignsTableUIModel());
// Add listener on saveEnabled property to disable change (Mantis #48002)
getModel().addPropertyChangeListener(CampaignsUIModel.PROPERTY_SAVE_ENABLED, evt -> {
if (!getModel().isSaveEnabled()) {
getModel().getCampaignsTableUIModel().getRows().forEach(campaignsTableRowModel -> campaignsTableRowModel.setEditable(false));
getUI().getCampaignsTableUI().getCampaignsTable().invalidate();
getUI().getCampaignsTableUI().getCampaignsTable().repaint();
}
});
getModel().addPropertyChangeListener(CampaignsUIModel.PROPERTY_SAVE_ENABLED, evt -> getModel().getCampaignsTableUIModel().setSaveEnabled(getModel().isSaveEnabled()));
// Register validator
registerValidators(getValidator());
......
......@@ -33,7 +33,7 @@ public class CampaignsUIModel extends AbstractEmptyUIModel<CampaignsUIModel> {
private CampaignsTableUIModel campaignsTableUIModel;
private boolean saveEnabled = true;
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
......
......@@ -53,6 +53,11 @@ public class CampaignsTableRowModel extends AbstractReefDbRowUIModel<CampaignDTO
super(FROM_BEAN_BINDER, TO_BEAN_BINDER);
}
@Override
public boolean isEditable() {
return super.isEditable() && !isReadOnly();
}
/**
* {@inheritDoc}
*/
......
......@@ -29,6 +29,7 @@
actionIcon: add;
text: "reefdb.common.new";
toolTipText: "reefdb.campaign.new.tip";
enabled: {model.isSaveEnabled()};
}
#deleteCampaignButton {
......@@ -36,5 +37,5 @@
text: "reefdb.common.delete";
toolTipText: "reefdb.campaign.delete.tip";
_applicationAction: {DeleteCampaignAction.class};
enabled: {!model.getSelectedRows().isEmpty()};
enabled: {!model.getSelectedRows().isEmpty() && model.isSaveEnabled()};
}
\ No newline at end of file
......@@ -168,6 +168,12 @@ public class CampaignsTableUIHandler extends AbstractReefDbTableUIHandler<Campai
*/
private void initListeners() {
// Add listener on saveEnabled property to disable change (Mantis #47532)
getModel().addPropertyChangeListener(CampaignsTableUIModel.PROPERTY_SAVE_ENABLED, evt -> {
getModel().getRows().forEach(campaignsTableRowModel -> campaignsTableRowModel.setEditable(getModel().isSaveEnabled()));
getUI().getCampaignsTable().invalidate();
getUI().getCampaignsTable().repaint();
});
}
......
......@@ -31,4 +31,17 @@ import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbTableUIModel;
*/
public class CampaignsTableUIModel extends AbstractReefDbTableUIModel<CampaignDTO, CampaignsTableRowModel, CampaignsTableUIModel> {
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
public boolean isSaveEnabled() {
return saveEnabled;
}
public void setSaveEnabled(boolean saveEnabled) {
boolean oldValue = isSaveEnabled();
this.saveEnabled = saveEnabled;
firePropertyChange(PROPERTY_SAVE_ENABLED, oldValue, saveEnabled);
}
}
......@@ -184,14 +184,7 @@ public class ProgramsUIHandler extends AbstractReefDbUIHandler<ProgramsUIModel,
});
// Add listener on saveEnabled property to disable change (Mantis #48002)
getModel().addPropertyChangeListener(ProgramsUIModel.PROPERTY_SAVE_ENABLED, evt -> {
if (!getModel().isSaveEnabled()) {
getModel().getProgramsUIModel().getRows().forEach(programsTableRowModel -> programsTableRowModel.setEditable(false));
getUI().getProgramsTableUI().getProgramsTable().invalidate();
getUI().getProgramsTableUI().getProgramsTable().repaint();
reselectProgram();
}
});
getModel().addPropertyChangeListener(ProgramsUIModel.PROPERTY_SAVE_ENABLED, evt -> getModel().getProgramsUIModel().setSaveEnabled(getModel().isSaveEnabled()));
// Register validator
registerValidators(getValidator());
......
......@@ -54,7 +54,7 @@ public class ProgramsUIModel extends AbstractEmptyUIModel<ProgramsUIModel> {
*/
private PmfmsTableUIModel pmfmsUIModel;
private boolean saveEnabled = true;
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
/** {@inheritDoc} */
......
......@@ -116,7 +116,7 @@ public class ProgramsTableRowModel extends AbstractReefDbRowUIModel<ProgramDTO,
/** {@inheritDoc} */
@Override
public boolean isEditable() {
return super.isEditable() && isCurrentUserIsManager();
return super.isEditable() && !isReadOnly() && isCurrentUserIsManager();
}
/**
......
......@@ -29,6 +29,7 @@
actionIcon: add;
text: "reefdb.common.new";
toolTipText: "reefdb.program.program.new.tip";
enabled: {model.isSaveEnabled()};
}
#deleteProgramBouton {
......@@ -36,7 +37,7 @@
text: "reefdb.common.delete";
toolTipText: "reefdb.program.program.delete.tip";
_applicationAction: {DeleteProgramAction.class};
enabled: {!model.getSelectedRows().isEmpty()};
enabled: {!model.getSelectedRows().isEmpty() && model.isSaveEnabled()};
}
#editCombobox {
......
......@@ -28,7 +28,6 @@ import fr.ifremer.quadrige3.ui.swing.table.SwingTable;
import fr.ifremer.reefdb.dao.technical.Daos;
import fr.ifremer.reefdb.dto.ReefDbBeans;
import fr.ifremer.reefdb.dto.configuration.programStrategy.ProgramDTO;
import fr.ifremer.reefdb.dto.referential.PersonDTO;
import fr.ifremer.reefdb.ui.swing.content.manage.program.ProgramsUI;
import fr.ifremer.reefdb.ui.swing.content.manage.program.programs.departments.DepartmentsDialogUI;
import fr.ifremer.reefdb.ui.swing.content.manage.program.programs.users.UsersDialogUI;
......@@ -175,9 +174,22 @@ public class ProgramsTableUIHandler extends AbstractReefDbTableUIHandler<Program
getModel().setSingleSelectedRow(null);
getModel().setBeans(programs);
if (getModel().getRowCount() > 0 && !getProgramsUI().getModel().isSaveEnabled()) {
getModel().getRows().forEach(programsTableRowModel -> programsTableRowModel.setEditable(false));
}
boolean isAdmin = getContext().isAuthenticatedAsAdmin();
getModel().getRows().forEach(program -> {
// a program is editable if save is enabled
program.setEditable(getModel().isSaveEnabled());
// determinate if current user is manager
program.setCurrentUserIsManager(
isAdmin && (
program.isLocal() ||
program.getManagerPersons().stream().anyMatch(personDTO -> personDTO.getId().equals(getContext().getDataContext().getRecorderPersonId()))
)
);
});
autoSelectRow();
}
......@@ -302,32 +314,6 @@ public class ProgramsTableUIHandler extends AbstractReefDbTableUIHandler<Program
*/
private void initListeners() {
// listener on beans loaded
getModel().addPropertyChangeListener(ProgramsTableUIModel.PROPERTY_BEANS_LOADED, evt -> {
int userId = getContext().getDataContext().getRecorderPersonId();
boolean isAdmin = getContext().isAuthenticatedAsAdmin();
for (ProgramsTableRowModel row : getModel().getRows()) {
// determinate if current user is manager
boolean isManager = false;
if (isAdmin) {
if (row.isLocal()) {
isManager = true;
} else if (!row.isManagerPersonsEmpty()) {
for (PersonDTO manager : row.getManagerPersons()) {
if (manager.getId() == userId) {
isManager = true;
}
}
}
}
row.setCurrentUserIsManager(isManager);
}
recomputeRowsValidState();
});
// Listener sur le tableau
getModel().addPropertyChangeListener(ProgramsTableUIModel.PROPERTY_SINGLE_ROW_SELECTED, evt -> {
......@@ -374,6 +360,14 @@ public class ProgramsTableUIHandler extends AbstractReefDbTableUIHandler<Program
});
// Add listener on saveEnabled property to disable change (Mantis #47532)
getModel().addPropertyChangeListener(ProgramsTableUIModel.PROPERTY_SAVE_ENABLED, evt -> {
getModel().getRows().forEach(programsTableRowModel -> programsTableRowModel.setEditable(getModel().isSaveEnabled()));
getUI().getProgramsTable().invalidate();
getUI().getProgramsTable().repaint();
autoSelectRow();
});
}
/**
......
......@@ -12,12 +12,12 @@ package fr.ifremer.reefdb.ui.swing.content.manage.program.programs;
* it under the terms of the GNU Affero 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 Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
......@@ -31,4 +31,17 @@ import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbTableUIModel;
*/
public class ProgramsTableUIModel extends AbstractReefDbTableUIModel<ProgramDTO, ProgramsTableRowModel, ProgramsTableUIModel> {
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
public boolean isSaveEnabled() {
return saveEnabled;
}
public void setSaveEnabled(boolean saveEnabled) {
boolean oldValue = isSaveEnabled();
this.saveEnabled = saveEnabled;
firePropertyChange(PROPERTY_SAVE_ENABLED, oldValue, saveEnabled);
}
}
......@@ -24,18 +24,18 @@ package fr.ifremer.reefdb.ui.swing.content.manage.referential.menu;
*/
import fr.ifremer.reefdb.dto.BooleanDTO;
import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean;
import fr.ifremer.quadrige3.ui.core.dto.referential.StatusDTO;
import fr.ifremer.reefdb.dto.BooleanDTO;
import fr.ifremer.reefdb.dto.ReefDbBeans;
import fr.ifremer.reefdb.dto.configuration.filter.FilterCriteriaDTO;
import fr.ifremer.quadrige3.ui.core.dto.referential.StatusDTO;
import fr.ifremer.reefdb.service.StatusFilter;
import fr.ifremer.reefdb.ui.swing.util.AbstractReefDbBeanUIModel;
import org.apache.commons.collections4.CollectionUtils;
import org.nuiton.util.beans.Binder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* Created by Ludovic on 24/03/2016.
......@@ -96,7 +96,11 @@ public abstract class AbstractReferentialMenuUIModel<F extends FilterCriteriaDTO
@Override
public void setResults(List<? extends QuadrigeBean> results) {
// set the results in a new list to let pcs fire the property change event
delegateObject.setResults(CollectionUtils.isNotEmpty(results) ? new ArrayList<>(results) : null);
// but it's not enough, if old and new collections are really equals, it don't fire
boolean mustFire = Objects.equals(results, getResults());
delegateObject.setResults(results != null ? new ArrayList<>(results) : null);
if (mustFire)
firePropertyChange(PROPERTY_RESULTS, null, results);
}
/** {@inheritDoc} */
......
......@@ -86,7 +86,7 @@ public class RulesUIHandler extends AbstractReefDbUIHandler<RulesUIModel, RulesU
getContext().clearObservationPrelevementsIds();
// set model editable
getModel().setScreenEditable(getContext().isAuthenticatedAsAdmin());
getModel().setScreenEditable(getContext().isAuthenticatedAsAdmin() && getModel().isSaveEnabled());
// Disable controls regarding editable property
disableControls();
......@@ -173,15 +173,8 @@ public class RulesUIHandler extends AbstractReefDbUIHandler<RulesUIModel, RulesU
// Add listener on saveEnabled property to disable change (Mantis #48002)
getModel().addPropertyChangeListener(RulesUIModel.PROPERTY_SAVE_ENABLED, evt -> {
if (!getModel().isSaveEnabled()) {
getModel().getRuleListUIModel().getRows().forEach(ruleListRowModel -> ruleListRowModel.setEditable(false));
getUI().getRuleListUI().getRulesTableUI().invalidate();
getUI().getRuleListUI().getRulesTableUI().repaint();
getUI().getRuleListUI().getNewRuleListButton().setEnabled(false);
if (getModel().getRuleListUIModel().getSingleSelectedRow() != null) {
getModel().getRuleListUIModel().setSingleSelectedRow(getModel().getRuleListUIModel().getSingleSelectedRow());
}
}
getModel().getRuleListUIModel().setSaveEnabled(getModel().isSaveEnabled());
getModel().setScreenEditable(getContext().isAuthenticatedAsAdmin() && getModel().isSaveEnabled());
});
}
......
......@@ -68,7 +68,7 @@ public class RulesUIModel extends AbstractEmptyUIModel<RulesUIModel> {
private String ruleMessage;
private String ruleDescription;
private boolean saveEnabled = true;
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
/** {@inheritDoc} */
......
......@@ -29,14 +29,14 @@
actionIcon: add;
text: "reefdb.common.new";
toolTipText: "reefdb.common.new";
enabled: {model.getParentModel().isScreenEditable()};
enabled: {model.getParentModel().isScreenEditable() && model.isSaveEnabled()};
}
#duplicateRuleListButton {
actionIcon: copy;
text: "reefdb.action.duplicate.label";
toolTipText: "reefdb.action.duplicate.rule.tip";
enabled: {model.getParentModel().isEditable() && model.getSelectedRows().size() == 1};
enabled: {model.getParentModel().isEditable() && model.getSelectedRows().size() == 1 && model.isSaveEnabled()};
_applicationAction: {DuplicateRuleListAction.class};
}
......@@ -44,7 +44,7 @@
actionIcon: delete;
text: "reefdb.common.delete";
toolTipText: "reefdb.common.delete";
enabled: {model.getParentModel().isEditable() && !model.getSelectedRows().isEmpty()};
enabled: {model.getParentModel().isEditable() && !model.getSelectedRows().isEmpty() && model.isSaveEnabled()};
_applicationAction: {DeleteRuleListAction.class};
}
......@@ -52,5 +52,5 @@
actionIcon: edit;
text: "reefdb.rule.ruleList.editCode";
toolTipText: "reefdb.rule.ruleList.editCode.tip";
enabled: {model.getSingleSelectedRow() != null && model.getSingleSelectedRow().isNewCode()};
enabled: {model.getSingleSelectedRow() != null && model.getSingleSelectedRow().isNewCode() && model.isSaveEnabled()};
}
\ No newline at end of file
......@@ -91,9 +91,7 @@ public class RuleListUIHandler extends
// Recuperation de la liste des programmes
getModel().setBeans(ruleLists);
if (getModel().getRowCount() > 0 && !getRulesUI().getModel().isSaveEnabled()) {
getModel().getRows().forEach(ruleListRowModel -> ruleListRowModel.setEditable(false));
}
getModel().getRows().forEach(ruleListRowModel -> ruleListRowModel.setEditable(getModel().isSaveEnabled()));
// auto select unique row
if (getModel().getRowCount() == 1) {
......@@ -265,6 +263,16 @@ public class RuleListUIHandler extends
});
// Add listener on saveEnabled property to disable change (Mantis #47532)
getModel().addPropertyChangeListener(RuleListUIModel.PROPERTY_SAVE_ENABLED, evt -> {
getModel().getRows().forEach(ruleListRowModel -> ruleListRowModel.setEditable(getModel().isSaveEnabled()));
getUI().getRulesTableUI().invalidate();
getUI().getRulesTableUI().repaint();
if (getModel().getSingleSelectedRow() != null) {
getModel().setSingleSelectedRow(getModel().getSingleSelectedRow());
}
});
}
/**
......
......@@ -34,6 +34,9 @@ public class RuleListUIModel extends AbstractReefDbTableUIModel<RuleListDTO, Rul
private RulesUIModel parentModel;
private boolean saveEnabled;
public static final String PROPERTY_SAVE_ENABLED = "saveEnabled";
/**
* Constructor.
*/
......@@ -58,4 +61,15 @@ public class RuleListUIModel extends AbstractReefDbTableUIModel<RuleListDTO, Rul
public void setParentModel(RulesUIModel parentModel) {
this.parentModel = parentModel;
}
public boolean isSaveEnabled() {
return saveEnabled;
}
public void setSaveEnabled(boolean saveEnabled) {
boolean oldValue = isSaveEnabled();
this.saveEnabled = saveEnabled;
firePropertyChange(PROPERTY_SAVE_ENABLED, oldValue, saveEnabled);
}
}
......@@ -36,26 +36,22 @@
java.awt.BorderLayout
fr.ifremer.quadrige3.ui.swing.table.SwingTable
fr.ifremer.quadrige3.ui.swing.component.ToggleButton
static org.nuiton.i18n.I18n.*
</import>
<!--getContextValue est une méthode interne JAXX-->
<OperationMeasurementsGroupedTableUIModel id='model' initializer='getContextValue(OperationMeasurementsGroupedTableUIModel.class)'/>
<ReefDbHelpBroker id='broker' constructorParams='"reefdb.home.help"'/>
<WaitBlockingLayerUI id='tableBlockLayer'/>
<script><![CDATA[
//Le parent est très utile pour intervenir sur les frères
public OperationMeasurementsGroupedTableUI(ApplicationUI parentUI) {
ApplicationUIUtil.setParentUI(this, parentUI);
}
]]></script>
<JPanel layout="{new BorderLayout()}">
<JPanel constraints="BorderLayout.LINE_START" layout="{new FlowLayout(0,0,0)}">
<JToggleButton id="fullScreenToggleButton" onActionPerformed="handler.toggleFullScreen(tableauBasPanel, fullScreenToggleButton)"/>
</JPanel>
<JScrollPane id="tableauBasScrollPane" decorator='boxed'>
<SwingTable id="operationGroupedMeasurementTable"/>
</JScrollPane>
......@@ -68,6 +64,9 @@
<JButton id='initDataGridButton' alignmentX='{Component.CENTER_ALIGNMENT}' onActionPerformed="handler.initializeDataGrid()"/>
<JButton id='deleteButton' alignmentX='{Component.CENTER_ALIGNMENT}' onActionPerformed="handler.removeIndividualMeasurements()"/>
</JPanel>
<JPanel constraints="BorderLayout.LINE_END">
<ToggleButton id="fullScreenToggleButton" onActionPerformed="handler.toggleFullScreen(tableauBasPanel, fullScreenToggleButton)"/>
</JPanel>
</JPanel>
</JPanel>
\ No newline at end of file
......@@ -26,9 +26,12 @@
}
#fullScreenToggleButton {
text: "reefdb.table.view.fullScreen";
toggledText: {t("reefdb.table.view.unFullScreen")};
actionIcon: fullScreen;
toggledIcon: {SwingUtil.createActionIcon("unFullScreen")};
toolTipText: "reefdb.table.view.fullScreen.tip";
preferredSize: {new java.awt.Dimension(26,26)};
toggledToolTipText: {t("reefdb.table.view.unFullScreen.tip")};
}
#addButton {
......
......@@ -43,7 +43,11 @@ import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbTableUIModel;
import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.table.TableColumnExt;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
import javax.swing.RowFilter;
import javax.swing.border.Border;
import java.math.BigDecimal;
import java.util.*;
import java.util.function.Predicate;
......@@ -56,6 +60,8 @@ public class OperationMeasurementsGroupedTableUIHandler
// editor for sampling operations column
private ExtendedComboBoxCellEditor<SamplingOperationDTO> samplingOperationCellEditor;
// initial border of full screen toggle button
private Border initialToggleButtonBorder;
/**
* <p>Constructor for OperationMeasurementsGroupedTableUIHandler.</p>
......@@ -101,6 +107,23 @@ public class OperationMeasurementsGroupedTableUIHandler
getUI().getDeleteButton().setEnabled(false);
getUI().getDuplicateButton().setEnabled(false);
SwingUtil.setLayerUI(ui.getTableauBasScrollPane(), ui.getTableBlockLayer());
// Keep initial border
initialToggleButtonBorder = getUI().getFullScreenToggleButton().getBorder();
}
@Override
public void toggleFullScreen(JPanel panel, JToggleButton toggleButton) {
super.toggleFullScreen(panel, toggleButton);
// Set highlight border when selected (Mantis #48592)
toggleButton.setBorder(
toggleButton.isSelected()
? BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(2, 2, 2, 2, getConfig().getColorHighlightButtonBorder()), initialToggleButtonBorder)
: initialToggleButtonBorder
);
}
/**
......
......@@ -36,26 +36,22 @@
java.awt.BorderLayout
fr.ifremer.quadrige3.ui.swing.table.SwingTable
fr.ifremer.quadrige3.ui.swing.component.ToggleButton
static org.nuiton.i18n.I18n.*
</import>
<!--getContextValue est une méthode interne JAXX-->
<SurveyMeasurementsGroupedTableUIModel id='model' initializer='getContextValue(SurveyMeasurementsGroupedTableUIModel.class)'/>
<ReefDbHelpBroker id='broker' constructorParams='"reefdb.home.help"'/>
<WaitBlockingLayerUI id='tableBlockLayer'/>
<script><![CDATA[
//Le parent est très utile pour intervenir sur les frères
public SurveyMeasurementsGroupedTableUI(ApplicationUI parentUI) {
ApplicationUIUtil.setParentUI(this, parentUI);
}
]]></script>
<JPanel layout="{new BorderLayout()}">
<JPanel constraints="BorderLayout.LINE_START" layout="{new FlowLayout(0,0,0)}">
<JToggleButton id="fullScreenToggleButton" onActionPerformed="handler.toggleFullScreen(tableauBasPanel, fullScreenToggleButton)"/>
</JPanel>
<JScrollPane id="tableauBasScrollPane" decorator='boxed' border="{null}">
<SwingTable id="surveyGroupedMeasurementTable"/>
</JScrollPane>
......@@ -67,6 +63,9 @@
<JButton id='tableauBasDupliquerBouton' alignmentX='{Component.CENTER_ALIGNMENT}'/>
<JButton id='tableauBasSupprimerBouton' alignmentX='{Component.CENTER_ALIGNMENT}' onActionPerformed="handler.removeIndividualMeasurements()"/>
</JPanel>
<JPanel constraints="BorderLayout.LINE_END">
<ToggleButton id="fullScreenToggleButton" onActionPerformed="handler.toggleFullScreen(tableauBasPanel, fullScreenToggleButton)"/>
</JPanel>
</JPanel>
</JPanel>
\ No newline at end of file
......@@ -26,9 +26,12 @@
}
#fullScreenToggleButton {
text: "reefdb.table.view.fullScreen";
toggledText: {t("reefdb.table.view.unFullScreen")};
actionIcon: fullScreen;
toggledIcon: {SwingUtil.createActionIcon("unFullScreen")};
toolTipText: "reefdb.table.view.fullScreen.tip";
preferredSize: {new java.awt.Dimension(26,26)};
toggledToolTipText: {t("reefdb.table.view.unFullScreen.tip")};
}
#tableauBasNouveauBouton {
......
......@@ -33,7 +33,11 @@ import fr.ifremer.reefdb.ui.swing.content.observation.shared.AbstractMeasurement
import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.table.TableColumnExt;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
import javax.swing.RowFilter;
import javax.swing.border.Border;
import java.util.List;
/**
......@@ -42,6 +46,9 @@ import java.util.List;
public class SurveyMeasurementsGroupedTableUIHandler