예제 #1
0
 public JopFrameroundcorners() {
   try {
     jbInit();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #2
0
 public JopButtonset() {
   try {
     jbInit();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #3
0
  public static Object loadFrame(
      JopSession session, String className, String instance, boolean scrollbar)
      throws ClassNotFoundException {

    if (className.indexOf(".pwg") != -1) {
      GrowFrame frame =
          new GrowFrame(
              className, session.getGdh(), instance, new GrowFrameCb(session), session.getRoot());
      frame.validate();
      frame.setVisible(true);
    } else {
      Object frame;
      if (instance == null) instance = "";

      JopLog.log(
          "JopSpider.loadFrame: Loading frame \"" + className + "\" instance \"" + instance + "\"");
      try {
        Class clazz = Class.forName(className);
        try {
          Class argTypeList[] =
              new Class[] {session.getClass(), instance.getClass(), boolean.class};
          Object argList[] = new Object[] {session, instance, new Boolean(scrollbar)};
          System.out.println("JopSpider.loadFrame getConstructor");
          Constructor constructor = clazz.getConstructor(argTypeList);

          try {
            frame = constructor.newInstance(argList);
          } catch (Exception e) {
            System.out.println(
                "Class instanciation error: "
                    + className
                    + " "
                    + e.getMessage()
                    + " "
                    + constructor);
            return null;
          }
          // frame = clazz.newInstance();
          JopLog.log("JopSpider.loadFrame openFrame");
          openFrame(frame);
          return frame;
        } catch (NoSuchMethodException e) {
          System.out.println("NoSuchMethodException: Unable to get frame constructor " + className);
        } catch (Exception e) {
          System.out.println(
              "Exception: Unable to get frame class " + className + " " + e.getMessage());
        }
      } catch (ClassNotFoundException e) {
        System.out.println("Class not found: " + className);
        throw new ClassNotFoundException();
      }
      return null;
    }
    return null;
  }
예제 #4
0
  // Main method
  public static void main(String[] args) {
    int qcom_qix = 0;

    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      e.printStackTrace();
    }
    if (args.length > 0) {
      System.out.println("Queue : " + args[0]);
      try {
        qcom_qix = Integer.parseInt(args[0]);
      } catch (NumberFormatException e) {
        System.out.println("Syntax error in que number");
        qcom_qix = 0;
      }
    }
    // new Gdh( (Object) null);
    new JopSpider(qcom_qix);
  }