public static void main(String[] args) { runDialog(); }
public void run() { OTFVisGUI meinJDialog = new OTFVisGUI(); meinJDialog.setTitle("OTFVis Open Dialog..."); JTabbedPane tabPane = meinJDialog.tabPane; setButton.setActionCommand("Load"); setButton.addActionListener(meinJDialog); meinJDialog.getRootPane().setDefaultButton(setButton); tabPane.addTab("Convert Event File To MVI File", panel); Container contentPane = meinJDialog.getContentPane(); JPanel panelM = new JPanel(); panelM.setLayout(new BoxLayout(panelM, BoxLayout.LINE_AXIS)); contentPane.add(buttonPane, BorderLayout.PAGE_END); meinJDialog.setMinimumSize(new Dimension(800, 300)); meinJDialog.pack(); meinJDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); meinJDialog.setVisible(true);
@Override public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals("Cancel")) { System.exit(0); } else if (command.equals("Load")) { // Check configuration ActionPanel panel = (ActionPanel) tabPane.getSelectedComponent(); if (panel.isFileValid()) { this.setVisible(false); // We are done here panel.execute(); } else { JOptionPane.showMessageDialog(this, "Not all Filenames given/valid!"); } } }
public static void main(final String[] args) { if (args.length == 0) { OTFVisGUI.runDialog(); } else if ( args[0].equalsIgnoreCase("-convert") || args[0].equalsIgnoreCase("--convert") ) { convert(args); } else if (args[0].equalsIgnoreCase("-help") || args[0].equalsIgnoreCase("--help") || args[0].equalsIgnoreCase("-?") ) { convert(args); } else if (args.length == 1) { String filename = args[0]; play(filename); } else { printUsage(); } }