<< Chapter < Page
  Digital signal processing - dsp     Page 9 / 27
Chapter >> Page >

(The two pages in Figure 5 were manually arranged as shown before capturing the screen shot to emphasize the transition of the data from onepage to the next. The large white rectangles in Figure 5 are the result of removing the background clutter in the image caused by icons on thedesktop.)

Proper locations for awt frame under winxp

These specific values and the locations in the data where they are placed provide visible confirmation that the transitions mentioned above are handledcorrectly by the plotting object. These are the correct locations for an AWT Frame object for Java running under WinXP. Note however that a Frame may have different inset values (border widths) under other operating systems, which may cause these specific locations to fail to match up for that operating system. In that case, thevalues will be plotted but they won't necessarily occur at the same physical locations in order to confirm the proper transition.

(They also match up properly for the Windows 7 Classic scheme, but not for the other Windows 7 themes.)

Information about plotting parameters

Information about the plotting parameters for each plotting object is displayed on the command line screen when this class is used for plotting. Thevalues shown below result from the execution of the main method of the PlotALot01 class for self-test purposes. One of the plotting objects instantiated by the main method is titled "A" and the other is titled "B" .

null

The graphic output produced for the object titled "A" is shown in Figure 5 . This output was based on plotting format parameters that were passed to theconstructor. The graphic output produced for the object titled "B" is shown in Figure 1 . This output was based on default plotting parameters.

Overloaded plotdata method

There are two overloaded versions of the plotData method. One version allows the user to specify the location on the screen where thestack of plotted pages will appear. This version requires two parameters, which are coordinate values in pixels. The first parameter specifies the horizontalcoordinate of the upper left corner of the stack of pages relative to the upper left corner of the screen. The second parameter specifies the verticalcoordinate of the upper left corner of the stack of pages relative to the upper left corner of the screen.

(Specifying coordinate values of 0,0 causes the stack to be located in the upper left corner of the screen. Positive vertical coordinatesprogress down the screen.)

The other overloaded version of plotData places the stack of pages in the upper left corner of the screen by default.

A windowlistener for program termination

Each page has a WindowListener that will terminate the program if the user clicks the close button on the Frame (the X-button in the upper-right corner) .

J2se 5.0 is required

The class was tested using J2SE 5.0 and WinXP. J2SE 5.0 is required because the class uses generics with an ArrayList object. (More recently, it was re-tested using java version "1.8.0_60" under Windows 7.)

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing - dsp' conversation and receive update notifications?

Ask