* [ 1686486 ] ProcessDialog truncates display of log

This commit is contained in:
Heng Sin Low 2007-03-26 04:48:14 +00:00
parent f1a78ab8c9
commit 52bbbc307f
2 changed files with 34 additions and 5 deletions

View File

@ -114,7 +114,20 @@ public class ProcessDialog extends CFrame
return d; return d;
} }
}; };
private JScrollPane messagePane = new JScrollPane(message); private JScrollPane messagePane = new JScrollPane(message)
{
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
Dimension m = getMaximumSize();
if ( d.height > m.height || d.width > m.width ) {
Dimension d1 = new Dimension();
d1.height = Math.min(d.height, m.height);
d1.width = Math.min(d.width, m.width);
return d1;
} else
return d;
}
};
private CButton bPrint = ConfirmPanel.createPrintButton(true); private CButton bPrint = ConfirmPanel.createPrintButton(true);
private CPanel centerPanel = null; private CPanel centerPanel = null;
@ -147,7 +160,7 @@ public class ProcessDialog extends CFrame
southPanel.add(bOK, null); southPanel.add(bOK, null);
dialog.add(messagePane, BorderLayout.NORTH); dialog.add(messagePane, BorderLayout.NORTH);
messagePane.setBorder(null); messagePane.setBorder(null);
message.setMaximumSize(new Dimension(600, 300)); messagePane.setMaximumSize(new Dimension(600, 300));
centerPanel = new CPanel(); centerPanel = new CPanel();
centerPanel.setBorder(null); centerPanel.setBorder(null);
centerPanel.setLayout(new BorderLayout()); centerPanel.setLayout(new BorderLayout());
@ -319,7 +332,10 @@ public class ProcessDialog extends CFrame
//no longer needed, hide to give more space to display log //no longer needed, hide to give more space to display log
parameterPanel.setVisible(false); parameterPanel.setVisible(false);
this.pack(); messagePane.setMaximumSize(null);
this.validate();
AEnv.showCenterScreen(this);
// //
afterProcessTask(); afterProcessTask();
// Close automatically // Close automatically

View File

@ -124,7 +124,20 @@ public class ProcessModalDialog extends CDialog
return d; return d;
} }
}; };
private JScrollPane messagePane = new JScrollPane(message); private JScrollPane messagePane = new JScrollPane(message)
{
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
Dimension m = getMaximumSize();
if ( d.height > m.height || d.width > m.width ) {
Dimension d1 = new Dimension();
d1.height = Math.min(d.height, m.height);
d1.width = Math.min(d.width, m.width);
return d1;
} else
return d;
}
};
private CPanel centerPanel = null; private CPanel centerPanel = null;
private ProcessParameterPanel parameterPanel = null; private ProcessParameterPanel parameterPanel = null;
@ -150,7 +163,7 @@ public class ProcessModalDialog extends CDialog
dialog.add(southPanel, BorderLayout.SOUTH); dialog.add(southPanel, BorderLayout.SOUTH);
dialog.add(messagePane, BorderLayout.NORTH); dialog.add(messagePane, BorderLayout.NORTH);
messagePane.setBorder(null); messagePane.setBorder(null);
message.setMaximumSize(new Dimension(600, 300)); messagePane.setMaximumSize(new Dimension(600, 300));
centerPanel = new CPanel(); centerPanel = new CPanel();
centerPanel.setBorder(null); centerPanel.setBorder(null);
centerPanel.setLayout(new BorderLayout()); centerPanel.setLayout(new BorderLayout());