Browse Source

Fixed various dialogs so that they centre on their window parent.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@60 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 20 years ago
parent
commit
e177915ca5
  1. 2
      prism/src/chart/GraphListEditor.java
  2. 1
      prism/src/chart/MultiGraphOptions.java
  3. 1
      prism/src/settings/FontChooser.java
  4. 1
      prism/src/userinterface/GUIConstantsPicker.java
  5. 1
      prism/src/userinterface/GUIOptionsDialog.java
  6. 1
      prism/src/userinterface/GUISimulationPicker.java
  7. 1
      prism/src/userinterface/model/GUIMultiModel.java
  8. 2
      prism/src/userinterface/model/GUITransientTime.java
  9. 1
      prism/src/userinterface/properties/GUIExperimentPicker.java
  10. 1
      prism/src/userinterface/properties/GUIGraphPicker.java
  11. 1
      prism/src/userinterface/properties/GUIPropertyEditor.java
  12. 1
      prism/src/userinterface/properties/GUIResultsTable.java
  13. 3
      prism/src/userinterface/simulator/GUIInitialStatePicker.java
  14. 1
      prism/src/userinterface/simulator/networking/GUINetworkEditor.java
  15. 1
      prism/src/userinterface/simulator/networking/GUISimulatorDistributionDialog.java
  16. 1
      prism/src/userinterface/util/FontChooser.java

2
prism/src/chart/GraphListEditor.java

@ -476,6 +476,7 @@ public class GraphListEditor extends JPanel
d.getContentPane().add(closePanel, BorderLayout.SOUTH);
d.pack();
d.setLocationRelativeTo(parent); // centre
d.show();
}
@ -543,6 +544,7 @@ public class GraphListEditor extends JPanel
sd.pack();
sd.setLocationRelativeTo(parent); // centre
sd.show();
}

1
prism/src/chart/MultiGraphOptions.java

@ -81,6 +81,7 @@ public class MultiGraphOptions extends JDialog
pack();
setLocationRelativeTo(getParent()); // centre
//show();
setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
}

1
prism/src/settings/FontChooser.java

@ -54,6 +54,7 @@ public class FontChooser extends javax.swing.JDialog implements ListSelectionLis
doListModels();
doListeners();
shouldReturn = true;
setLocationRelativeTo(getParent()); // centre
}
public FontChooser(Dialog parent)

1
prism/src/userinterface/GUIConstantsPicker.java

@ -88,6 +88,7 @@ public class GUIConstantsPicker extends javax.swing.JDialog
setResizable(false);
pack();
setLocationRelativeTo(getParent()); // centre
}
/** This method is called from within the constructor to

1
prism/src/userinterface/GUIOptionsDialog.java

@ -54,6 +54,7 @@ public class GUIOptionsDialog extends javax.swing.JDialog implements EntityResol
settings = parent.getPrism().getSettings();
panels = new ArrayList();
initComponents();
setLocationRelativeTo(getParent()); // centre
//setResizable(false);

1
prism/src/userinterface/GUISimulationPicker.java

@ -142,6 +142,7 @@ public class GUISimulationPicker extends javax.swing.JDialog implements KeyListe
setResizable(false);
pack();
setLocationRelativeTo(getParent()); // centre
}
/** This method is called from within the constructor to

1
prism/src/userinterface/model/GUIMultiModel.java

@ -206,6 +206,7 @@ public class GUIMultiModel extends GUIPlugin implements PrismSettingsListener
diag.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
diag.pack();
diag.setLocationRelativeTo(getGUI()); // centre
diag.show();
}

2
prism/src/userinterface/model/GUITransientTime.java

@ -60,7 +60,7 @@ public class GUITransientTime extends javax.swing.JDialog
public GUITransientTime(java.awt.Frame parent) {
super(parent, "Define time", true);
initComponents();
setLocation(parent.getLocation().x+(parent.getWidth()-getWidth())/2, parent.getLocation().y+(parent.getHeight()-getHeight())/2);
setLocationRelativeTo(getParent()); // centre
if (!first) timeField.setText(""+time);
}

1
prism/src/userinterface/properties/GUIExperimentPicker.java

@ -117,6 +117,7 @@ public class GUIExperimentPicker extends javax.swing.JDialog
setResizable(false);
pack();
setLocationRelativeTo(getParent()); // centre
}
/** This method is called from within the constructor to

1
prism/src/userinterface/properties/GUIGraphPicker.java

@ -65,6 +65,7 @@ public class GUIGraphPicker extends javax.swing.JDialog
initComponents();
setResizable(false);
init();
setLocationRelativeTo(getParent()); // centre
}
public void startGraphExperiment(GUIExperimentTable et, int experimentIndex)

1
prism/src/userinterface/properties/GUIPropertyEditor.java

@ -84,6 +84,7 @@ public class GUIPropertyEditor extends javax.swing.JDialog implements ActionList
this.parsedModel = parsedModel;
this.propertyInvalidStrategy = strategy;
initComponents();
setLocationRelativeTo(getParent()); // centre
//propertyList.setListData(props);
if(prop == null)
{

1
prism/src/userinterface/properties/GUIResultsTable.java

@ -59,6 +59,7 @@ public class GUIResultsTable extends javax.swing.JDialog
initComponents();
setResizable(true);
pack();
setLocationRelativeTo(getParent()); // centre
}
/** This method is called from within the constructor to initialize the form. */

3
prism/src/userinterface/simulator/GUIInitialStatePicker.java

@ -76,7 +76,7 @@ public class GUIInitialStatePicker extends javax.swing.JDialog implements KeyLis
/** Creates new form GUIConstantsPicker */
public GUIInitialStatePicker(GUIPrism parent, Values defaultInitial, ModulesFile mf)
{
super(parent, "Simulation Parameters", true);
super(parent, "Initial State for Simulation", true);
this.gui = parent;
this.mf = mf;
@ -105,6 +105,7 @@ public class GUIInitialStatePicker extends javax.swing.JDialog implements KeyLis
setResizable(false);
pack();
setLocationRelativeTo(getParent()); // centre
}
/** This method is called from within the constructor to

1
prism/src/userinterface/simulator/networking/GUINetworkEditor.java

@ -72,6 +72,7 @@ public class GUINetworkEditor extends JDialog implements TreeSelectionListener,
setActiveFile(null);
initComponents();
setLocationRelativeTo(getParent()); // centre
initPopups();
theMenu.add(fileMenu);
theMenu.add(editMenu);

1
prism/src/userinterface/simulator/networking/GUISimulatorDistributionDialog.java

@ -81,6 +81,7 @@ public class GUISimulatorDistributionDialog extends javax.swing.JDialog implemen
this.simulator = simulator;
initComponents();
setLocationRelativeTo(getParent()); // centre
SummaryEditorKit kit = new SummaryEditorKit();

1
prism/src/userinterface/util/FontChooser.java

@ -64,6 +64,7 @@ public class FontChooser extends javax.swing.JDialog implements ListSelectionLis
doListModels();
doListeners();
shouldReturn = true;
setLocationRelativeTo(getParent()); // centre
}
public static FontColorPair getFont(Dialog parent, Font startFont, Color startColor, Font defaultFont, Color defaultColor)

Loading…
Cancel
Save