Commit in hps-java/src/main/java/org/lcsim/hps/monitoring on MAIN | |||
MonitoringApplication.java | +13 | -10 | 1.22 -> 1.23 |
remove public access as it isn't needed; app is only invoked via call to main
diff -u -r1.22 -r1.23 --- MonitoringApplication.java 19 Apr 2012 23:01:28 -0000 1.22 +++ MonitoringApplication.java 19 Apr 2012 23:18:26 -0000 1.23 @@ -12,10 +12,10 @@
import static org.lcsim.hps.monitoring.MonitoringCommands.saveConnectionCmd; import static org.lcsim.hps.monitoring.MonitoringCommands.savePlotsCmd; import static org.lcsim.hps.monitoring.MonitoringCommands.screenshotCmd;
+import static org.lcsim.hps.monitoring.MonitoringCommands.setMaxEventsCmd;
import static org.lcsim.hps.monitoring.MonitoringCommands.setSteeringFileCmd; import static org.lcsim.hps.monitoring.MonitoringCommands.terminalCmd; import static org.lcsim.hps.monitoring.MonitoringCommands.udpateTimeCmd;
-import static org.lcsim.hps.monitoring.MonitoringCommands.setMaxEventsCmd;
import java.awt.AWTException; import java.awt.Dimension;
@@ -48,7 +48,6 @@
import javax.swing.SwingUtilities; import javax.swing.Timer;
-import org.jdom.JDOMException;
import org.jlab.coda.et.EtAttachment; import org.jlab.coda.et.EtEvent; import org.jlab.coda.et.EtSystem;
@@ -67,7 +66,8 @@
/** * Implementation of a full monitoring application for HPS Test Run, which can
- * run LCSim steering files on data converted from the ET ring.
+ * run LCSim steering files on data converted from the ET ring. This class is
+ * only currently accessible to users by calling its main() method.
* * @author Jeremy McCormick <[log in to unmask]> */
@@ -126,11 +126,10 @@
// Maximum number of events to process before disconnect; for unlimited -1 is used. private int maxEvents = -1;
- public static final class JobParameters {
+ private static final class JobParameters {
private String detectorName; private String steeringResource; private String eventBuilderClassName;
- JobParameters() {}
JobParameters(String[] params) { if (params.length != 3) { new IllegalArgumentException("Parameter array is wrong length.");
@@ -212,7 +211,7 @@
} }
- public MonitoringApplication() {
+ MonitoringApplication() {
// Create ActionEvent listener. actionListener = new MonitoringApplicationActionListener(this);
@@ -257,6 +256,7 @@
menuBar = new JMenuBar(); JMenu connectionMenu = new JMenu("Connection");
+ connectionMenu.setMnemonic(KeyEvent.VK_C);
menuBar.add(connectionMenu); connectItem = new JMenuItem("Connect");
@@ -297,6 +297,7 @@
connectionMenu.add(exitItem); JMenu eventMenu = new JMenu("Event");
+ eventMenu.setMnemonic(KeyEvent.VK_E);
menuBar.add(eventMenu); resetEventsItem = new JMenuItem("Reset Event Monitor");
@@ -318,9 +319,11 @@
eventMenu.add(maxEventsItem); JMenu jobMenu = new JMenu("Job");
+ jobMenu.setMnemonic(KeyEvent.VK_J);
menuBar.add(jobMenu); steeringItem = new JMenuItem("Set Steering File...");
+ steeringItem.setMnemonic(KeyEvent.VK_S);
steeringItem.setActionCommand(setSteeringFileCmd); steeringItem.addActionListener(actionListener); jobMenu.add(steeringItem);
@@ -397,7 +400,6 @@
JFrame frame = new JFrame(getApplicationTitle()); frame.setContentPane(mainPanel); frame.setJMenuBar(menuBar);
- //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setResizable(false); frame.pack();
@@ -876,7 +878,7 @@
return evioEvent; }
- public static final MonitoringApplication createMonitoringApplication() {
+ private static final MonitoringApplication createMonitoringApplication() {
final MonitoringApplication app = new MonitoringApplication(); SwingUtilities.invokeLater(new Runnable() { public void run() {
@@ -886,7 +888,8 @@
return app; }
- // Run the app with default parameters.
+ // Run the app with default parameters. + // TODO: Should check for zero args and if so then use the defaults. Otherwise, should take the parameters from the CL.
public static void main(String[] args) { // Setup the MonitoringApplication GUI.
@@ -894,7 +897,7 @@
// Settings for Test Run data. final String defaultDetectorName = "HPS-Test-JLAB-v4pt0";
- final String defaultSteering = "/org/lcsim/hps/steering/TestRunMonitoring.lcsim";
+ final String defaultSteering = "/org/lcsim/hps/steering/TestRunMonitoring.lcsim";
final String defaultEventBuilder = LCSimTestRunEventBuilder.class.getCanonicalName(); // Push default settings to JobPanel.
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1