Logo Search packages:      
Sourcecode: wims version File versions

synchronized void ptolemy::plot::PlotBox::writeFormat ( PrintWriter  output  )  [inline]

Write plot format information to the specified output stream in PlotML. Derived classes should override this method to first call the parent class method, then add whatever additional format information they wish to add to the stream.

Parameters:
output A buffered print writer.

Reimplemented in ptolemy::plot::Histogram, and ptolemy::plot::Plot.

Definition at line 1685 of file PlotBox.java.

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

Referenced by write().

                                                             {
        // NOTE: If you modify this, you should change the _DTD variable
        // accordingly.
        if (_title != null) {
            output.println("<title>" + _title + "</title>");
        }

        if (_xlabel != null) {
            output.println("<xLabel>" + _xlabel + "</xLabel>");
        }

        if (_ylabel != null) {
            output.println("<yLabel>" + _ylabel + "</yLabel>");
        }

        if (_xRangeGiven) {
            output.println("<xRange min=\"" + _xlowgiven + "\" max=\""
                    + _xhighgiven + "\"/>");
        }

        if (_yRangeGiven) {
            output.println("<yRange min=\"" + _ylowgiven + "\" max=\""
                    + _yhighgiven + "\"/>");
        }

        if ((_xticks != null) && (_xticks.size() > 0)) {
            output.println("<xTicks>");

            int last = _xticks.size() - 1;

            for (int i = 0; i <= last; i++) {
                output.println("  <tick label=\""
                        + (String) _xticklabels.elementAt(i) + "\" position=\""
                        + _xticks.elementAt(i) + "\"/>");
            }

            output.println("</xTicks>");
        }

        if ((_yticks != null) && (_yticks.size() > 0)) {
            output.println("<yTicks>");

            int last = _yticks.size() - 1;

            for (int i = 0; i <= last; i++) {
                output.println("  <tick label=\""
                        + (String) _yticklabels.elementAt(i) + "\" position=\""
                        + _yticks.elementAt(i) + "\"/>");
            }

            output.println("</yTicks>");
        }

        if (_xlog) {
            output.println("<xLog/>");
        }

        if (_ylog) {
            output.println("<yLog/>");
        }

        if (!_grid) {
            output.println("<noGrid/>");
        }

        if (_wrap) {
            output.println("<wrap/>");
        }

        if (!_usecolor) {
            output.println("<noColor/>");
        }
    }


Generated by  Doxygen 1.6.0   Back to index