Пример #1
0
  public void init() {

    if (SwingUtilities.isEventDispatchThread()) {
      if (initMessage != null) {
        init(initMessage);
      }
    } else {
      try {
        SwingUtilities.invokeAndWait(
            new Runnable() {

              public void run() {
                if (initMessage != null) {
                  init(initMessage);
                } else {
                  // System.err.println("Warning: Attempting to init without initMessage");
                }
              }
            });
      } catch (InterruptedException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      }
    }
  }
Пример #2
0
 protected void init(Message msg) {
   initMessage = msg;
   for (int i = 0; i < getComponentCount(); i++) {
     Component c = getComponent(i);
     if (BasePanel.class.isInstance(c)) {
       ((BasePanel) c).init(msg);
     }
   }
 }
Пример #3
0
 public void initializePanel(Message init, Message load) {
   setInitMessage(init);
   init();
   setLoadMessage(load);
   load();
 }