Esempio n. 1
0
  private void saveRemrak() {
    Remark remark = new Remark();
    Timestamp currentTime = DateUtil.getCurrentTimeStamp();
    String text = txtTextField.getText();
    if (text != null && !text.isEmpty()) {
      remark.setText(text);
      remark.setDateTime(currentTime);
      remark.setCreatedBy(Application.getLoggedOnUser());
      remark.setPnr(this.pnr);

      task = new RemarkTask(remark, pnr.getId(), busyLabel);
      task.addPropertyChangeListener(this);
      task.execute();
    }
  }
Esempio n. 2
0
 @Override
 public void propertyChange(PropertyChangeEvent evt) {
   if ("progress".equals(evt.getPropertyName())) {
     int progress = (Integer) evt.getNewValue();
     if (progress == 100) {
       try {
         Remarks remarks = task.get();
         remarkslist = new ArrayList<>();
         remarkslist = remarks.getList();
         populateRemark();
       } catch (InterruptedException | ExecutionException ex) {
         Logger.getLogger(ComponentRemark.class.getName()).log(Level.SEVERE, null, ex);
       }
     }
   }
 }
Esempio n. 3
0
 public void load() {
   task = new RemarkTask(null, pnr.getId(), busyLabel);
   task.addPropertyChangeListener(this);
   task.execute();
 }