コード例 #1
0
  private void updateTabBar(Vector vtThread) {
    pnlThread.removeAll();
    for (int iThreadIndex = 0; iThreadIndex < vtThread.size(); iThreadIndex++) {
      try {
        Vector vtThreadInfo = (Vector) vtThread.elementAt(iThreadIndex);
        PanelThreadMonitor mntTemp = new PanelThreadMonitor(channel);

        String strThreadID = (String) vtThreadInfo.elementAt(0);
        String strThreadName = (String) vtThreadInfo.elementAt(1);
        int iThreadStatus = Integer.parseInt((String) vtThreadInfo.elementAt(2));
        mntTemp.setThreadID(strThreadID);
        mntTemp.setThreadName(strThreadName);
        mntTemp.setThreadStatus(iThreadStatus);
        showResult(mntTemp.txtMonitor, (String) vtThreadInfo.elementAt(3));
        mntTemp.addPropertyChangeListener(this);

        pnlThread.add(strThreadName, mntTemp);
        mntTemp.updateStatus();
      } catch (Exception e) {
        e.printStackTrace();
        MessageBox.showMessageDialog(this, e, Global.APP_NAME, MessageBox.ERROR_MESSAGE);
      }
    }
    Skin.applySkin(this);
  }
コード例 #2
0
  private synchronized void closeAll() {
    try {
      // Close all child window
      WindowManager.closeAll();

      // Remove all child component
      pnlThread.setVisible(false);
      pnlUser.setVisible(false);
      pnlThread.removeAll();
      clearAll(txtBoard);
      tblUser.setData(new Vector());
      Thread.sleep(500);
    } catch (Exception e) {
      e.printStackTrace();
      MessageBox.showMessageDialog(this, e, Global.APP_NAME, MessageBox.ERROR_MESSAGE);
    }
  }