public void refresh() {
    Message message = new Message();
    try {
      message = this.trainingTeaBLService.showFrameStrategy();

    } catch (RemoteException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    if (message.getMesType().equals(MessageType.traTea_showStrategy_fail)) {
      // JOptionPane.showMessageDialog(this, "整体框架策略尚未发布!");
      jl1.setVisible(true);
      jb2.setEnabled(false);
      if (jsp1 != null) {
        jsp1.setVisible(false);
      }
    } else if (message.getMesType().equals(MessageType.traTea_showStrategy_success)) {
      jl1.setVisible(false);
      ArrayList<Dean> dean = message.getDeans();
      ArrayList<String> attriOfDean = message.getAttriOfDean();
      tm1 = new StrategyTableModel(dean, attriOfDean);
      if (jsp1 != null) {
        jt1.setModel(tm1);
        jsp1.setVisible(true);
      } else {
        jt1 = new JTable();
        jt1.setModel(tm1);

        jsp1 = new JScrollPane(jt1);
        strategy.add(jsp1);
      }

      if (dean.size() >= 15) {
        jb1.setEnabled(false);
      }

      jb2.setEnabled(true);

    } else {
      JOptionPane.showMessageDialog(this, "你的网络貌似有点问题!");
    }
  }
Esempio n. 2
0
 @Override
 public void recoitMessage(Message msg) {
   parseMsg(msg.getData());
 }