예제 #1
0
 public WaitingSetpTaskFrame(
     StepTaskObservable theWork, int maxStep, MessageWriter outputMessage) {
   super(0.90000000000000002D);
   goodJob = false;
   this.maxStep = 1;
   currentStep = 0;
   setSize(600, 300);
   setLocation(200, 200);
   setTitle(theWork.getDescription());
   addWindowListener(this);
   bottomPanel.removeAll();
   JPanel panelSud = new JPanel(new BorderLayout());
   progressBarTask = new JProgressBar(0, 100);
   progressBarJob = new JProgressBar(0, 100);
   if (maxStep == 1) {
     panelSud.add(progressBarJob, "Center");
   } else {
     panelSud.add(progressBarTask, "North");
     panelSud.add(progressBarJob, "South");
   }
   setBottomPanel(panelSud);
   work = theWork;
   work.setJobObserver(this);
   this.outputMessage = outputMessage;
   this.maxStep = maxStep;
   show();
 }
예제 #2
0
 public void windowClosing(WindowEvent arg0) {
   work.sendMessage(getTitle() + " ... CANCELED !\n");
   theThread.stop();
   dispose();
 }