Logo Search packages:      
Sourcecode: wims version File versions

void ptolemy::plot::PlotBox::_writeOldSyntax ( PrintWriter  output  )  [inline, protected]

Write plot information to the specified output stream in the old PtPlot syntax. Derived classes should override this method to first call the parent class method, then add whatever additional information they wish to add to the stream. It is not synchronized, so its caller should be.

Parameters:
output A buffered print writer.
Deprecated:

Reimplemented in ptolemy::plot::Plot.

Definition at line 2716 of file PlotBox.java.

References _grid, _title, _usecolor, _wrap, _xhighgiven, _xlabel, _xlog, _xlowgiven, _xticklabels, _xticks, _yhighgiven, _ylabel, _ylog, _ylowgiven, _yticklabels, and _yticks.

Referenced by writeOldSyntax().

                                                       {
        output.println("# Ptolemy plot, version 2.0");

        if (_title != null) {
            output.println("TitleText: " + _title);
        }

        if (_xlabel != null) {
            output.println("XLabel: " + _xlabel);
        }

        if (_ylabel != null) {
            output.println("YLabel: " + _ylabel);
        }

        if (_xRangeGiven) {
            output.println("XRange: " + _xlowgiven + ", " + _xhighgiven);
        }

        if (_yRangeGiven) {
            output.println("YRange: " + _ylowgiven + ", " + _yhighgiven);
        }

        if ((_xticks != null) && (_xticks.size() > 0)) {
            output.print("XTicks: ");

            int last = _xticks.size() - 1;

            for (int i = 0; i < last; i++) {
                output.print("\"" + (String) _xticklabels.elementAt(i) + "\" "
                        + _xticks.elementAt(i) + ", ");
            }

            output.println("\"" + (String) _xticklabels.elementAt(last) + "\" "
                    + _xticks.elementAt(last));
        }

        if ((_yticks != null) && (_yticks.size() > 0)) {
            output.print("YTicks: ");

            int last = _yticks.size() - 1;

            for (int i = 0; i < last; i++) {
                output.print("\"" + (String) _yticklabels.elementAt(i) + "\" "
                        + _yticks.elementAt(i) + ", ");
            }

            output.println("\"" + (String) _yticklabels.elementAt(last) + "\" "
                    + _yticks.elementAt(last));
        }

        if (_xlog) {
            output.println("XLog: on");
        }

        if (_ylog) {
            output.println("YLog: on");
        }

        if (!_grid) {
            output.println("Grid: off");
        }

        if (_wrap) {
            output.println("Wrap: on");
        }

        if (!_usecolor) {
            output.println("Color: off");
        }
    }


Generated by  Doxygen 1.6.0   Back to index