use of megameklab.com.ui.dialog.UnitPrintQueueDialog in project megameklab by MegaMek.
the class UnitPrintManager method printMenu.
public static JMenu printMenu(final JFrame parent, JMenuItem item) {
JMenu printMenu = new JMenu("Print");
printMenu.setMnemonic(KeyEvent.VK_P);
printMenu.add(item);
printMenu.addSeparator();
item = new JMenuItem("Queue Units to Print");
item.setMnemonic(KeyEvent.VK_Q);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new UnitPrintQueueDialog(parent);
}
});
printMenu.add(item);
printMenu.addSeparator();
item = new JMenuItem("Other Unit");
item.setMnemonic(KeyEvent.VK_O);
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
UnitPrintManager.printSelectedUnit(parent);
}
});
printMenu.add(item);
item = new JMenuItem("From File");
item.setMnemonic(KeyEvent.VK_I);
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L, ActionEvent.CTRL_MASK));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
UnitPrintManager.printUnitFile(parent);
}
});
printMenu.add(item);
item = new JMenuItem("From File (Single Unit Per RS)");
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, ActionEvent.CTRL_MASK + ActionEvent.SHIFT_MASK));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
UnitPrintManager.printUnitFile(parent, true);
}
});
printMenu.add(item);
printMenu.addSeparator();
item = new JMenuItem("From MUL");
item.setMnemonic(KeyEvent.VK_M);
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
UnitPrintManager.printMuls(parent, false);
}
});
printMenu.add(item);
item = new JMenuItem("From MUL (Single Unit Per RS)");
item.setMnemonic(KeyEvent.VK_R);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
UnitPrintManager.printMuls(parent, true);
}
});
printMenu.add(item);
return printMenu;
}
Aggregations