//GEN-BEGIN:initComponents
private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
addressBarButtonGroup = new javax.swing.ButtonGroup();
statusLabel = new javax.swing.JLabel();
tabbedPanelContainer = new javax.swing.JPanel();
statusTextField = new javax.swing.JTextField();
timeRangePanel = new javax.swing.JPanel();
dataSetSelector = new org.autoplot.datasource.DataSetSelector();
uriTimeRangeToggleButton1 = new org.autoplot.UriTimeRangeToggleButton();
jMenuBar1 = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu();
editMenu = new javax.swing.JMenu();
undoMenuItem = new javax.swing.JMenuItem();
redoMenuItem = new javax.swing.JMenuItem();
undoMultipleMenu = new javax.swing.JMenu();
editDomSeparator = new javax.swing.JSeparator();
editDomMenuItem = new javax.swing.JMenuItem();
editOptions = new javax.swing.JMenuItem();
inspectVapFileMenuItem = new javax.swing.JMenuItem();
jSeparator1 = new javax.swing.JSeparator();
pasteDataSetURLMenuItem = new javax.swing.JMenuItem();
copyDataSetURLMenuItem = new javax.swing.JMenuItem();
copyImageMenuItem = new javax.swing.JMenuItem();
viewMenu = new javax.swing.JMenu();
addressBarMenu = new javax.swing.JMenu();
dataSetSelectorMenuItem = new javax.swing.JRadioButtonMenuItem();
timeRangeSelectorMenuItem = new javax.swing.JRadioButtonMenuItem();
textSizeMenu = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
resetFontMI = new javax.swing.JMenuItem();
addSizeMenu = new javax.swing.JMenu();
resetAppSize = new javax.swing.JMenuItem();
jSeparator4 = new javax.swing.JPopupMenu.Separator();
resetZoomMenu = new javax.swing.JMenu();
resetZoomMenuItem = new javax.swing.JMenuItem();
resetXMenuItem = new javax.swing.JMenuItem();
resetYMenuItem = new javax.swing.JMenuItem();
resetZMenuItem = new javax.swing.JMenuItem();
jMenu1 = new javax.swing.JMenu();
zoomInMenuItem = new javax.swing.JMenuItem();
zoomOutMenuItem = new javax.swing.JMenuItem();
optionsMenu = new javax.swing.JMenu();
renderingOptionsMenu = new javax.swing.JMenu();
drawGridCheckBox = new javax.swing.JCheckBoxMenuItem();
doyCB = new javax.swing.JCheckBoxMenuItem();
nnCb = new javax.swing.JCheckBoxMenuItem();
plotStyleMenu = new javax.swing.JMenu();
fontsAndColorsMenuItem = new javax.swing.JMenuItem();
canvasSizeMenuItem = new javax.swing.JMenuItem();
enableFeatureMenu = new javax.swing.JMenu();
scriptPanelMenuItem = new javax.swing.JCheckBoxMenuItem();
logConsoleMenuItem = new javax.swing.JCheckBoxMenuItem();
serverCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
dataPanelCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
layoutPanelCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
referenceCacheCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
autoMenu = new javax.swing.JMenu();
autoRangingCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
autoLabellingCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
autoLayoutCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
additionalOptionsMI = new javax.swing.JMenuItem();
saveOptionsMenuItem = new javax.swing.JMenuItem();
bookmarksMenu = new javax.swing.JMenu();
toolsMenu = new javax.swing.JMenu();
cacheMenu = new javax.swing.JMenu();
jMenuItem3 = new javax.swing.JMenuItem();
jMenuItem4 = new javax.swing.JMenuItem();
jMenuItem7 = new javax.swing.JMenuItem();
workOfflineCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
resetMemoryCachesMI = new javax.swing.JMenuItem();
manageFilesystemsMI = new javax.swing.JMenuItem();
jSeparator3 = new javax.swing.JSeparator();
pngWalkMenuItem = new javax.swing.JMenuItem();
createPngWalkMenuItem = new javax.swing.JMenuItem();
runBatchMenuItem = new javax.swing.JMenuItem();
jSeparator2 = new javax.swing.JPopupMenu.Separator();
jMenuItem6 = new javax.swing.JMenuItem();
fixLayoutMenuItem = new javax.swing.JMenuItem();
createPngWalkSeparator = new javax.swing.JSeparator();
aggregateMenuItem = new javax.swing.JMenuItem();
replaceFileMenuItem = new javax.swing.JMenuItem();
mashDataMenuItem = new javax.swing.JMenuItem();
filtersMenuItem = new javax.swing.JMenuItem();
aggSeparator = new javax.swing.JSeparator();
decodeURLItem = new javax.swing.JMenuItem();
reloadAllMenuItem = new javax.swing.JMenuItem();
toolsUserSep = new javax.swing.JPopupMenu.Separator();
helpMenu = new javax.swing.JMenu();
autoplotHelpMenuItem = new javax.swing.JMenuItem();
gettingStartedMenuItem = new javax.swing.JMenuItem();
jMenuItem5 = new javax.swing.JMenuItem();
aboutDas2MenuItem = new javax.swing.JMenuItem();
autoplotHomepageButton = new javax.swing.JMenuItem();
searchToolTipsMenuItem = new javax.swing.JMenuItem();
exceptionReport = new javax.swing.JMenuItem();
aboutAutoplotMenuItem = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Autoplot");
addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
formMouseClicked(evt);
}
});
statusLabel.setFont(statusLabel.getFont().deriveFont(statusLabel.getFont().getSize()-2f));
statusLabel.setText("starting...");
statusLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
statusLabelMouseClicked(evt);
}
});
tabbedPanelContainer.setLayout(new java.awt.BorderLayout());
statusTextField.setEditable(false);
statusTextField.setFont(statusTextField.getFont().deriveFont(statusTextField.getFont().getSize()-2f));
statusTextField.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, statusLabel, org.jdesktop.beansbinding.ELProperty.create("${text}"), statusTextField, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
statusTextField.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
statusTextFieldMouseClicked(evt);
}
});
timeRangePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
timeRangePanel.setLayout(new java.awt.CardLayout());
dataSetSelector.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
dataSetSelector.setPromptText("Just a moment...");
dataSetSelector.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
dataSetSelectorActionPerformed(evt);
}
});
timeRangePanel.add(dataSetSelector, "dataCard");
org.jdesktop.layout.GroupLayout uriTimeRangeToggleButton1Layout = new org.jdesktop.layout.GroupLayout(uriTimeRangeToggleButton1);
uriTimeRangeToggleButton1.setLayout(uriTimeRangeToggleButton1Layout);
uriTimeRangeToggleButton1Layout.setHorizontalGroup(
uriTimeRangeToggleButton1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 0, Short.MAX_VALUE)
);
uriTimeRangeToggleButton1Layout.setVerticalGroup(
uriTimeRangeToggleButton1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 28, Short.MAX_VALUE)
);
fileMenu.setText("File");
jMenuBar1.add(fileMenu);
editMenu.setText("Edit");
undoMenuItem.setAction(undoRedoSupport.getUndoAction());
undoMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())
);
undoMenuItem.setText("Undo");
undoMenuItem.setToolTipText("Undo the last operation");
editMenu.add(undoMenuItem);
redoMenuItem.setAction(undoRedoSupport.getRedoAction());
redoMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
redoMenuItem.setText("Redo");
redoMenuItem.setToolTipText("Redo the last undone operation");
editMenu.add(redoMenuItem);
undoMultipleMenu.setText("Undo...");
editMenu.add(undoMultipleMenu);
editMenu.add(editDomSeparator);
editDomMenuItem.setText("Edit DOM");
editDomMenuItem.setToolTipText("Edit the application state using the property editor");
editDomMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
editDomMenuItemActionPerformed(evt);
}
});
editMenu.add(editDomMenuItem);
editOptions.setText("Options...");
editOptions.setToolTipText("Edit user options like background colors and fonts");
editOptions.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
editOptionsActionPerformed(evt);
}
});
editMenu.add(editOptions);
inspectVapFileMenuItem.setText("Inspect Vap File...");
inspectVapFileMenuItem.setToolTipText("View a vap file from a local disk in the property editor");
inspectVapFileMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
inspectVapFileMenuItemActionPerformed(evt);
}
});
editMenu.add(inspectVapFileMenuItem);
editMenu.add(jSeparator1);
pasteDataSetURLMenuItem.setText("Paste URI");
pasteDataSetURLMenuItem.setToolTipText("Paste a data address in the system clipboard into the address bar");
pasteDataSetURLMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pasteDataSetURLMenuItemActionPerformed(evt);
}
});
editMenu.add(pasteDataSetURLMenuItem);
copyDataSetURLMenuItem.setText("Copy URI");
copyDataSetURLMenuItem.setToolTipText("Copy the data address in the address bar into the system clipboard");
copyDataSetURLMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
copyDataSetURLMenuItemActionPerformed(evt);
}
});
editMenu.add(copyDataSetURLMenuItem);
copyImageMenuItem.setText("Copy Image To Clipboard");
copyImageMenuItem.setToolTipText("Copy the canvas image into the system clipboard.");
copyImageMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
copyImageMenuItemActionPerformed(evt);
}
});
editMenu.add(copyImageMenuItem);
jMenuBar1.add(editMenu);
viewMenu.setText("View");
addressBarMenu.setText("Address Bar");
dataSetSelectorMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
addressBarButtonGroup.add(dataSetSelectorMenuItem);
dataSetSelectorMenuItem.setSelected(true);
dataSetSelectorMenuItem.setText("Data Set Selector");
dataSetSelectorMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
dataSetSelectorMenuItemActionPerformed(evt);
}
});
addressBarMenu.add(dataSetSelectorMenuItem);
timeRangeSelectorMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
addressBarButtonGroup.add(timeRangeSelectorMenuItem);
timeRangeSelectorMenuItem.setText("Time Range Selector");
timeRangeSelectorMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
timeRangeSelectorMenuItemActionPerformed(evt);
}
});
addressBarMenu.add(timeRangeSelectorMenuItem);
viewMenu.add(addressBarMenu);
textSizeMenu.setText("Text Size");
jMenuItem1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
jMenuItem1.setText("Bigger");
jMenuItem1.setToolTipText("Make canvas font bigger");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
textSizeMenu.add(jMenuItem1);
jMenuItem2.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MINUS,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())
);
jMenuItem2.setText("Smaller");
jMenuItem2.setToolTipText("Make canvas font smaller");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
textSizeMenu.add(jMenuItem2);
resetFontMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0,Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())
);
resetFontMI.setText("Reset to 100%");
resetFontMI.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetFontMIActionPerformed(evt);
}
});
textSizeMenu.add(resetFontMI);
viewMenu.add(textSizeMenu);
addSizeMenu.setText("App Size");
resetAppSize.setText("Reset to default size");
resetAppSize.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetAppSizeActionPerformed(evt);
}
});
addSizeMenu.add(resetAppSize);
viewMenu.add(addSizeMenu);
viewMenu.add(jSeparator4);
resetZoomMenu.setText("Reset Zoom");
resetZoomMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK|Event.SHIFT_MASK ));
resetZoomMenuItem.setText("Reset Zoom");
resetZoomMenuItem.setToolTipText("Revert to the original axis settings");
resetZoomMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetZoomMenuItemActionPerformed(evt);
}
});
resetZoomMenu.add(resetZoomMenuItem);
resetXMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK|Event.SHIFT_MASK ));
resetXMenuItem.setText("Reset X");
resetXMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetXMenuItemActionPerformed(evt);
}
});
resetZoomMenu.add(resetXMenuItem);
resetYMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, Event.CTRL_MASK|Event.SHIFT_MASK ));
resetYMenuItem.setText("Reset Y");
resetYMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetYMenuItemActionPerformed(evt);
}
});
resetZoomMenu.add(resetYMenuItem);
resetZMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Event.CTRL_MASK|Event.SHIFT_MASK ));
resetZMenuItem.setText("Reset Z");
resetZMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetZMenuItemActionPerformed(evt);
}
});
resetZoomMenu.add(resetZMenuItem);
viewMenu.add(resetZoomMenu);
jMenu1.setText("Zoom");
jMenu1.setToolTipText("Note zooming can be done by dragging ranges with the mouse, or use the mouse wheel.");
zoomInMenuItem.setText("Zoom In");
zoomInMenuItem.setToolTipText("zoom in on the X axis");
zoomInMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
zoomInMenuItemActionPerformed(evt);
}
});
jMenu1.add(zoomInMenuItem);
zoomOutMenuItem.setText("Zoom Out");
zoomOutMenuItem.setToolTipText("zoom out the X axis");
zoomOutMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
zoomOutMenuItemActionPerformed(evt);
}
});
jMenu1.add(zoomOutMenuItem);
viewMenu.add(jMenu1);
jMenuBar1.add(viewMenu);
optionsMenu.setText("Options");
renderingOptionsMenu.setText("Rendering Options");
drawGridCheckBox.setSelected(true);
drawGridCheckBox.setText("Draw Grid");
drawGridCheckBox.setToolTipText("Draw gridlines at major ticks");
drawGridCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
drawGridCheckBoxActionPerformed(evt);
}
});
renderingOptionsMenu.add(drawGridCheckBox);
doyCB.setText("Day of Year Labels");
doyCB.setToolTipText("Use Day of Year instead of Year-Month-Day for labels");
doyCB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
doyCBActionPerformed(evt);
}
});
renderingOptionsMenu.add(doyCB);
nnCb.setText("Nearest Neighbor Spectrograms");
nnCb.setToolTipText("Use Nearest Neighbor rebinning for new spectrograms");
nnCb.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nnCbActionPerformed(evt);
}
});
renderingOptionsMenu.add(nnCb);
optionsMenu.add(renderingOptionsMenu);
plotStyleMenu.setText("Plot Style");
fontsAndColorsMenuItem.setText("Fonts and Colors...");
fontsAndColorsMenuItem.setToolTipText("Edit canvas font and colors");
fontsAndColorsMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
fontsAndColorsMenuItemActionPerformed(evt);
}
});
plotStyleMenu.add(fontsAndColorsMenuItem);
canvasSizeMenuItem.setText("Canvas Size...");
canvasSizeMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
canvasSizeMenuItemActionPerformed(evt);
}
});
plotStyleMenu.add(canvasSizeMenuItem);
optionsMenu.add(plotStyleMenu);
enableFeatureMenu.setText("Enable Feature");
scriptPanelMenuItem.setText("Script Panel");
scriptPanelMenuItem.setToolTipText("Script Panel adds a tab that displays scripts used for the jython data source. It also provides a way to create new jython sources.");
scriptPanelMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
scriptPanelMenuItemActionPerformed(evt);
}
});
enableFeatureMenu.add(scriptPanelMenuItem);
logConsoleMenuItem.setText("Log Console");
logConsoleMenuItem.setToolTipText("Add a tab that receives and displays messages posted to the java logging system. ");
logConsoleMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
logConsoleMenuItemActionPerformed(evt);
}
});
enableFeatureMenu.add(logConsoleMenuItem);
serverCheckBoxMenuItem.setText("Server");
serverCheckBoxMenuItem.setToolTipText(" Start up back end server that allows commands to be send to Autoplot via a port. ");
serverCheckBoxMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
serverCheckBoxMenuItemActionPerformed(evt);
}
});
enableFeatureMenu.add(serverCheckBoxMenuItem);
dataPanelCheckBoxMenuItem.setText("Data Panel");
dataPanelCheckBoxMenuItem.setToolTipText("The data panel allows for explicitly setting valid range and fill values for the dataset, and additional controls for data reduction before plotting. ");
enableFeatureMenu.add(dataPanelCheckBoxMenuItem);
layoutPanelCheckBoxMenuItem.setText("Layout Panel");
layoutPanelCheckBoxMenuItem.setToolTipText("Enables the layout panel, which shows all the plots and plot elements in thier relative positions.\n");
enableFeatureMenu.add(layoutPanelCheckBoxMenuItem);
referenceCacheCheckBoxMenuItem.setSelected(true);
referenceCacheCheckBoxMenuItem.setText("Reference Caching");
referenceCacheCheckBoxMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
referenceCacheCheckBoxMenuItemActionPerformed(evt);
}
});
enableFeatureMenu.add(referenceCacheCheckBoxMenuItem);
optionsMenu.add(enableFeatureMenu);
autoMenu.setText("Auto");
autoRangingCheckBoxMenuItem.setSelected(true);
autoRangingCheckBoxMenuItem.setText("AutoRanging");
autoRangingCheckBoxMenuItem.setToolTipText("Allow automatic axis range setting. Range is based on metadata hints and data range.");
autoMenu.add(autoRangingCheckBoxMenuItem);
autoLabellingCheckBoxMenuItem.setSelected(true);
autoLabellingCheckBoxMenuItem.setText("AutoLabelling");
autoLabellingCheckBoxMenuItem.setToolTipText("Allow automatic setting of axis labels based on metadata. ");
autoMenu.add(autoLabellingCheckBoxMenuItem);
autoLayoutCheckBoxMenuItem.setSelected(true);
autoLayoutCheckBoxMenuItem.setText("AutoLayout");
autoLayoutCheckBoxMenuItem.setToolTipText("Allow the application to reposition axes so labels are not clipped and unused space is reduced.
Axes can be positioned manually by turning off this option, then hold shift down to enable plot corner drag anchors.
");
autoLayoutCheckBoxMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
autoLayoutCheckBoxMenuItemActionPerformed(evt);
}
});
autoMenu.add(autoLayoutCheckBoxMenuItem);
optionsMenu.add(autoMenu);
additionalOptionsMI.setText("Additional Options...");
additionalOptionsMI.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
additionalOptionsMIActionPerformed(evt);
}
});
optionsMenu.add(additionalOptionsMI);
saveOptionsMenuItem.setText("Save Options");
saveOptionsMenuItem.setToolTipText("Save options for future sessions.");
saveOptionsMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
saveOptionsMenuItemActionPerformed(evt);
}
});
optionsMenu.add(saveOptionsMenuItem);
jMenuBar1.add(optionsMenu);
bookmarksMenu.setText("Bookmarks");
jMenuBar1.add(bookmarksMenu);
toolsMenu.setText("Tools");
cacheMenu.setText("Cache");
jMenuItem3.setText("Manage Cached Files...");
jMenuItem3.setToolTipText("Manage cache of downloaded data files.");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
cacheMenu.add(jMenuItem3);
jMenuItem4.setText("Clear Cache");
jMenuItem4.setToolTipText("Delete all downloaded data files.");
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem4ActionPerformed(evt);
}
});
cacheMenu.add(jMenuItem4);
jMenuItem7.setText("Move Cache...");
jMenuItem7.setToolTipText("Move file cache to new location");
jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem7ActionPerformed(evt);
}
});
cacheMenu.add(jMenuItem7);
workOfflineCheckBoxMenuItem.setText("Work Offline");
workOfflineCheckBoxMenuItem.setToolTipText("Only use previously downloaded files. ");
workOfflineCheckBoxMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
workOfflineCheckBoxMenuItemActionPerformed(evt);
}
});
cacheMenu.add(workOfflineCheckBoxMenuItem);
resetMemoryCachesMI.setText("Reset Memory Caches");
resetMemoryCachesMI.setToolTipText("Reset the internal state of the filesystems, re-listing them and resetting offline status.");
resetMemoryCachesMI.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetMemoryCachesMIActionPerformed(evt);
}
});
cacheMenu.add(resetMemoryCachesMI);
manageFilesystemsMI.setText("Manage Filesystems");
manageFilesystemsMI.setToolTipText("Show the active filesystems and their status.");
manageFilesystemsMI.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
manageFilesystemsMIActionPerformed(evt);
}
});
cacheMenu.add(manageFilesystemsMI);
toolsMenu.add(cacheMenu);
toolsMenu.add(jSeparator3);
pngWalkMenuItem.setText("PNG Walk Viewer");
pngWalkMenuItem.setToolTipText("Bring up the PNG Walk tool to browse a set of images.");
pngWalkMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pngWalkMenuItemActionPerformed(evt);
}
});
toolsMenu.add(pngWalkMenuItem);
createPngWalkMenuItem.setText("Create PNG Walk...");
createPngWalkMenuItem.setToolTipText("Create a series of images, and start the PNG Walk tool to browse the images.");
createPngWalkMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
createPngWalkMenuItemActionPerformed(evt);
}
});
toolsMenu.add(createPngWalkMenuItem);
runBatchMenuItem.setText("Run Batch...");
runBatchMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
runBatchMenuItemActionPerformed(evt);
}
});
toolsMenu.add(runBatchMenuItem);
toolsMenu.add(jSeparator2);
jMenuItem6.setText("Events List");
jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem6ActionPerformed(evt);
}
});
toolsMenu.add(jMenuItem6);
fixLayoutMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
fixLayoutMenuItem.setText("Fix Layout");
fixLayoutMenuItem.setToolTipText("Run new layout routine that removes spaces between plots");
fixLayoutMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
fixLayoutMenuItemActionPerformed(evt);
}
});
toolsMenu.add(fixLayoutMenuItem);
toolsMenu.add(createPngWalkSeparator);
aggregateMenuItem.setText("Aggregate...");
aggregateMenuItem.setToolTipText("Combine files into a time series");
aggregateMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aggregateMenuItemActionPerformed(evt);
}
});
toolsMenu.add(aggregateMenuItem);
replaceFileMenuItem.setText("Replace File...");
replaceFileMenuItem.setToolTipText("Replace the file with a new one. This assumes that any parameters used to load the file
should be preserved, and axis settings should be preserved. We re-range on the x-axis, since often we are switching to a new interval in time.\n");
replaceFileMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
replaceFileMenuItemActionPerformed(evt);
}
});
toolsMenu.add(replaceFileMenuItem);
mashDataMenuItem.setText("Mash Data...");
mashDataMenuItem.setToolTipText("Combine data from several sources.");
mashDataMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mashDataMenuItemActionPerformed(evt);
}
});
toolsMenu.add(mashDataMenuItem);
filtersMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/autoplot/resources/pipeMag2.png"))); // NOI18N
filtersMenuItem.setText("Additional Operations...");
filtersMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filtersMenuItemActionPerformed(evt);
}
});
toolsMenu.add(filtersMenuItem);
toolsMenu.add(aggSeparator);
decodeURLItem.setText("Decode URL");
decodeURLItem.setToolTipText("Decode the URL escapes to correct the URL\n");
decodeURLItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
decodeURLItemActionPerformed(evt);
}
});
toolsMenu.add(decodeURLItem);
reloadAllMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
reloadAllMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/autoplot/resources/reload.png"))); // NOI18N
reloadAllMenuItem.setText("Reload All Data");
reloadAllMenuItem.setToolTipText("Reload all data, updating to get any changes. Axis settings and labels should remain the same.");
reloadAllMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
reloadAllMenuItemActionPerformed(evt);
}
});
toolsMenu.add(reloadAllMenuItem);
toolsUserSep.setToolTipText("User items below here");
toolsUserSep.setName("userSep"); // NOI18N
toolsMenu.add(toolsUserSep);
jMenuBar1.add(toolsMenu);
helpMenu.setText("Help");
helpMenu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
helpMenuActionPerformed(evt);
}
});
CSH.setHelpIDString(autoplotHelpMenuItem, "aphelp_main");
autoplotHelpMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
autoplotHelpMenuItem.setText("Help Contents...");
autoplotHelpMenuItem.setToolTipText("Start up help system");
autoplotHelpMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
autoplotHelpMenuItemActionPerformed(evt);
}
});
helpMenu.add(autoplotHelpMenuItem);
gettingStartedMenuItem.setText("Getting Started...");
gettingStartedMenuItem.setToolTipText("Bring up the getting started dialog");
gettingStartedMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
gettingStartedMenuItemActionPerformed(evt);
}
});
helpMenu.add(gettingStartedMenuItem);
jMenuItem5.setText("Release Notes");
jMenuItem5.setToolTipText("View release notes");
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem5ActionPerformed(evt);
}
});
helpMenu.add(jMenuItem5);
aboutDas2MenuItem.setText("Das2 Homepage");
aboutDas2MenuItem.setToolTipText("Browse the Das2 homepage, which provides graphics and interactivity.");
aboutDas2MenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutDas2MenuItemActionPerformed(evt);
}
});
helpMenu.add(aboutDas2MenuItem);
autoplotHomepageButton.setText("Autoplot Homepage");
autoplotHomepageButton.setToolTipText("Browse the Autoplot homepage");
autoplotHomepageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
autoplotHomepageButtonActionPerformed(evt);
}
});
helpMenu.add(autoplotHomepageButton);
searchToolTipsMenuItem.setText("Search Tooltips...");
searchToolTipsMenuItem.setToolTipText("Experimental search all GUI tooltips");
searchToolTipsMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
searchToolTipsMenuItemActionPerformed(evt);
}
});
helpMenu.add(searchToolTipsMenuItem);
exceptionReport.setText("Provide Feedback...");
exceptionReport.setToolTipText("Send feedback to application support");
exceptionReport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exceptionReportActionPerformed(evt);
}
});
helpMenu.add(exceptionReport);
aboutAutoplotMenuItem.setText("About Autoplot");
aboutAutoplotMenuItem.setToolTipText("Show information about this release");
aboutAutoplotMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutAutoplotMenuItemActionPerformed(evt);
}
});
helpMenu.add(aboutAutoplotMenuItem);
jMenuBar1.add(helpMenu);
setJMenuBar(jMenuBar1);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(layout.createSequentialGroup()
.add(12, 12, 12)
.add(timeRangePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE))
.add(layout.createSequentialGroup()
.add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(4, 4, 4)
.add(statusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)))
.addContainerGap())
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, tabbedPanelContainer, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 732, Short.MAX_VALUE))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(uriTimeRangeToggleButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(0, 721, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.add(timeRangePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 695, Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(statusLabel)
.add(statusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(48, 48, 48)
.add(tabbedPanelContainer, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)
.add(20, 20, 20)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(uriTimeRangeToggleButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(714, Short.MAX_VALUE)))
);
bindingGroup.bind();
pack();
}// //GEN-END:initComponents
private void copyImageMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_copyImageMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
support.doCopyDataSetImage();
}//GEN-LAST:event_copyImageMenuItemActionPerformed
private void copyDataSetURLMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_copyDataSetURLMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
support.doCopyDataSetURL();
}//GEN-LAST:event_copyDataSetURLMenuItemActionPerformed
private void pasteDataSetURLMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pasteDataSetURLMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
support.doPasteDataSetURL();
}//GEN-LAST:event_pasteDataSetURLMenuItemActionPerformed
/**
* Action performed when the green "play" button is pressed.
* @param uri the URI
* @param modifiers the modifiers, such as KeyEvent.CTRL_MASK and KeyEvent.SHIFT_MASK.
*/
protected void doPlotGoButton( final String uri, final int modifiers ) {
org.das2.util.LoggerManager.getLogger("gui").log(Level.FINE, "plot URI \"{0}\"", uri);
ExceptionHandler eh= applicationModel.getExceptionHandler();
if ( eh instanceof GuiExceptionHandler ) {
((GuiExceptionHandler)eh).setFocusURI(uri);
}
Runnable run= new Runnable() {
@Override
public void run() {
if ( AutoplotUI.this.isExpertMode() ) {
if ( ( modifiers & KeyEvent.CTRL_MASK ) == KeyEvent.CTRL_MASK ) {
if ( ( modifiers & KeyEvent.SHIFT_MASK ) == KeyEvent.SHIFT_MASK ) {
String uri= (String) dataSetSelector.getValue();
plotAnotherUrl( uri, Collections.singletonMap( "direction", LayoutConstants.ABOVE ));
} else {
plotAnotherUrl();
}
} else if ( ( modifiers & KeyEvent.SHIFT_MASK ) == KeyEvent.SHIFT_MASK ) {
overplotAnotherUrl();
} else {
plotUrl(uri);
}
} else {
dom.getController().reset();
plotUrl( uri );
}
}
};
//run.run(); // simulate old code.
new Thread(run,"dataSetSelectThread").start();
}
private void dataSetSelectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dataSetSelectorActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
String uri= (String) dataSetSelector.getValue();
int modifiers= evt.getModifiers();
doPlotGoButton( uri, modifiers );
}//GEN-LAST:event_dataSetSelectorActionPerformed
private void zoomOutMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zoomOutMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
DasPlot p= dom.getController().getPlot().getController().getDasPlot();
DatumRange dr = DatumRangeUtil.rescale( p.getXAxis().getDatumRange(), -0.333, 1.333);
p.getXAxis().setDatumRange(dr);
}//GEN-LAST:event_zoomOutMenuItemActionPerformed
private void zoomInMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zoomInMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
DasPlot p= dom.getController().getPlot().getController().getDasPlot();
DatumRange dr = DatumRangeUtil.rescale(p.getXAxis().getDatumRange(), 0.25, 0.75);
p.getXAxis().setDatumRange(dr);
}//GEN-LAST:event_zoomInMenuItemActionPerformed
private void resetZoomMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetZoomMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
dom.getController().getPlot().getController().resetZoom(true, true, true);
if ( !AutoplotUtil.resetZoomX(dom)) {
System.err.println("unable to zoom x");
}
if ( !AutoplotUtil.resetZoomY(dom)) {
System.err.println("unable to zoom y");
}
if ( !AutoplotUtil.resetZoomZ(dom)) {
System.err.println("unable to zoom z");
}
}//GEN-LAST:event_resetZoomMenuItemActionPerformed
private void fontsAndColorsMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fontsAndColorsMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
if (fontAndColorsDialog == null) fontAndColorsDialog = new FontAndColorsDialog(this, false, applicationModel);
fontAndColorsDialog.setVisible(true);
}//GEN-LAST:event_fontsAndColorsMenuItemActionPerformed
private void aboutAutoplotMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutAutoplotMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
about( );
}//GEN-LAST:event_aboutAutoplotMenuItemActionPerformed
/**
* show the about dialog, which has version information.
*/
public void about() {
String releaseTag="?";
JTextPane jtp= new JTextPane();
try {
releaseTag = AboutUtil.getReleaseTag();
String bufStr= AutoplotUtil.getAboutAutoplotHtml( this.applicationModel );
jtp.setContentType("text/html");
jtp.read(new StringReader(bufStr), null);
jtp.setEditable(false);
jtp.addHyperlinkListener( new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
if ( e.getEventType()==HyperlinkEvent.EventType.ACTIVATED ) {
AutoplotUtil.openBrowser( e.getURL().toString() );
}
}
} );
final JPopupMenu menu= new JPopupMenu();
JMenuItem copyItem = menu.add(new DefaultEditorKit.CopyAction());
copyItem.setText("Copy");
jtp.addMouseListener( new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (e.isPopupTrigger()) {
if (menu != null) {
menu.show(e.getComponent(), e.getX(), e.getY());
}
}
}
@Override
public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) {
if (menu != null) {
menu.show(e.getComponent(), e.getX(), e.getY());
}
}
}
});
} catch ( IOException ex ) {
jtp.setText(ex.getMessage());
}
//JLabel label= new JLabel(buffy.toString());
JScrollPane pane= new JScrollPane(jtp,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
pane.getVerticalScrollBar().setUnitIncrement( 12 );
pane.setPreferredSize(new java.awt.Dimension( 640 + 50,480));
AutoplotUtil.showMessageDialog(this, pane, "About Autoplot "+releaseTag, JOptionPane.INFORMATION_MESSAGE );
}
private void aboutDas2MenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutDas2MenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
AutoplotUtil.openBrowser("https://das2.org");
}//GEN-LAST:event_aboutDas2MenuItemActionPerformed
private void autoplotHomepageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoplotHomepageButtonActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
AutoplotUtil.openBrowser("http://autoplot.org/");
}//GEN-LAST:event_autoplotHomepageButtonActionPerformed
private void helpMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_helpMenuActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
// TODO add your handling code here:
}//GEN-LAST:event_helpMenuActionPerformed
private void scriptPanelMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scriptPanelMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
applicationModel.getDocumentModel().getOptions().setScriptVisible(scriptPanelMenuItem.isSelected());
if (scriptPanelMenuItem.isSelected() && jythonScriptPanel == null) {
jythonScriptPanel= new JPanel( new BorderLayout() );
scriptPanel = new JythonScriptPanel( AutoplotUI.this, this.dataSetSelector);
addEditorCustomActions( scriptPanel );
jythonScriptPanel.add(scriptPanel, BorderLayout.CENTER );
tabs.insertTab(TAB_SCRIPT, null, jythonScriptPanel,
String.format( TAB_TOOLTIP_SCRIPT, TABS_TOOLTIP), 4);
ExceptionHandler h= AutoplotUI.this.getApplicationModel().getExceptionHandler();
if ( h!=null && h instanceof GuiExceptionHandler ) {
((GuiExceptionHandler)h).setScriptPanel(scriptPanel);
}
} else if ( scriptPanelMenuItem.isSelected() && jythonScriptPanel!=null ) {
tabs.insertTab(TAB_SCRIPT, null, jythonScriptPanel,
String.format( TAB_TOOLTIP_SCRIPT, TABS_TOOLTIP), 4);
} else {
tabs.remove( jythonScriptPanel );
}
setStatus( "Use [menubar]->Options->Save Options to use this setting in future sessions.");
}//GEN-LAST:event_scriptPanelMenuItemActionPerformed
private void logConsoleMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logConsoleMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
applicationModel.getDocumentModel().getOptions().setLogConsoleVisible(logConsoleMenuItem.isSelected());
if ( logConsoleMenuItem.isSelected() && logConsolePanel == null) {
logConsolePanel= new JScrollPane();
tabs.addTab(TAB_CONSOLE, null, logConsolePanel,
String.format( TAB_TOOLTIP_LOGCONSOLE, TABS_TOOLTIP) );
initLogConsole();
logConsolePanel.setViewportView( logConsole );
} else if ( logConsoleMenuItem.isSelected() && logConsolePanel!=null ) {
tabs.addTab(TAB_CONSOLE, null, logConsolePanel,
String.format( TAB_TOOLTIP_LOGCONSOLE, TABS_TOOLTIP) );
} else {
if ( logConsoleMenuItem.isSelected() && logConsolePanel!=null ) {
logConsole.undoLogConsoleMessages();
}
tabs.remove(logConsolePanel);
}
setStatus( "Use [menubar]->Options->Save Options to use this setting in future sessions.");
}//GEN-LAST:event_logConsoleMenuItemActionPerformed
private void serverCheckBoxMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_serverCheckBoxMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
applicationModel.getDocumentModel().getOptions().setServerEnabled(serverCheckBoxMenuItem.isSelected());
if (applicationModel.getDocumentModel().getOptions().isServerEnabled()) {
initServer();
} else {
stopServer();
}
serverCheckBoxMenuItem.setSelected( rlistener!=null );
serverCheckBoxMenuItem.setToolTipText( rlistener==null ? null : ( "listening on port " + rlistener.getPort() ) );
applicationModel.getDocumentModel().getOptions().setServerEnabled( rlistener!=null );
}//GEN-LAST:event_serverCheckBoxMenuItemActionPerformed
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
applicationModel.increaseFontSize();
}//GEN-LAST:event_jMenuItem1ActionPerformed
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
applicationModel.decreaseFontSize();
}//GEN-LAST:event_jMenuItem2ActionPerformed
private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
final JDiskHogPanel panel = new JDiskHogPanel( this );
JDialog dia = new JDialog(this, "Manage Cache", true);
dia.add(panel);
dia.pack();
RequestProcessor.invokeLater(() -> {
panel.scan( new File( AutoplotSettings.settings().resolveProperty( AutoplotSettings.PROP_FSCACHE ) ) );
});
dia.setLocationRelativeTo( this );
dia.setVisible(true);
if ( panel.isGoPressed() ) {
panel.doPlotSelected();
}
//JOptionPane.showMessageDialog(this, plotElement, "Manage Cache", JOptionPane.DEFAULT_OPTION, null);
}//GEN-LAST:event_jMenuItem3ActionPerformed
private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
clearCache();
}//GEN-LAST:event_jMenuItem4ActionPerformed
private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
try {
String release = AboutUtil.getReleaseTag();
if ( release.equals("(dev)") ) {
release= "devel";
}
String surl = "http://autoplot.org/jnlp/" + release;
AutoplotUtil.openBrowser(surl);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}//GEN-LAST:event_jMenuItem5ActionPerformed
private void editDomMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editDomMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
PropertyEditor edit= new PropertyEditor(applicationModel.dom);
edit.showDialog(this,"DOM Properties",new ImageIcon(this.getClass().getResource("/resources/logo16.png")).getImage());
}//GEN-LAST:event_editDomMenuItemActionPerformed
private void statusLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_statusLabelMouseClicked
//statusLabel.setText("");
statusLabel.setIcon(IDLE_ICON);
}//GEN-LAST:event_statusLabelMouseClicked
private void inspectVapFileMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inspectVapFileMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
this.support.doInspectVap();
}//GEN-LAST:event_inspectVapFileMenuItemActionPerformed
private void autoLayoutCheckBoxMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoLayoutCheckBoxMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
if ( autoLayoutCheckBoxMenuItem.isSelected() ) {
applicationModel.doAutoLayout();
}
}//GEN-LAST:event_autoLayoutCheckBoxMenuItemActionPerformed
private void autoplotHelpMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoplotHelpMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
helpSystem.displayHelpFromEvent(evt);
}//GEN-LAST:event_autoplotHelpMenuItemActionPerformed
private void pngWalkMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pngWalkMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
PngWalkTool.start( null, this);
}//GEN-LAST:event_pngWalkMenuItemActionPerformed
private void createPngWalkMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createPngWalkMenuItemActionPerformed
org.das2.util.LoggerManager.logGuiEvent(evt);
//JythonUtil.invokeScriptSoon( AutoplotUI.class.getResource("/scripts/pngwalk/makePngWalk.jy"), applicationModel.dom, null );
Runnable run= new Runnable() {
@Override
public void run() {
try {
CreatePngWalk.doIt( applicationModel.dom, null );
} catch ( IOException ex ) {
logger.log( Level.SEVERE, ex.getMessage(), ex );
setStatus( AutoplotUI.ERROR_ICON,"Unable to create PNG Walk: " + ex.getMessage() );
applicationModel.showMessage( "Unable to create PNG Walk: