コード例 #1
0
      public void run() {
        if (ClassName != null) {
          try {
            Class<?> cls = Class.forName(ClassName);
            if (method == null) {
              if (TypeArgConstructor != null) validarArgumentos();

              Constructor cons = cls.getConstructor(TypeArgConstructor);
              cons.newInstance(ArgConstructor);
            } else {
              Method meth = cls.getMethod(method, new Class[] {});
              meth.invoke(cls.newInstance(), new Object[] {});
            }
          } catch (ClassNotFoundException CNFEe) {
            CNFEe.printStackTrace();
            System.out.println("Exception : " + CNFEe.getMessage());
          } catch (NoSuchMethodException NSMEe) {
            NSMEe.printStackTrace();
            System.out.println("Exception : " + NSMEe.getMessage());
          } catch (InstantiationException IEe) {
            IEe.printStackTrace();
            System.out.println("Exception : " + IEe.getMessage());
          } catch (IllegalAccessException IAEe) {
            IAEe.printStackTrace();
            System.out.println("Exception : " + IAEe.getMessage());
          } catch (InvocationTargetException ITEe) {
            ITEe.printStackTrace();
            System.out.println("Exception: " + ITEe.getMessage());
          }
        } else {
          Dimension size = new Dimension();
          size.height = MainWindow.getWidthValue();
          size.width = MainWindow.getHeightValue();
          new GenericForm(
              ACPHandler.getDocForm(transaction),
              MainWindow.getDesktopPane(),
              ClientConstants.KeyClient,
              size,
              transaction);
        }
      }
コード例 #2
0
 /**
  * Como esta clase es una implementacion de ActionListener, se aprovecha esta propiedad para crear
  * de si misma los eventos de cada JMenuItem
  */
 public EmakuButtonGroup(JToolBar toolBar) {
   this.toolBar = toolBar;
   this.addActionListener(this);
   ACPHandler.addACPFormListener(this);
 }