new JMenuItem("From File...", KeyEvent.VK_F);
fileIngestOneFromFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new IngestDialog(IngestDialog.ONE_FROM_FILE);
}
});
JMenuItem fileIngestOneFromRepository =
new JMenuItem("From Repository...", KeyEvent.VK_R);
fileIngestOneFromRepository.setAccelerator(KeyStroke
.getKeyStroke(KeyEvent.VK_I, ActionEvent.CTRL_MASK));
fileIngestOneFromRepository.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new IngestDialog(IngestDialog.ONE_FROM_REPOS);
}
});
fileIngestOne.add(fileIngestOneFromFile);
fileIngestOne.add(fileIngestOneFromRepository);
JMenu fileIngestMultiple = new JMenu("Multiple Objects");
fileIngestMultiple.setMnemonic(KeyEvent.VK_M);
JMenuItem fileIngestMultipleFromFile =
new JMenuItem("From Directory...", KeyEvent.VK_D);
fileIngestMultipleFromFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new IngestDialog(IngestDialog.MULTI_FROM_DIR);
}
});
JMenuItem fileIngestMultipleFromRepository =
new JMenuItem("From Repository...", KeyEvent.VK_R);
fileIngestMultipleFromRepository
.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new IngestDialog(IngestDialog.MULTI_FROM_REPOS);
}
});
fileIngestMultiple.add(fileIngestMultipleFromFile);
fileIngestMultiple.add(fileIngestMultipleFromRepository);