/* * Print the action sequence (Probably) to the printer */ public void actionPrint(PrintWriter ps) { int i = 0; ps.println("Stepper - action sequence"); ps.println("Task ID - " + curTask); ps.println(); ListIterator li = actionSequence.listIterator(); while (li.hasNext()) { i++; oclPredicate pred = (oclPredicate) li.next(); ps.println(i + ": " + pred.toString()); } }
/** print action text */ private void jbn_PrintActionPerformed() { String header = "Gipo - Domain [" + curDomain.getName() + "] Author [" + curDomain.getAuthor() + "]"; HardcopyWriter hw; try { hw = new HardcopyWriter(owner, header, 10, .75, .5, .75, .5); } catch (HardcopyWriter.PrintCanceledException e) { JOptionPane.showMessageDialog( this, "Error Printing Action Sequence.", "GIPO Error", JOptionPane.ERROR_MESSAGE, null); return; } // Send output to it through a PrintWriter stream PrintWriter out = new PrintWriter(hw); actionPrint(out); out.close(); }