This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 56f21e525a7060af979b0e3b858dc5a533b1e270 Author: jcouteau <couteau@codelutin.com> Date: Fri Jul 6 16:13:30 2018 +0200 fixes #10016 --- .../ui/swing/content/demande/DemandeUIHandler.java | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java index f19da07d..6968f405 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java @@ -64,11 +64,14 @@ import org.nuiton.jaxx.application.swing.util.CloseableUI; import org.nuiton.util.beans.BeanMonitor; import javax.swing.*; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.TableCellEditor; import java.awt.*; import java.awt.event.ActionEvent; +import java.awt.event.ComponentEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -226,7 +229,7 @@ public class DemandeUIHandler extends AbstractFaxToMailUIHandler<DemandeUIModel, initBeanFilterableComboBox(ui.getPriorityComboBox(), getContext().getPriorityCache(), model.getPriority()); initBeanFilterableComboBox(ui.getStatusComboBox(), Arrays.asList(DemandStatus.values()), model.getDemandStatus()); - + // utilisation des etats d'attente défini pour le dossier (si défini) List<DemandType> demandTypes = new ArrayList<DemandType>(); Collection<DemandType> folderDemandTypes = getDemandTypeForFolder(folder); @@ -247,9 +250,28 @@ public class DemandeUIHandler extends AbstractFaxToMailUIHandler<DemandeUIModel, } initBeanFilterableComboBox(ui.getWaitingStateComboBox(), waitingStates, model.getWaitingState()); - final JPanel editorPanel = ui.getMailBodyPanel(); - FaxToMailUIUtil.setEmailContentInTextPane(this, model, editorPanel, getConfig()); - FaxToMailUIUtil.initScrollPaneBars(getUI().getMailBodyScrollPane()); + final JPanel mailBodyPanel = ui.getMailBodyPanel(); + FaxToMailUIUtil.setEmailContentInTextPane(this, model, mailBodyPanel, getConfig()); + final JScrollPane mailBodyScrollPane = getUI().getMailBodyScrollPane(); + FaxToMailUIUtil.initScrollPaneBars(mailBodyScrollPane); + + //resize panel, after set visible, cf. #10016 + mailBodyPanel.addAncestorListener ( new AncestorListener() + { + public void ancestorAdded ( AncestorEvent event ) + { + mailBodyPanel.setMaximumSize(new Dimension(mailBodyScrollPane.getWidth(), Integer.MAX_VALUE)); + mailBodyPanel.setPreferredSize(new Dimension(mailBodyScrollPane.getWidth(), mailBodyPanel.getHeight())); + } + + public void ancestorRemoved ( AncestorEvent event ){ + //Do nothing + } + + public void ancestorMoved ( AncestorEvent event ){ + //Do nothing + } + } ); // init table final JXTable table = ui.getRangeTable(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.