Exemplo n.º 1
0
 protected void newButton_actionPerformed(ActionEvent e) {
   try {
     ApplicationSystem.getInstance().execute(NewGrestCommand.createCommand());
   } catch (CommandExecutionException e1) {
     ApplicationSystem.getInstance().showWarning("Cannot create grest.", this);
   }
 }
Exemplo n.º 2
0
 protected void importButton_actionPerformed(ActionEvent e) {
   try {
     ApplicationSystem.getInstance().execute(ImportGrestCommand.createCommand());
   } catch (CommandExecutionException e1) {
     ApplicationSystem.getInstance().showWarning("Cannot import the specified grest.", this);
   }
 }
Exemplo n.º 3
0
 protected void openButton_actionPerformed(ActionEvent e) {
   try {
     ApplicationSystem.getInstance()
         .execute(OpenGrestCommand.createCommand(grestsList.getSelectedGrest()));
   } catch (CommandExecutionException e1) {
     ApplicationSystem.getInstance().showWarning("Cannot open the selected grest.", this);
   }
 }
Exemplo n.º 4
0
 protected void removeMenuItem_actionPerformed(ActionEvent e) {
   try {
     ApplicationSystem.getInstance()
         .execute(RemoveGrestCommand.createCommand(grestsList.getSelectedGrest(), this));
   } catch (CommandExecutionException e1) {
     ApplicationSystem.getInstance().showWarning("Cannot remove the selected grest.", this);
   }
 }
Exemplo n.º 5
0
  public static void main(String[] args) {
    ApplicationSystem.initialize(new String[0]);
    GrestsManager.getInstance();

    SwingUtilities.invokeLater(
        new Runnable() {

          public void run() {
            JFrame f = new JFrame("Grests List");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new GrestsListPanel());
            f.pack();
            f.setVisible(true);
          }
        });
  }