Logo Search packages:      
Sourcecode: wims version File versions

void ptolemy::plot::PlotBox::_drawPoint ( Graphics  graphics,
int  dataset,
long  xpos,
long  ypos,
boolean  clip 
) [inline, protected]

Put a mark corresponding to the specified dataset at the specified x and y position. The mark is drawn in the current color. In this base class, a point is a filled rectangle 6 pixels across. Note that marks greater than about 6 pixels in size will not look very good since they will overlap axis labels and may not fit well in the legend. The clip argument, if true, states that the point should not be drawn if it is out of range.

Note that this method is not synchronized, so the caller should be. Moreover this method should always be called from the event thread when being used to write to the screen.

graphics The graphics context.
dataset The index of the data set.
xpos The X position.
ypos The Y position.
clip If true, do not draw if out of range.

Reimplemented in ptolemy::plot::Plot.

Definition at line 2524 of file PlotBox.java.

References _lrx, _ulx, and _uly.

        // Ignore if there is no graphics object to draw on.
        if (graphics == null) {

        boolean pointinside = (ypos <= _lry) && (ypos >= _uly)
                && (xpos <= _lrx) && (xpos >= _ulx);

        if (!pointinside && clip) {

        graphics.fillRect((int) xpos - 6, (int) ypos - 6, 6, 6);

Generated by  Doxygen 1.6.0   Back to index