Graphics Reference
In-Depth Information
Figure . . Classes of panels for drawing
Buffered method. We can implement them ourselves using thread programming
and the BufferedImage classinAWT.Inthe JasplotPanelPalette-
LayerUI class, we define PlotImage to create the buffered image using a thread,
and then draw it using the drawImage method of the Graphics2D object.
Classes for Interactive Operations
17.3.7
Wecurrentlymainlyuseamousetoindicategraphicsoperationstothesystem.Mouse
eventshavetobedetected,forexample,tocheckwhetherthemousebuttonispressed
or released. he system should then interpret what the user wishes to achieve with
that mouse operation. As a mouse can be operated in a limited number of ways, and
we wish to use them to send many commands to the system, one mouse operation
will have several meanings depending on the context. For example, when we specify
a rectangular area on a graphics, we may wish to select observations inside the area,
orwemaywishtozoominsidethearea.
We require different selection methods for different graphics. When selecting ob-
servations in a scatterplot, a rectangular selector may be the most natural. It is desir-
able to draw a rectangular selector on a scatterplot and to select observations inside
the selector, and to be able to drag the selector to change the selected observations
interactively. Clicking a mouse button on the bin of a histogram may be the natural
waytoselectit.Arectangular selectorisalso usefultoselectseveral neighboring bins
in a histogram.
We also know that linked views or linked highlighting and linked brushing are
important in interactive operations for statistical graphics.
Search WWH ::




Custom Search