+ ((JTextArea) ((JScrollPane) jobPanes.get(which)).getViewport()
+ .getComponent(0)).append(text);
+ }
+ }
+
+ /**
+ * setProgressText(0, text)
+ */
+ public void setProgressText(String text)
+ {
+ setProgressText(0, text);
+ }
+
+ /**
+ * appendProgressText(0, text)
+ */
+ public void appendProgressText(String text)
+ {
+ appendProgressText(0, text);
+ }
+
+ /**
+ * getProgressText(0)
+ */
+ public String getProgressText()
+ {
+ return getProgressText(0);
+ }
+
+ /**
+ * get the tab title for a subjob
+ *
+ * @param which
+ * int
+ * @return String
+ */
+ public String getProgressName(int which)
+ {
+ if (jobPanes == null)
+ {
+ addJobPane();
+ }
+ if (subjobs != null)
+ {
+ return subjobs.getTitleAt(which);
+ }
+ else
+ {
+ return ((JScrollPane) jobPanes.get(which)).getViewport()
+ .getComponent(0).getName();
+ }
+ }
+
+ /**
+ * set the tab title for a subjob
+ *
+ * @param name
+ * String
+ * @param which
+ * int
+ */
+ public void setProgressName(String name, int which)
+ {
+ if (subjobs != null)
+ {
+ subjobs.setTitleAt(which, name);
+ subjobs.revalidate();
+ subjobs.repaint();
+ }
+ JScrollPane c = (JScrollPane) jobPanes.get(which);
+ c.getViewport().getComponent(0).setName(name);
+ c.repaint();
+ }
+
+ /**
+ * Gui action for cancelling the current job, if possible.
+ *
+ * @param e
+ * DOCUMENT ME!
+ */
+ @Override
+ protected void cancel_actionPerformed(ActionEvent e)
+ {
+ if (!serviceIsCancellable)
+ {
+ // JBPNote : TODO: We should REALLY just tell the WSClientI to cancel
+ // anyhow - it has to stop threads and clean up
+ // JBPNote : TODO: Instead of a warning, we should have an optional 'Are
+ // you sure?' prompt
+ warnUser(
+ MessageManager.getString(
+ "warn.job_cannot_be_cancelled_close_window"),
+ MessageManager.getString("action.cancel_job"));
+ }
+ else
+ {
+ thisService.cancelJob();
+ }
+ frame.setClosable(true);
+ }
+
+ /**
+ * Spawns a thread that pops up a warning dialog box with the given message
+ * and title.
+ *
+ * @param message
+ * @param title
+ */
+ public void warnUser(final String message, final String title)
+ {
+ javax.swing.SwingUtilities.invokeLater(new Runnable()
+ {
+ @Override
+ public void run()