From: <ai...@us...> - 2010-11-02 17:21:16
|
Revision: 11301 http://plplot.svn.sourceforge.net/plplot/?rev=11301&view=rev Author: airwin Date: 2010-11-02 17:21:08 +0000 (Tue, 02 Nov 2010) Log Message: ----------- Complete comments styling for our Java code. This work combined with our previous work for C and C++ comments styling completes all planned comments styling upgrades for PLplot. Modified Paths: -------------- trunk/bindings/java/PLStream.java trunk/examples/java/x01.java trunk/examples/java/x02.java trunk/examples/java/x03.java trunk/examples/java/x04.java trunk/examples/java/x05.java trunk/examples/java/x06.java trunk/examples/java/x07.java trunk/examples/java/x08.java trunk/examples/java/x09.java trunk/examples/java/x10.java trunk/examples/java/x11.java trunk/examples/java/x12.java trunk/examples/java/x13.java trunk/examples/java/x14.java trunk/examples/java/x15.java trunk/examples/java/x16.java trunk/examples/java/x17.java trunk/examples/java/x18.java trunk/examples/java/x19.java trunk/examples/java/x20.java trunk/examples/java/x21.java trunk/examples/java/x22.java trunk/examples/java/x23.java trunk/examples/java/x24.java trunk/examples/java/x25.java trunk/examples/java/x26.java trunk/examples/java/x27.java trunk/examples/java/x28.java trunk/examples/java/x29.java Modified: trunk/bindings/java/PLStream.java =================================================================== --- trunk/bindings/java/PLStream.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/bindings/java/PLStream.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,4 +1,4 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // // Copyright (C) 2004 Andrew Ross // Modified: trunk/examples/java/x01.java =================================================================== --- trunk/examples/java/x01.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x01.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -23,11 +23,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 1 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -288,6 +288,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x01.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x02.java =================================================================== --- trunk/examples/java/x02.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x02.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2002 Alan W. Irwin // Copyright (C) 2004,2005 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 2 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -177,6 +177,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x02.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x03.java =================================================================== --- trunk/examples/java/x03.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x03.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 3 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -134,6 +134,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x03.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x04.java =================================================================== --- trunk/examples/java/x04.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x04.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 4 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -130,6 +130,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x04.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x05.java =================================================================== --- trunk/examples/java/x05.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x05.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 5 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -73,6 +73,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x05.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x06.java =================================================================== --- trunk/examples/java/x06.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x06.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 6 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -121,6 +121,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x06.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x07.java =================================================================== --- trunk/examples/java/x07.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x07.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2001 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 7 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -118,6 +118,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x07.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x08.java =================================================================== --- trunk/examples/java/x08.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x08.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002, 2003, 2004 Alan W. Irwin // Copyright (C) 2002 Maurice LeBrun @@ -23,11 +23,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 8 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -81,8 +81,8 @@ } else { - h[0] = 240; /* blue -> green -> yellow -> */ - h[1] = 0; /* -> red */ + h[0] = 240; // blue -> green -> yellow -> + h[1] = 0; // -> red l[0] = 0.6; l[1] = 0.6; @@ -155,11 +155,11 @@ { z[i][j] = Math.pow( 1. - xx, 2. ) + 100 * Math.pow( yy - Math.pow( xx, 2. ), 2. ); - /* The log argument may be zero for just the right grid. */ + // The log argument may be zero for just the right grid. if ( z[i][j] > 0. ) z[i][j] = Math.log( z[i][j] ); else - z[i][j] = -5.; /* -MAXFLOAT would mess-up up the scale */ + z[i][j] = -5.; // -MAXFLOAT would mess-up up the scale } else { @@ -200,24 +200,24 @@ pls.col0( 2 ); - if ( ifshade == 0 ) /* diffuse light surface plot */ + if ( ifshade == 0 ) // diffuse light surface plot { cmap1_init( 1 ); // with new interface haven't yet made null work so have // to put in specific zero-length array. pls.surf3d( x, y, z, 0, clev_null ); } - else if ( ifshade == 1 ) /* magnitude colored plot */ + else if ( ifshade == 1 ) // magnitude colored plot { cmap1_init( 0 ); pls.surf3d( x, y, z, PLStream.MAG_COLOR, clev_null ); } - else if ( ifshade == 2 ) /* magnitude colored plot with faceted squares */ + else if ( ifshade == 2 ) // magnitude colored plot with faceted squares { cmap1_init( 0 ); pls.surf3d( x, y, z, PLStream.MAG_COLOR | PLStream.FACETED, clev_null ); } - else /* magnitude colored plot with contours */ + else // magnitude colored plot with contours { cmap1_init( 0 ); pls.surf3d( x, y, z, PLStream.MAG_COLOR | PLStream.SURF_CONT | PLStream.BASE_CONT, clevel ); @@ -229,6 +229,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x08.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x09.java =================================================================== --- trunk/examples/java/x09.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x09.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001, 2002 Geoffrey Furnish // Copyright (C) 2002, 2003 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 9 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -88,11 +88,11 @@ // Parse and process command line arguments. pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM ); - /* Initialize plplot */ + // Initialize plplot pls.init(); - /* Set up function arrays */ + // Set up function arrays for ( i = 0; i < XPTS; i++ ) { @@ -105,7 +105,7 @@ } } - /* Set up grids */ + // Set up grids for ( i = 0; i < XPTS; i++ ) @@ -137,17 +137,17 @@ // Plot using scaled identity transform used to create xg0 and yg0 -/* pls.setcontlabelparam(0.006, 0.3, 0.1, 0); - * pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); - * pls.col0(2); - * pls.cont( z, 1, XPTS, 1, YPTS, clevel, xg0, yg0 ); - * pls.styl(mark, space); - * pls.col0(3); - * pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg0, yg0 ); - * pls.styl(mark0, space0); - * pls.col0(1); - * pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); - */ +// pls.setcontlabelparam(0.006, 0.3, 0.1, 0); +// pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); +// pls.col0(2); +// pls.cont( z, 1, XPTS, 1, YPTS, clevel, xg0, yg0 ); +// pls.styl(mark, space); +// pls.col0(3); +// pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg0, yg0 ); +// pls.styl(mark0, space0); +// pls.col0(1); +// pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); +// pls.setcontlabelformat( 4, 3 ); pls.setcontlabelparam( 0.006, 0.3, 0.1, 1 ); pls.env( -1.0, 1.0, -1.0, 1.0, 0, 0 ); @@ -172,18 +172,18 @@ pls.col0( 1 ); pls.lab( "X Coordinate", "Y Coordinate", "Streamlines of flow" ); -/* pls.setcontlabelparam(0.006, 0.3, 0.1, 1); - * pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); - * pls.col0(2); - * pls.cont(z, 1, XPTS, 1, YPTS, clevel, xg1, yg1 ); - * pls.styl(mark, space); - * pls.col0(3); - * pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg1, yg1 ); - * pls.styl(mark0, space0); - * pls.col0(1); - * pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); - * pls.setcontlabelparam(0.006, 0.3, 0.1, 0); - */ +// pls.setcontlabelparam(0.006, 0.3, 0.1, 1); +// pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); +// pls.col0(2); +// pls.cont(z, 1, XPTS, 1, YPTS, clevel, xg1, yg1 ); +// pls.styl(mark, space); +// pls.col0(3); +// pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg1, yg1 ); +// pls.styl(mark0, space0); +// pls.col0(1); +// pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); +// pls.setcontlabelparam(0.006, 0.3, 0.1, 0); +// // Plot using 2d coordinate transform pls.env( -1.0, 1.0, -1.0, 1.0, 0, 0 ); pls.col0( 2 ); @@ -195,28 +195,28 @@ pls.col0( 1 ); pls.lab( "X Coordinate", "Y Coordinate", "Streamlines of flow" ); -/* pls.setcontlabelparam(0.006, 0.3, 0.1, 1); - * pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); - * pls.col0(2); - * pls.cont(z, 1, XPTS, 1, YPTS, clevel, xg2, yg2 ); - * pls.styl(mark, space); - * pls.col0(3); - * pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg2, yg2 ); - * pls.styl(mark0, space0); - * pls.col0(1); - * pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); - * pls.setcontlabelparam(0.006, 0.3, 0.1, 0); - */ +// pls.setcontlabelparam(0.006, 0.3, 0.1, 1); +// pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); +// pls.col0(2); +// pls.cont(z, 1, XPTS, 1, YPTS, clevel, xg2, yg2 ); +// pls.styl(mark, space); +// pls.col0(3); +// pls.cont(w, 1, XPTS, 1, YPTS, clevel, xg2, yg2 ); +// pls.styl(mark0, space0); +// pls.col0(1); +// pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); +// pls.setcontlabelparam(0.006, 0.3, 0.1, 0); +// polar(); -/* pls.setcontlabelparam(0.006, 0.3, 0.1, 1); - * polar(); - * pls.setcontlabelparam(0.006, 0.3, 0.1, 0); - */ +// pls.setcontlabelparam(0.006, 0.3, 0.1, 1); +// polar(); +// pls.setcontlabelparam(0.006, 0.3, 0.1, 0); +// potential(); -/* pls.setcontlabelparam(0.006, 0.3, 0.1, 1); - * potential(); - * pls.setcontlabelparam(0.006, 0.3, 0.1, 0); - */ +// pls.setcontlabelparam(0.006, 0.3, 0.1, 1); +// potential(); +// pls.setcontlabelparam(0.006, 0.3, 0.1, 0); +// pls.end(); } @@ -375,14 +375,14 @@ zmin = fmin; zmax = fmax; - /* printf("%.15g %.15g %.15g %.15g %.15g %.15g %.15g %.15g \n", - * q1, d1, q1i, d1i, q2, d2, q2i, d2i); - * System.out.println(xmin); - * System.out.println(xmax); - * System.out.println(ymin); - * System.out.println(ymax); - * System.out.println(zmin); - * System.out.println(zmax); */ + // printf("%.15g %.15g %.15g %.15g %.15g %.15g %.15g %.15g \n", + // q1, d1, q1i, d1i, q2, d2, q2i, d2i); + // System.out.println(xmin); + // System.out.println(xmax); + // System.out.println(ymin); + // System.out.println(ymax); + // System.out.println(zmin); + // System.out.println(zmax); // Positive and negative contour levels. dz = ( zmax - zmin ) / (double) PNLEVEL; @@ -448,6 +448,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x09.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x10.java =================================================================== --- trunk/examples/java/x10.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x10.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 10 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -63,6 +63,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x10.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x11.java =================================================================== --- trunk/examples/java/x11.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x11.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002, 2003 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 11 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -61,8 +61,8 @@ i[0] = 0.0; // left boundary i[1] = 1.0; // right boundary - h[0] = 240; /* blue -> green -> yellow -> */ - h[1] = 0; /* -> red */ + h[0] = 240; // blue -> green -> yellow -> + h[1] = 0; // -> red l[0] = 0.6; l[1] = 0.6; @@ -123,7 +123,7 @@ z[i][j] = 3. * ( 1. - xx ) * ( 1. - xx ) * Math.exp( -( xx * xx ) - ( yy + 1. ) * ( yy + 1. ) ) - 10. * ( xx / 5. - Math.pow( xx, 3. ) - Math.pow( yy, 5. ) ) * Math.exp( -xx * xx - yy * yy ) - 1. / 3. * Math.exp( -( xx + 1 ) * ( xx + 1 ) - ( yy * yy ) ); - if ( false ) /* Jungfraujoch/Interlaken */ + if ( false ) // Jungfraujoch/Interlaken { if ( z[i][j] < -1. ) z[i][j] = -1.; @@ -157,19 +157,19 @@ pls.col0( 2 ); - /* wireframe plot */ + // wireframe plot if ( i == 0 ) pls.mesh( x, y, z, opt[k] ); - /* magnitude colored wireframe plot */ + // magnitude colored wireframe plot else if ( i == 1 ) pls.mesh( x, y, z, opt[k] | PLStream.MAG_COLOR ); - /* magnitude colored wireframe plot with sides */ + // magnitude colored wireframe plot with sides else if ( i == 2 ) pls.plot3d( x, y, z, opt[k] | PLStream.MAG_COLOR, true ); - /* magnitude colored wireframe plot with base contour */ + // magnitude colored wireframe plot with base contour else if ( i == 3 ) pls.meshc( x, y, z, opt[k] | PLStream.MAG_COLOR | PLStream.BASE_CONT, clevel ); @@ -184,6 +184,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x11.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x12.java =================================================================== --- trunk/examples/java/x12.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x12.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 12 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -106,6 +106,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x12.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x13.java =================================================================== --- trunk/examples/java/x13.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x13.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2001, 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 13 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -109,6 +109,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x13.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x14.java =================================================================== --- trunk/examples/java/x14.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x14.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2004 Alan W. Irwin // Copyright (C) 2004 Andrew Ross // @@ -22,11 +22,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 14 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -383,7 +383,7 @@ final int[] mark0 = {}; final int[] space0 = {}; - /* Set up function arrays */ + // Set up function arrays for ( i = 0; i < XPTS; i++ ) { @@ -396,7 +396,7 @@ } } - /* Set up grids */ + // Set up grids for ( i = 0; i < XPTS; i++ ) @@ -433,6 +433,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x14.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x15.java =================================================================== --- trunk/examples/java/x15.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x15.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001, 2002 Geoffrey Furnish // Copyright (C) 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 15 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -132,7 +132,7 @@ pls.vpor( 0.1, 0.9, 0.1, 0.9 ); pls.wind( -1.0, 1.0, -1.0, 1.0 ); - /* Plot using identity transform */ + // Plot using identity transform shade_min = zmin + ( zmax - zmin ) * 0.4; shade_max = zmin + ( zmax - zmin ) * 0.6; @@ -178,7 +178,7 @@ pls.vpor( 0.1, 0.9, 0.1, 0.9 ); pls.wind( -1.0, 1.0, -1.0, 1.0 ); - /* Plot using identity transform */ + // Plot using identity transform for ( i = 0; i < 10; i++ ) { @@ -234,6 +234,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x15.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x16.java =================================================================== --- trunk/examples/java/x16.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x16.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 16 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -318,7 +318,7 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x16.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x17.java =================================================================== --- trunk/examples/java/x17.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x17.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2004 Andrew Ross <an...@co...> // Copyright (C) 2004 Alan W. Irwin // @@ -20,11 +20,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 17 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -174,6 +174,6 @@ } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x17.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x18.java =================================================================== --- trunk/examples/java/x18.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x18.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // Copyright (C) 2002 Alan W. Irwin // Copyright (C) 2004 Andrew Ross @@ -21,11 +21,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 18 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -181,6 +181,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x18.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x19.java =================================================================== --- trunk/examples/java/x19.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x19.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2001 Geoffrey Furnish // // This file is part of PLplot. @@ -19,11 +19,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 19 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- package plplot.examples; @@ -100,7 +100,7 @@ } if ( axis == PLStream.PL_Y_AXIS && value == 0.0 ) { - /* A special case for the equator */ + // A special case for the equator label = direction_label; } else @@ -237,6 +237,6 @@ } } -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // End of x19.java -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- Modified: trunk/examples/java/x20.java =================================================================== --- trunk/examples/java/x20.java 2010-11-02 17:16:33 UTC (rev 11300) +++ trunk/examples/java/x20.java 2010-11-02 17:21:08 UTC (rev 11301) @@ -1,8 +1,8 @@ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // $Id$ -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Copyright (C) 2004,2006 Andrew Ross // Copyright (C) 2004 Alan W. Irwin // @@ -20,11 +20,11 @@ // You should have received a copy of the GNU Library General Public License // along with PLplot; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // Implementation of PLplot example 20 in Java. -//---------------------------------------------------------------------------// +//-------------------------------------------------------------------------- // // Current user defined command line options are not supported in @@ -115,15 +115,15 @@ double xg[][], yg[][]; - /* - * Bugs in plimage(): - * -at high magnifications, the left and right edge are ragged, try - * ./x20c -dev xwin -wplt 0.3,0.3,0.6,0.6 -ori 0.5 - * - * Bugs in x20c.c: - * -if the window is resized after a selection is made on "lena", when - * making a new selection the old one will re-appear. - */ + // + // Bugs in plimage(): + // -at high magnifications, the left and right edge are ragged, try + // ./x20c -dev xwin -wplt 0.3,0.3,0.6,0.6 -ori 0.5 + // + // Bugs in x20c.c: + // -if the window is resized after a selection is made on "lena", when + // making a new selection the old one will re-appear. + // // plplot initialization @@ -134,21 +134,21 @@ // Initialize PLplot. pls.init(); - /* view image border pixels */ + // view image border pixels if ( dbg ) { - pls.env( 1., (double) XDIM, 1., (double) YDIM, 1, 1 ); /* no plot box */ + pls.env( 1., (double) XDIM, 1., (double) YDIM, 1, 1 ); // no plot box - /* build a one pixel square border, for diagnostics */ + // build a one pixel square border, for diagnostics for ( i = 0; i < XDIM; i++ ) - z[i][YDIM - 1] = 1.; /* right */ + z[i][YDIM - 1] = 1.; // right for ( i = 0; i < XDIM; i++ ) - z[i][0] = 1.; /* left */ + z[i][0] = 1.; // left for ( i = 0; i < YDIM; i++ ) - z[0][i] = 1.; /* top */ + z[0][i] = 1.; // top for ( i = 0; i < YDIM; i++ ) - z[XDIM - 1][i] = 1.; /* botton */ + z[XDIM - 1][i] = 1.; // botton pls.lab( "...around a blue square.", " ", "A red border should appear..." ); @@ -156,11 +156,11 @@ 1., (double) XDIM, 1., (double) YDIM ); } - /* sombrero-like demo */ + // sombrero-like demo if ( !nosombrero ) { r = new double[XDIM][YDIM]; - pls.col0( 2 ); /* draw a yellow plot box, useful for diagnostics! :( */ + pls.col0( 2 ); // draw a yellow plot box, useful for diagnostics! :( pls.env( 0., 2. * Math.PI, 0, 3. * Math.PI, 1, -1 ); for ( i = 0; i < XDIM; i++ ) @@ -180,13 +180,13 @@ pls.image( z, 0., 2. * Math.PI, 0., 3. * Math.PI, 0.05, 1., 0., 2. * Math.PI, 0., 3. * Math.PI ); - /* save the plot */ + // save the plot if ( f_name != null ) save_plot( f_name ); } - /* read Lena image */ + // read Lena image if ( ( img_f = read_img( "lena.pgm", n ) ) == null ) { if ( ( img_f = read_img( "../lena.pgm", n ) ) == null ) @@ -200,10 +200,10 @@ width = img_f.length; height = img_f[0].length; - /* set gray colormap */ + // set gray colormap gray_cmap( num_col ); - /* display Lena */ + // display Lena pls.env( 1., width, 1., height, 1, -1 ); if ( !nointeractive ) @@ -226,25 +226,25 @@ System.exit( 0 ); } - /* - * I'm unable to continue, clearing the plot and advancing to the next - * one, without hiting the enter key, or pressing the button... help! - * - * Forcing the xwin driver to leave locate mode and destroying the - * xhairs (in GetCursorCmd()) solves some problems, but I still have - * to press the enter key or press Button-2 to go to next plot, even - * if a pladv() is not present! Using plbop() solves the problem, but - * it shouldn't be needed! - */ + // + // I'm unable to continue, clearing the plot and advancing to the next + // one, without hiting the enter key, or pressing the button... help! + // + // Forcing the xwin driver to leave locate mode and destroying the + // xhairs (in GetCursorCmd()) solves some problems, but I still have + // to press the enter key or press Button-2 to go to next plot, even + // if a pladv() is not present! Using plbop() solves the problem, but + // it shouldn't be needed! + // - /* pls.bop(); */ + // pls.bop(); - /* - * spause(false), adv(0), spause(true), also works, - * but the above question remains. - * With this approach, the previous pause state is lost, - * as there is no API call to get its current state. - */ + // + // spause(false), adv(0), spause(true), also works, + // but the above question remains. + // With this approach, the previous pause state is lost, + // as there is no API call to get its current state. + // pls.spause( false ); pls.adv( 0 ); @@ -296,11 +296,11 @@ dy = 0.5 * height; stretch = 0.5; - /* In C / C++ the following would work, with plimagefr directly calling - * mypltr. For compatibilty with other language bindings the same effect - * can be achieved by generating the transformed grid first and then - * using pltr2. */ - /* plimagefr(img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, mypltr, (PLPointer) &stretch); */ + // In C / C++ the following would work, with plimagefr directly calling + // mypltr. For compatibilty with other language bindings the same effect + // can be achieved by generating the transformed grid first and then + // using pltr2. + // plimagefr(img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, mypltr, (PLPointer) &stretch); for ( i = 0; i <= width; i++ ) { @@ -326,7 +326,7 @@ StringTokenizer st; int i, j, w, h; - /* naive grayscale binary ppm reading. If you know how to, improve it */ + // naive grayscale binary ppm reading. If you know how to, improve it try { in = new BufferedReader( new FileReader( fname ) ); in2 = new DataInputStream( new DataInputStream( new BufferedInputStream( new FileInputStream( fname ) ) ) ); @@ -339,7 +339,7 @@ try { line = in.readLine(); - if ( line.compareTo( "P5\n" ) == 0 ) /* I only understand this! */ + if ( line.compareTo( "P5\n" ) == 0 ) // I only understand this! { System.out.println( line ); System.out.println( "unknown file format " + fname ); @@ -400,9 +400,9 @@ boolean start = false; boolean[] st = new boolean[1]; - pls.xormod( true, st ); /* enter xor mode to draw a selection rectangle */ ... [truncated message content] |