Author: [log in to unmask]
Date: Thu Dec 11 12:01:35 2014
New Revision: 1698
Log:
Force plot window refresh when monitoring loads. Check for some layout config before using.
Modified:
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java
Modified: java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java
=============================================================================
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java (original)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java Thu Dec 11 12:01:35 2014
@@ -60,6 +60,7 @@
import javax.imageio.ImageIO;
import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@@ -69,6 +70,7 @@
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
@@ -98,7 +100,6 @@
import org.jlab.coda.jevio.EvioException;
import org.jlab.coda.jevio.EvioReader;
import org.lcsim.conditions.ConditionsManager;
-import org.lcsim.job.JobControlManager;
import org.lcsim.lcio.LCIOReader;
import org.lcsim.util.Driver;
import org.lcsim.util.aida.AIDA;
@@ -982,7 +983,10 @@
setupSystemStatusMonitor();
// Start thread which will trigger a disconnect if the event processing finishes.
- startSessionWatchdogThread();
+ startSessionWatchdogThread();
+
+ // Apparently, the visible plots won't draw without this! (Unless the user clicks directly on the tab.)
+ plotWindow.getPlotPane().requestFocusInWindow();
log(Level.INFO, "Successfully started the monitoring session.");
@@ -1596,13 +1600,15 @@
}
private void updateLayoutConfiguration() {
- // Should the GUI config be saved?
- if (configurationModel.getSaveLayout()) {
- // Push the current GUI settings into the configuration.
- saveLayoutConfiguration();
- } else {
- // Remove any GUI settings from the configuration.
+ if (configurationModel.hasPropertyValue(SAVE_LAYOUT_PROPERTY)) {
+ // Should the GUI config be saved?
+ if (configurationModel.getSaveLayout()) {
+ // Push the current GUI settings into the configuration.
+ saveLayoutConfiguration();
+ } else {
+ // Remove any GUI settings from the configuration.
clearLayoutConfiguration();
+ }
}
}
|