Back to index

wims  3.65+svn20090927
Public Member Functions
ptolemy.plot.PlotBox.ButtonListener Class Reference
Inheritance diagram for ptolemy.plot.PlotBox.ButtonListener:
Inheritance graph
[legend]
Collaboration diagram for ptolemy.plot.PlotBox.ButtonListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void actionPerformed (ActionEvent event)

Detailed Description

Definition at line 4115 of file PlotBox.java.


Member Function Documentation

void ptolemy.plot.PlotBox.ButtonListener.actionPerformed ( ActionEvent  event) [inline]

Definition at line 4116 of file PlotBox.java.

                                                       {
            if (event.getSource() == _fillButton) {
                fillPlot();
            } else if (event.getSource() == _printButton) {
                // FIXME:  Code duplication with PlotFrame._printCrossPlatform
                PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                PrinterJob job = PrinterJob.getPrinterJob();

                // rbeyer@LPL.Arizona.EDU: Get the Page Format and use it.
                //PageFormat format = job.pageDialog(job.defaultPage());
                //job.setPrintable(PlotBox.this, format);
                job.setPrintable(PlotBox.this);

                if (job.printDialog(aset)) {
                    try {
                        job.print(aset);
                    } catch (Exception ex) {
                        Component ancestor = getTopLevelAncestor();
                        JOptionPane.showMessageDialog(ancestor,
                                "Printing failed:\n" + ex.toString(),
                                "Print Error", JOptionPane.WARNING_MESSAGE);
                    }
                }
            } else if (event.getSource() == _resetButton) {
                resetAxes();
            } else if (event.getSource() == _formatButton) {
                PlotFormatter fmt = new PlotFormatter(PlotBox.this);
                fmt.openModal();
            }
        }

Here is the call graph for this function:


The documentation for this class was generated from the following file: