use of javax.swing.JMenuItem in project ACS by ACS-Community.
the class ScriptFilter method getFileMenuLoadStatusButton.
/**
* This method initializes FileMenuLoadStatusButton
* @return javax.swing.JMenuItem
*/
private JMenuItem getFileMenuLoadStatusButton() {
if (FileMenuLoadStatusButton == null) {
FileMenuLoadStatusButton = new JMenuItem();
FileMenuLoadStatusButton.setText("Load GUI Status");
FileMenuLoadStatusButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
JFileChooser chooser = new JFileChooser();
Filter filter = new Filter();
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog(cl.utfsm.samplingSystemUI.SamplingSystemGUI.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
try {
readStatusFile(chooser.getSelectedFile().getAbsolutePath(), false);
} catch (ParserConfigurationException e1) {
e1.printStackTrace();
} catch (SAXException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
});
}
return FileMenuLoadStatusButton;
}
use of javax.swing.JMenuItem in project ACS by ACS-Community.
the class BeanGrouper method getDelScriptMenuItem.
private JMenuItem getDelScriptMenuItem() {
if (delScriptMenuItem == null) {
delScriptMenuItem = new JMenuItem();
delScriptMenuItem.setText("Delete script");
delScriptMenuItem.setEnabled(false);
delScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
script = null;
delScriptMenuItem.setEnabled(false);
getAddScriptMenuItem().setEnabled(true);
getStartButton().setIcon(new ImageIcon(getClass().getClassLoader().getResource("cl/utfsm/samplingSystemUI/img/player_play.png")));
getStartButton().setToolTipText("Start the sampling, and also start the configurated script.\nThe sampling will end with the script.");
getTimeSampSpinner().setEnabled(true);
}
});
}
return delScriptMenuItem;
}
use of javax.swing.JMenuItem in project ACS by ACS-Community.
the class BeanGrouper method getDelEditMenuItem.
private JMenuItem getDelEditMenuItem() {
if (delEditMenuItem == null) {
delEditMenuItem = new JMenuItem();
delEditMenuItem.setText("Delete Property");
delEditMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
createDelPropWindow();
}
});
}
return delEditMenuItem;
}
use of javax.swing.JMenuItem in project ACS by ACS-Community.
the class ConnectionWidget method initialize.
/**
* Init the GUI
*/
private void initialize() {
popMenu = new JPopupMenu();
reconnectMI = new JMenuItem("Reconnect");
popMenu.add(reconnectMI);
reconnectMI.addActionListener(this);
}
use of javax.swing.JMenuItem in project ACS by ACS-Community.
the class ErrorTreeCellRenderer method getAddDefaultsItem.
/**
* This method initializes jMenuItem
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getAddDefaultsItem() {
if (addDefaultsItem == null) {
addDefaultsItem = new JMenuItem();
addDefaultsItem.setText("Defaults");
addDefaultsItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
manager.addDefaults();
refreshDocsTree();
}
});
}
return addDefaultsItem;
}
Aggregations