Logo Search packages:      
Sourcecode: wims version File versions  Download package

synchronized void ptolemy::plot::PlotBox::export ( OutputStream  out  )  [inline, inherited]

Export a description of the plot. Currently, only EPS is supported. But in the future, this may cause a dialog box to open to allow the user to select a format. If the argument is null, then the description goes to the clipboard. Otherwise, it goes to the specified file. To send it to standard output, use System.out as an argument.

out An output stream to which to send the description.

Definition at line 459 of file PlotBox.java.

References ptolemy::plot::PlotBox::_drawPlot(), ptolemy::plot::PlotBox::_height, ptolemy::plot::PlotBox::_width, and ptolemy::plot::EPSGraphics::showpage().

Referenced by ptolemy::plot::PlotFrame::_export().

        try {
            EPSGraphics g = new EPSGraphics(out, _width, _height);
            _drawPlot(g, false);
        } catch (RuntimeException ex) {
            String message = "Export failed: " + ex.getMessage();
            JOptionPane.showMessageDialog(this, message,
                    "Ptolemy Plot Message", JOptionPane.ERROR_MESSAGE);

            // Rethrow the exception so that we don't report success,
            // and so the stack trace is displayed on standard out.
            throw (RuntimeException) ex.fillInStackTrace();

Generated by  Doxygen 1.6.0   Back to index