JSplitPane settingsPanel = new JSplitPane();
JSplitPane jobPanel = new JSplitPane();
+ boolean split=true;
JTabbedPane tabpanels=new JTabbedPane();
JPanel jobOptions = new JPanel();
// should recover defaults from user prefs.
//settingsPanel.setDividerLocation(0.4);
//jobPanel.setDividerLocation(0.5);
- tabpanels.setSelectedComponent(jobOptionsPane);
frame.validate();
+ if (split) {
+ javax.swing.SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ settingsPanel.setDividerLocation(0.5);
+ jobPanel.setDividerLocation(setDescr.getLineCount()>3 ? 0.35 : 0.16 );
+ }
+ });
+ } else {
+ tabpanels.setSelectedComponent(jobOptionsPane);
+ }
frame.setVisible(true);
if (response > 0)
private void jbInit()
{
- updatepref = JvSwingUtils.makeButton("Update", "Update the stored user preference",
+ updatepref = JvSwingUtils.makeButton("Update", "Update this existing user parameter set.",
new ActionListener()
{
update_actionPerformed(e);
}
});
- deletepref = JvSwingUtils.makeButton("Delete", "Delete the user preference",
+ deletepref = JvSwingUtils.makeButton("Delete", "Delete the currently selected user parameter set.",
new ActionListener()
{
delete_actionPerformed(e);
}
});
- createpref = JvSwingUtils.makeButton("Create", "Create a new preference",
+ createpref = JvSwingUtils.makeButton("Create", "Create a new parameter set with the current settings.",
new ActionListener()
{
}
});
revertpref = JvSwingUtils.makeButton("Revert",
- "Undo all changes to the current set", new ActionListener()
+ "Undo all changes to the current parameter set", new ActionListener()
{
public void actionPerformed(ActionEvent e)
revert_actionPerformed(e);
}
});
- startjob = JvSwingUtils.makeButton("Start", "Start Job",new ActionListener()
+ startjob = JvSwingUtils.makeButton("Start Job", "Start Job with current settings.",new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
startjob_actionPerformed(e);
}
});
- canceljob = JvSwingUtils.makeButton("Cancel", "Cancel Job", new ActionListener()
+ canceljob = JvSwingUtils.makeButton("Cancel Job", "Close this dialog and cancel job.", new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
setDescr.setBackground(getBackground());
setDescr.setEditable(true);
setDescr.getDocument().addDocumentListener(this);
+ setDescr.setToolTipText("Click to edit the notes for this parameter set.");
JScrollPane setDescrView = new JScrollPane();
// setDescrView.setPreferredSize(new Dimension(350, 200));
setDescrView.getViewport().setView(setDescr);
JPanel setNameInfo = new JPanel(new FlowLayout(FlowLayout.LEFT));
SetNamePanel.setLayout(new GridLayout(2, 1));
SetNamePanel.setMinimumSize(new Dimension(300, 40));
- JLabel setNameLabel = new JLabel("Parameter set: ");
+ JLabel setNameLabel = new JLabel("Current parameter set name :");
setNameLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
// setNameLabel.setHorizontalAlignment(FlowLayout.LEFT);
setNameInfo.add(setNameLabel);
jobOptionsPanel.setBorder(new TitledBorder("Options"));
jobOptionsPane.getViewport().setView(jobOptions);
jobOptionsPanel.add(jobOptionsPane, BorderLayout.CENTER);
- //settingsPanel.setLeftComponent(jobOptionsPanel);
- //settingsPanel.setRightComponent(jobParameters);
- //settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
-
+
setLayout(new BorderLayout());
jobPanel.setLeftComponent(setDetails);
+ if (split) {
+ settingsPanel.setLeftComponent(jobOptionsPanel);
+ settingsPanel.setRightComponent(jobParameters);
+ settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
+ jobPanel.setRightComponent(settingsPanel);
+ } else {
jobPanel.setRightComponent(tabpanels);
- jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
- add(SetNamePanel, BorderLayout.NORTH);
- //add(jobPanel, BorderLayout.CENTER);
- //setDescrView.setName("Description");
- //tabpanels.add(setDescrView);
jobOptionsPane.setName("Options");
tabpanels.add(jobOptionsPane);
paramPane.setName("Parameters");
tabpanels.add(paramPane);
+ }
+ jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
+ add(SetNamePanel, BorderLayout.NORTH);
add(jobPanel, BorderLayout.CENTER);
JPanel dialogpanel = new JPanel();
dialogpanel.add(startjob);