• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

PLStream.java

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Copyright (C) 2004  Andrew Ross
00004 //
00005 // This file is part of PLplot.
00006 //
00007 // PLplot is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU Library General Public License as published
00009 // by the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011 //
00012 // PLplot is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU Library General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Library General Public License
00018 // along with PLplot; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020 //
00021 // This class provides a more object orientated wrapper to the PLplot library
00022 // for java. It is currently very similar to the C++ plstream class.
00023 // Each instance of the class corresponds to a plplot stream. Calling a
00024 // method in the class will ensure the stream is correctly set before
00025 // calling the underlying API function.
00026 //
00027 
00028 package plplot.core;
00029 
00030 import java.io.*;
00031 
00032 public class PLStream implements plplotjavacConstants {
00033 // Class data.
00034     int        stream_id = -1;
00035 
00036     static int active_streams = 0;
00037 
00038 // Constructor
00039     public PLStream()
00040     {
00041         int[] strm = new int[1];
00042 
00043         // If this is the first instance of the class we
00044         // need to load the C part of the bindings
00045         if ( active_streams == 0 )
00046         {
00047             openlib();
00048         }
00049 
00050         // Create stream and check it worked ok.
00051         plplotjavac.plmkstrm( strm );
00052         if ( strm[0] != -1 )
00053         {
00054             stream_id = strm[0];
00055             active_streams++;
00056         }
00057         else
00058         {
00059             System.err.println( "Error creating plplot stream" );
00060             stream_id = -1;
00061         }
00062     }
00063 
00064 // Ensure this is the current stream
00065     public int set_stream()
00066     {
00067         if ( ( stream_id == -1 ) || ( active_streams == 0 ) )
00068         {
00069             System.err.println( "Error: This stream is not active" );
00070             return -1;
00071         }
00072         plplotjavac.plsstrm( stream_id );
00073         return 0;
00074     }
00075 
00076 // Method to load the native C part of the java wrapper
00077     public void openlib()
00078     {
00079         File libname = null;
00080 
00081         try {
00082             String libdir = System.getProperty( "plplot.libdir" );
00083             libname = new File( libdir + File.separatorChar + plplot.core.config.libname );
00084             if ( !libname.exists() )
00085             {
00086                 libname = null;
00087             }
00088         } catch ( Exception e ) {
00089         }
00090         if ( libname == null )
00091         {
00092             libname = new File( plplot.core.config.libdir + File.separatorChar + plplot.core.config.libname );
00093             if ( !libname.exists() )
00094             {
00095                 libname = null;
00096             }
00097         }
00098         if ( libname != null )
00099         {
00100             try {
00101                 System.load( libname.getAbsolutePath() );
00102             } catch ( UnsatisfiedLinkError e ) {
00103                 System.err.println( "Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e );
00104                 System.exit( 1 );
00105             }
00106         }
00107         else
00108         {
00109             System.err.println( "Unable to find native code library.\n" );
00110             System.exit( 1 );
00111         }
00112     }
00113 
00114 // The following are wrappers to the C API methods, or their derivatives
00115 
00116     public void setcontlabelformat( int lexp, int sigdig )
00117     {
00118         if ( set_stream() == -1 ) return;
00119         plplotjavac.pl_setcontlabelformat( lexp, sigdig );
00120     }
00121 
00122     public void setcontlabelparam( double offset, double size, double spacing, int active )
00123     {
00124         if ( set_stream() == -1 ) return;
00125         plplotjavac.pl_setcontlabelparam( offset, size, spacing, active );
00126     }
00127 
00128     public void adv( int page )
00129     {
00130         if ( set_stream() == -1 ) return;
00131         plplotjavac.pladv( page );
00132     }
00133 
00134     public void arc( double x, double y, double a, double b, double angle1, double angle2, double rotate, boolean fill )
00135     {
00136         if ( set_stream() == -1 ) return;
00137         plplotjavac.plarc( x, y, a, b, angle1, angle2, rotate, fill );
00138     }
00139 
00140     public void axes( double x0, double y0, String xopt, double xtick, int nxsub,
00141                       String yopt, double ytick, int nysub )
00142     {
00143         if ( set_stream() == -1 ) return;
00144         plplotjavac.plaxes( x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub );
00145     }
00146 
00147     public void bin( double[] x, double[] y, int center )
00148     {
00149         if ( set_stream() == -1 ) return;
00150         plplotjavac.plbin( x, y, center );
00151     }
00152 
00153     public void bop()
00154     {
00155         if ( set_stream() == -1 ) return;
00156         plplotjavac.plbop();
00157     }
00158 
00159     public void box( String xopt, double xtick, int nxsub,
00160                      String yopt, double ytick, int nysub )
00161     {
00162         if ( set_stream() == -1 ) return;
00163         plplotjavac.plbox( xopt, xtick, nxsub, yopt, ytick, nysub );
00164     }
00165 
00166     public void box3( String xopt, String xlabel, double xtick, int nsubx,
00167                       String yopt, String ylabel, double ytick, int nsuby,
00168                       String zopt, String zlabel, double ztick, int nsubz )
00169     {
00170         if ( set_stream() == -1 ) return;
00171         plplotjavac.plbox3( xopt, xlabel, xtick, nsubx, yopt, ylabel, ytick, nsuby,
00172             zopt, zlabel, ztick, nsubz );
00173     }
00174 
00175     public void btime( int year[], int month[], int day[], int hour[], int min[], double sec[], double ctime )
00176     {
00177         if ( set_stream() == -1 ) return;
00178         plplotjavac.plbtime( year, month, day, hour, min, sec, ctime );
00179     }
00180 
00181     public void calc_world( double rx, double ry, double[] wx, double[] wy, int[] window )
00182     {
00183         if ( set_stream() == -1 ) return;
00184         plplotjavac.plcalc_world( rx, ry, wx, wy, window );
00185     }
00186 
00187     public void clear()
00188     {
00189         if ( set_stream() == -1 ) return;
00190         plplotjavac.plclear();
00191     }
00192 
00193     public void col0( int icol0 )
00194     {
00195         if ( set_stream() == -1 ) return;
00196         plplotjavac.plcol0( icol0 );
00197     }
00198 
00199     public void col1( double col1 )
00200     {
00201         if ( set_stream() == -1 ) return;
00202         plplotjavac.plcol1( col1 );
00203     }
00204 
00205     public void configtime( double scale, double offset1, double offset2,
00206                             int ccontrol, boolean ifbtime_offset, int year,
00207                             int month, int day, int hour, int min,
00208                             double sec )
00209     {
00210         if ( set_stream() == -1 ) return;
00211         plplotjavac.plconfigtime( scale, offset1, offset2, ccontrol, ifbtime_offset,
00212             year, month, day, hour, min, sec );
00213     }
00214 
00215     public void cont( double[][] f, int kx, int lx, int ky, int ly,
00216                       double[] clevel, double[][] pltr, double[][] OBJECT_DATA )
00217     {
00218         if ( set_stream() == -1 ) return;
00219         plplotjavac.plcont( f, kx, lx, ky, ly, clevel, pltr, OBJECT_DATA );
00220     }
00221 
00222     public void cpstrm( PLStream pls, boolean flags )
00223     {
00224         if ( set_stream() == -1 ) return;
00225         plplotjavac.plcpstrm( pls.stream_id, flags );
00226     }
00227 
00228     public void ctime( int year, int month, int day, int hour, int min, double sec, double ctime[] )
00229     {
00230         if ( set_stream() == -1 ) return;
00231         plplotjavac.plctime( year, month, day, hour, min, sec, ctime );
00232     }
00233 
00234 // The end / end1 functions have extra code in to keep track of the
00235 // stream references in the class.
00236     public void end()
00237     {
00238         if ( set_stream() == -1 ) return;
00239         plplotjavac.plend();
00240         active_streams = 0;
00241         stream_id      = -1;
00242     }
00243 
00244     public void end1()
00245     {
00246         if ( set_stream() == -1 ) return;
00247         plplotjavac.plend1();
00248 
00249         active_streams--;
00250         stream_id = -1;
00251     }
00252 
00253     public void env( double xmin, double xmax, double ymin, double ymax, int just, int axis )
00254     {
00255         if ( set_stream() == -1 ) return;
00256         plplotjavac.plenv( xmin, xmax, ymin, ymax, just, axis );
00257     }
00258 
00259     public void env0( double xmin, double xmax, double ymin, double ymax, int just, int axis )
00260     {
00261         if ( set_stream() == -1 ) return;
00262         plplotjavac.plenv0( xmin, xmax, ymin, ymax, just, axis );
00263     }
00264 
00265     public void eop()
00266     {
00267         if ( set_stream() == -1 ) return;
00268         plplotjavac.pleop();
00269     }
00270 
00271     public void errx( double[] xmin, double[] xmax, double[] y )
00272     {
00273         if ( set_stream() == -1 ) return;
00274         plplotjavac.plerrx( xmin, xmax, y );
00275     }
00276 
00277     public void erry( double[] x, double[] ymin, double[] ymax )
00278     {
00279         if ( set_stream() == -1 ) return;
00280         plplotjavac.plerry( x, ymin, ymax );
00281     }
00282 
00283     public void famadv()
00284     {
00285         if ( set_stream() == -1 ) return;
00286         plplotjavac.plfamadv();
00287     }
00288 
00289     public void fill( double[] x, double[] y )
00290     {
00291         if ( set_stream() == -1 ) return;
00292         plplotjavac.plfill( x, y );
00293     }
00294 
00295     public void fill3( double[] x, double[] y, double[] z )
00296     {
00297         if ( set_stream() == -1 ) return;
00298         plplotjavac.plfill3( x, y, z );
00299     }
00300 
00301     public void flush()
00302     {
00303         if ( set_stream() == -1 ) return;
00304         plplotjavac.plflush();
00305     }
00306 
00307     public void font( int ifont )
00308     {
00309         if ( set_stream() == -1 ) return;
00310         plplotjavac.plfont( ifont );
00311     }
00312 
00313     public void fontld( int fnt )
00314     {
00315         if ( set_stream() == -1 ) return;
00316         plplotjavac.plfontld( fnt );
00317     }
00318 
00319     public void gchr( double[] p_def, double[] p_ht )
00320     {
00321         if ( set_stream() == -1 ) return;
00322         plplotjavac.plgchr( p_def, p_ht );
00323     }
00324 
00325     public void gcol0( int icol0, int[] r, int[] g, int[] b )
00326     {
00327         if ( set_stream() == -1 ) return;
00328         plplotjavac.plgcol0( icol0, r, g, b );
00329     }
00330 
00331     public void gcol0a( int icol0, int[] r, int[] g, int[] b, double[] a )
00332     {
00333         if ( set_stream() == -1 ) return;
00334         plplotjavac.plgcol0a( icol0, r, g, b, a );
00335     }
00336 
00337     public void gcolbg( int[] r, int[] g, int[] b )
00338     {
00339         if ( set_stream() == -1 ) return;
00340         plplotjavac.plgcolbg( r, g, b );
00341     }
00342 
00343     public void gcolbga( int[] r, int[] g, int[] b, double[] a )
00344     {
00345         if ( set_stream() == -1 ) return;
00346         plplotjavac.plgcolbga( r, g, b, a );
00347     }
00348 
00349     public void gcompression( int[] compression )
00350     {
00351         if ( set_stream() == -1 ) return;
00352         plplotjavac.plgcompression( compression );
00353     }
00354 
00355     public void gdev( StringBuffer dev )
00356     {
00357         if ( set_stream() == -1 ) return;
00358         plplotjavac.plgdev( dev );
00359     }
00360 
00361     public void gdidev( double[] mar, double[] aspect, double[] jx, double[] jy )
00362     {
00363         if ( set_stream() == -1 ) return;
00364         plplotjavac.plgdidev( mar, aspect, jx, jy );
00365     }
00366 
00367     public void gdiori( double[] rot )
00368     {
00369         if ( set_stream() == -1 ) return;
00370         plplotjavac.plgdiori( rot );
00371     }
00372 
00373     public void gdiplt( double[] xmin, double[] xmax, double[] ymin, double[] ymax )
00374     {
00375         if ( set_stream() == -1 ) return;
00376         plplotjavac.plgdiplt( xmin, xmax, ymin, ymax );
00377     }
00378 
00379     public int getCursor( PLGraphicsIn gin )
00380     {
00381         if ( set_stream() == -1 ) return 0;
00382         return plplotjavac.plGetCursor( gin );
00383     }
00384 
00385     public void gfam( int[] fam, int[] num, int[]  bmax )
00386     {
00387         if ( set_stream() == -1 ) return;
00388         plplotjavac.plgfam( fam, num, bmax );
00389     }
00390 
00391     public void gfci( long[] pfci )
00392     {
00393         if ( set_stream() == -1 ) return;
00394         plplotjavac.plgfci( pfci );
00395     }
00396 
00397     public void gfnam( StringBuffer fnam )
00398     {
00399         if ( set_stream() == -1 ) return;
00400         plplotjavac.plgfnam( fnam );
00401     }
00402 
00403     public void gfont( int[] family, int[] style, int[] weight )
00404     {
00405         if ( set_stream() == -1 ) return;
00406         plplotjavac.plgfont( family, style, weight );
00407     }
00408 
00409     public void glevel( int[] p_level )
00410     {
00411         if ( set_stream() == -1 ) return;
00412         plplotjavac.plglevel( p_level );
00413     }
00414 
00415     public void gpage( double[] xp, double[] yp, int[] xleng, int[] yleng, int[] xoff, int[] yoff )
00416     {
00417         if ( set_stream() == -1 ) return;
00418         plplotjavac.plgpage( xp, yp, xleng, yleng, xoff, yoff );
00419     }
00420 
00421     public void gra()
00422     {
00423         if ( set_stream() == -1 ) return;
00424         plplotjavac.plgra();
00425     }
00426 
00427     public void gradient( double[] x, double[] y, double angle )
00428     {
00429         if ( set_stream() == -1 ) return;
00430         plplotjavac.plgradient( x, y, angle );
00431     }
00432 
00433     public void griddata( double[] x, double[] y, double[] z, double[] xg,
00434                           double[] yg, double[][] zg, int type, double data )
00435     {
00436         if ( set_stream() == -1 ) return;
00437         plplotjavac.plgriddata( x, y, z, xg, yg, zg, type, data );
00438     }
00439 
00440     public void gspa( double[] xmin, double[] xmax, double[] ymin, double[] ymax )
00441     {
00442         if ( set_stream() == -1 ) return;
00443         plplotjavac.plgspa( xmin, xmax, ymin, ymax );
00444     }
00445 
00446 // Note: The user should never need this in with this class
00447 // since the stream is encapsulated in the class.
00448 //public void gstrm(int[] p_strm) {
00449 //    if (set_stream() == -1) return;
00450 //    plplotjavac.plgstrm(p_strm);
00451 //}
00452 
00453     public void gver( StringBuffer ver )
00454     {
00455         if ( set_stream() == -1 ) return;
00456         plplotjavac.plgver( ver );
00457     }
00458 
00459     public void gvpd( double[] xmin, double[] xmax, double[] ymin, double[] ymax )
00460     {
00461         if ( set_stream() == -1 ) return;
00462         plplotjavac.plgvpd( xmin, xmax, ymin, ymax );
00463     }
00464 
00465     public void gvpw( double[] xmin, double[] xmax, double[] ymin, double[] ymax )
00466     {
00467         if ( set_stream() == -1 ) return;
00468         plplotjavac.plgvpw( xmin, xmax, ymin, ymax );
00469     }
00470 
00471     public void gxax( int[] digmax, int[] digits )
00472     {
00473         if ( set_stream() == -1 ) return;
00474         plplotjavac.plgxax( digmax, digits );
00475     }
00476 
00477     public void gyax( int[] digmax, int[] digits )
00478     {
00479         if ( set_stream() == -1 ) return;
00480         plplotjavac.plgyax( digmax, digits );
00481     }
00482 
00483     public void gzax( int[] digmax, int[] digits )
00484     {
00485         if ( set_stream() == -1 ) return;
00486         plplotjavac.plgzax( digmax, digits );
00487     }
00488 
00489     public void hist( double[] data, double datmin, double datmax, int nbin, int oldwin )
00490     {
00491         if ( set_stream() == -1 ) return;
00492         plplotjavac.plhist( data, datmin, datmax, nbin, oldwin );
00493     }
00494 
00495 // Officially deprecated.
00496 //public void hls(double h, double l, double s) {
00497 //    if (set_stream() == -1) return;
00498 //    plplotjavac.plhls(h, l, s);
00499 //}
00500 
00501     public void image( double[][] data, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double Dxmin, double Dxmax, double Dymin, double Dymax )
00502     {
00503         if ( set_stream() == -1 ) return;
00504         plplotjavac.plimage( data, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax );
00505     }
00506 
00507     public void imagefr( double[][] data, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double valuemin, double valuemax, double[][] pltr_im, double[][] OBJECT_DATA_im )
00508     {
00509         if ( set_stream() == -1 ) return;
00510         plplotjavac.plimagefr( data, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr_im, OBJECT_DATA_im );
00511     }
00512 
00513     public void init()
00514     {
00515         if ( set_stream() == -1 ) return;
00516         plplotjavac.plinit();
00517     }
00518 
00519     public void join( double x1, double y1, double x2, double y2 )
00520     {
00521         if ( set_stream() == -1 ) return;
00522         plplotjavac.pljoin( x1, y1, x2, y2 );
00523     }
00524 
00525     public void lab( String xlabel, String ylabel, String tlabel )
00526     {
00527         if ( set_stream() == -1 ) return;
00528         plplotjavac.pllab( xlabel, ylabel, tlabel );
00529     }
00530 
00531     public void legend( double[] p_legend_width, double[] p_legend_height,
00532                         int opt, int position, double x, double y, double plot_width,
00533                         int bg_color, int bb_color, int bb_style,
00534                         int nrow, int ncolumn, int[] opt_array,
00535                         double text_offset, double text_scale,
00536                         double text_spacing, double text_justification,
00537                         int[] text_colors, String[] text,
00538                         int[] box_colors, int[] box_patterns,
00539                         double[] box_scales, int[] box_line_widths,
00540                         int[] line_colors, int[] line_styles,
00541                         int[] line_widths,
00542                         int[] symbol_colors, double[] symbol_scales,
00543                         int[] symbol_numbers, String[] symbols )
00544     {
00545         if ( set_stream() == -1 ) return;
00546         plplotjavac.pllegend( p_legend_width, p_legend_height,
00547             opt, position, x, y, plot_width, bg_color, bb_color,
00548             bb_style, nrow, ncolumn, opt_array,
00549             text_offset, text_scale, text_spacing,
00550             text_justification, text_colors, text,
00551             box_colors, box_patterns, box_scales,
00552             box_line_widths, line_colors, line_styles,
00553             line_widths, symbol_colors, symbol_scales,
00554             symbol_numbers, symbols );
00555     }
00556 
00557     //
00558 //      public void colorbar( int opt, double x, double y, double length,
00559 //                            double width, double ticks, double subticks,
00560 //                            String axis_opts, String label,
00561 //                            double[] colors, double[] values )
00562 //      {
00563 //          if ( set_stream() == -1 ) return;
00564 //          plplotjavac.plcolorbar( opt, x, y, length, width, ticks, subticks,
00565 //              axis_opts, label, colors, values );
00566 //      }
00567 //
00568 
00569     public void lightsource( double x, double y, double z )
00570     {
00571         if ( set_stream() == -1 ) return;
00572         plplotjavac.pllightsource( x, y, z );
00573     }
00574 
00575     public void line( double[] x, double[] y )
00576     {
00577         if ( set_stream() == -1 ) return;
00578         plplotjavac.plline( x, y );
00579     }
00580 
00581     public void line3( double[] x, double[] y, double[] z )
00582     {
00583         if ( set_stream() == -1 ) return;
00584         plplotjavac.plline3( x, y, z );
00585     }
00586 
00587     public void lsty( int lin )
00588     {
00589         if ( set_stream() == -1 ) return;
00590         plplotjavac.pllsty( lin );
00591     }
00592 
00593     public void map( PLCallbackMapform mapform, String type, double minlong, double maxlong, double minlat, double maxlat )
00594     {
00595         if ( set_stream() == -1 ) return;
00596         plplotjavac.plmap( mapform, type, minlong, maxlong, minlat, maxlat );
00597     }
00598 
00599     public void meridians( PLCallbackMapform mapform, double dlong, double dlat, double minlong, double maxlong, double minlat, double maxlat )
00600     {
00601         if ( set_stream() == -1 ) return;
00602         plplotjavac.plmeridians( mapform, dlong, dlat, minlong, maxlong, minlat, maxlat );
00603     }
00604 
00605     public void minMax2dGrid( double[][] f, double[] fmax, double[] fmin )
00606     {
00607         if ( set_stream() == -1 ) return;
00608         plplotjavac.plMinMax2dGrid( f, fmax, fmin );
00609     }
00610 
00611     public void mesh( double[] x, double[] y, double[][] z, int opt )
00612     {
00613         if ( set_stream() == -1 ) return;
00614         plplotjavac.plmesh( x, y, z, opt );
00615     }
00616 
00617     public void meshc( double[] x, double[] y, double[][] z, int opt, double[] clevel )
00618     {
00619         if ( set_stream() == -1 ) return;
00620         plplotjavac.plmeshc( x, y, z, opt, clevel );
00621     }
00622 
00623 // Don't need this in the OO approach - create a new object instead.
00624 //public void mkstrm(int[] OUTPUT) {
00625 //    if (set_stream() == -1) return;
00626 //    plplotjavac.plmkstrm(int[] OUTPUT);
00627 //}
00628 
00629     public void mtex( String side, double disp, double pos, double just, String text )
00630     {
00631         if ( set_stream() == -1 ) return;
00632         plplotjavac.plmtex( side, disp, pos, just, text );
00633     }
00634 
00635     public void mtex3( String side, double disp, double pos, double just, String text )
00636     {
00637         if ( set_stream() == -1 ) return;
00638         plplotjavac.plmtex3( side, disp, pos, just, text );
00639     }
00640 
00641     public void plot3d( double[] x, double[] y, double[][] z, int opt, boolean side )
00642     {
00643         if ( set_stream() == -1 ) return;
00644         plplotjavac.plot3d( x, y, z, opt, side );
00645     }
00646 
00647     public void plot3dc( double[] x, double[] y, double[][] z, int opt, double[] clevel )
00648     {
00649         if ( set_stream() == -1 ) return;
00650         plplotjavac.plot3dc( x, y, z, opt, clevel );
00651     }
00652 
00653     public void plot3dcl( double[] x, double[] y, double[][] z, int opt,
00654                           double[] clevel, int ixstart, int[] indexymin, int[] indexymax )
00655     {
00656         if ( set_stream() == -1 ) return;
00657         plplotjavac.plot3dcl( x, y, z, opt, clevel, ixstart, indexymin, indexymax );
00658     }
00659 
00660     public void surf3d( double[] x, double[] y, double[][] z, int opt, double[] clevel )
00661     {
00662         if ( set_stream() == -1 ) return;
00663         plplotjavac.plsurf3d( x, y, z, opt, clevel );
00664     }
00665 
00666     public void surf3dl( double[] x, double[] y, double[][] z, int opt,
00667                          double[] clevel, int ixstart, int[] indexymin, int[] indexymax )
00668     {
00669         if ( set_stream() == -1 ) return;
00670         plplotjavac.plsurf3dl( x, y, z, opt, clevel, ixstart, indexymin, indexymax );
00671     }
00672 
00673     public void parseopts( String[] argv, int mode )
00674     {
00675         if ( set_stream() == -1 ) return;
00676         plplotjavac.plparseopts( argv, mode );
00677     }
00678 
00679     public void pat( int[] inc, int[] del )
00680     {
00681         if ( set_stream() == -1 ) return;
00682         plplotjavac.plpat( inc, del );
00683     }
00684 
00685     public void poin( double[] x, double[] y, int code )
00686     {
00687         if ( set_stream() == -1 ) return;
00688         plplotjavac.plpoin( x, y, code );
00689     }
00690 
00691     public void poin3( double[] x, double[] y, double[] z, int code )
00692     {
00693         if ( set_stream() == -1 ) return;
00694         plplotjavac.plpoin3( x, y, z, code );
00695     }
00696 
00697     public void poly3( double[] x, double[] y, double[] z, boolean[] draw, boolean ifcc )
00698     {
00699         if ( set_stream() == -1 ) return;
00700         plplotjavac.plpoly3( x, y, z, draw, ifcc );
00701     }
00702 
00703     public void prec( int setp, int prec )
00704     {
00705         if ( set_stream() == -1 ) return;
00706         plplotjavac.plprec( setp, prec );
00707     }
00708 
00709     public void psty( int patt )
00710     {
00711         if ( set_stream() == -1 ) return;
00712         plplotjavac.plpsty( patt );
00713     }
00714 
00715     public void ptex( double x, double y, double dx, double dy, double just, String text )
00716     {
00717         if ( set_stream() == -1 ) return;
00718         plplotjavac.plptex( x, y, dx, dy, just, text );
00719     }
00720 
00721     public void ptex3( double x, double y, double z, double dx, double dy, double dz, double sx, double sy, double sz, double just, String text )
00722     {
00723         if ( set_stream() == -1 ) return;
00724         plplotjavac.plptex3( x, y, z, dx, dy, dz, sx, sy, sz, just, text );
00725     }
00726 
00727     public double randd()
00728     {
00729         if ( set_stream() == -1 ) return 0.0;
00730         return plplotjavac.plrandd();
00731     }
00732 
00733     public void replot()
00734     {
00735         if ( set_stream() == -1 ) return;
00736         plplotjavac.plreplot();
00737     }
00738 
00739     public void schr( double def, double scale )
00740     {
00741         if ( set_stream() == -1 ) return;
00742         plplotjavac.plschr( def, scale );
00743     }
00744 
00745     public void scmap0( int[] r, int[] g, int[] b )
00746     {
00747         if ( set_stream() == -1 ) return;
00748         plplotjavac.plscmap0( r, g, b );
00749     }
00750 
00751     public void scmap0a( int[] r, int[] g, int[] b, double[] a )
00752     {
00753         if ( set_stream() == -1 ) return;
00754         plplotjavac.plscmap0a( r, g, b, a );
00755     }
00756 
00757     public void scmap0n( int ncol0 )
00758     {
00759         if ( set_stream() == -1 ) return;
00760         plplotjavac.plscmap0n( ncol0 );
00761     }
00762 
00763     public void scmap1( int[] r, int[] g, int[] b )
00764     {
00765         if ( set_stream() == -1 ) return;
00766         plplotjavac.plscmap1( r, g, b );
00767     }
00768 
00769     public void scmap1a( int[] r, int[] g, int[] b, double[] a )
00770     {
00771         if ( set_stream() == -1 ) return;
00772         plplotjavac.plscmap1a( r, g, b, a );
00773     }
00774 
00775     public void scmap1l( boolean itype, double[] intensity, double[] coord1,
00776                          double[] coord2, double[] coord3, boolean[] rev )
00777     {
00778         if ( set_stream() == -1 ) return;
00779         plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, rev );
00780     }
00781 
00782     public void scmap1l( boolean itype, double[] intensity, double[] coord1,
00783                          double[] coord2, double[] coord3 )
00784     {
00785         if ( set_stream() == -1 ) return;
00786         plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, null );
00787     }
00788 
00789     public void scmap1la( boolean itype, double[] intensity, double[] coord1,
00790                           double[] coord2, double[] coord3, double[] a, boolean[] rev )
00791     {
00792         if ( set_stream() == -1 ) return;
00793         plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, rev );
00794     }
00795 
00796     public void scmap1la( boolean itype, double[] intensity, double[] coord1,
00797                           double[] coord2, double[] coord3, double[] a )
00798     {
00799         if ( set_stream() == -1 ) return;
00800         plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, null );
00801     }
00802 
00803     public void scmap1n( int ncol1 )
00804     {
00805         if ( set_stream() == -1 ) return;
00806         plplotjavac.plscmap1n( ncol1 );
00807     }
00808 
00809     public void scol0( int icol0, int r, int g, int b )
00810     {
00811         if ( set_stream() == -1 ) return;
00812         plplotjavac.plscol0( icol0, r, g, b );
00813     }
00814 
00815     public void scol0a( int icol0, int r, int g, int b, double a )
00816     {
00817         if ( set_stream() == -1 ) return;
00818         plplotjavac.plscol0a( icol0, r, g, b, a );
00819     }
00820 
00821     public void scolbg( int r, int g, int b )
00822     {
00823         if ( set_stream() == -1 ) return;
00824         plplotjavac.plscolbg( r, g, b );
00825     }
00826 
00827     public void scolbga( int r, int g, int b, double a )
00828     {
00829         if ( set_stream() == -1 ) return;
00830         plplotjavac.plscolbga( r, g, b, a );
00831     }
00832 
00833     public void scolor( int color )
00834     {
00835         if ( set_stream() == -1 ) return;
00836         plplotjavac.plscolor( color );
00837     }
00838 
00839     public void scompression( int compression )
00840     {
00841         if ( set_stream() == -1 ) return;
00842         plplotjavac.plscompression( compression );
00843     }
00844 
00845     public void sdev( String devname )
00846     {
00847         if ( set_stream() == -1 ) return;
00848         plplotjavac.plsdev( devname );
00849     }
00850 
00851     public void sdidev( double mar, double aspect, double jx, double jy )
00852     {
00853         if ( set_stream() == -1 ) return;
00854         plplotjavac.plsdidev( mar, aspect, jx, jy );
00855     }
00856 
00857     public void sdimap( int dimxmin, int dimxmax, int dimymin, int dimymax,
00858                         double dimxpmm, double dimypmm )
00859     {
00860         if ( set_stream() == -1 ) return;
00861         plplotjavac.plsdimap( dimxmin, dimxmax, dimymin, dimymax, dimxpmm, dimypmm );
00862     }
00863 
00864     public void sdiori( double rot )
00865     {
00866         if ( set_stream() == -1 ) return;
00867         plplotjavac.plsdiori( rot );
00868     }
00869 
00870     public void sdiplt( double xmin, double ymin, double xmax, double ymax )
00871     {
00872         if ( set_stream() == -1 ) return;
00873         plplotjavac.plsdiplt( xmin, ymin, xmax, ymax );
00874     }
00875 
00876     public void sdiplz( double xmin, double ymin, double xmax, double ymax )
00877     {
00878         if ( set_stream() == -1 ) return;
00879         plplotjavac.plsdiplz( xmin, ymin, xmax, ymax );
00880     }
00881 
00882     public void seed( long s )
00883     {
00884         if ( set_stream() == -1 ) return;
00885         plplotjavac.plseed( s );
00886     }
00887 
00888     public void sesc( char esc )
00889     {
00890         if ( set_stream() == -1 ) return;
00891         plplotjavac.plsesc( esc );
00892     }
00893 
00894     public void setopt( String opt, String optarg )
00895     {
00896         if ( set_stream() == -1 ) return;
00897         plplotjavac.plsetopt( opt, optarg );
00898     }
00899 
00900     public void sfam( int fam, int num, int bmax )
00901     {
00902         if ( set_stream() == -1 ) return;
00903         plplotjavac.plsfam( fam, num, bmax );
00904     }
00905 
00906     public void sfci( long fci )
00907     {
00908         if ( set_stream() == -1 ) return;
00909         plplotjavac.plsfci( fci );
00910     }
00911 
00912     public void sfnam( String fnam )
00913     {
00914         if ( set_stream() == -1 ) return;
00915         plplotjavac.plsfnam( fnam );
00916     }
00917 
00918     public void sfont( int family, int style, int weight )
00919     {
00920         if ( set_stream() == -1 ) return;
00921         plplotjavac.plsfont( family, style, weight );
00922     }
00923 
00924     public void shades( double[][] a, double xmin, double xmax, double ymin,
00925                         double ymax, double[] clevel, int fill_width, int cont_color,
00926                         int cont_width, boolean rectangular,
00927                         double[][] pltr, double[][] OBJECT_DATA )
00928     {
00929         if ( set_stream() == -1 ) return;
00930         plplotjavac.plshades( a, xmin, xmax, ymin, ymax, clevel, fill_width,
00931             cont_color, cont_width, rectangular, pltr, OBJECT_DATA );
00932     }
00933 
00934     public void shade( double[][] a, double left, double right, double bottom,
00935                        double top, double shade_min, double shade_max, int sh_cmap,
00936                        double sh_color, int sh_width, int min_color, int min_width,
00937                        int max_color, int max_width, boolean rectangular,
00938                        double[][] pltr, double[][] OBJECT_DATA )
00939     {
00940         if ( set_stream() == -1 ) return;
00941         plplotjavac.plshade( a, left, right, bottom, top, shade_min, shade_max,
00942             sh_cmap, sh_color, sh_width, min_color, min_width,
00943             max_color, max_width, rectangular, pltr, OBJECT_DATA );
00944     }
00945 
00946     public void slabelfunc( PLCallbackLabel label, Object obj )
00947     {
00948         if ( set_stream() == -1 ) return;
00949         plplotjavac.plslabelfunc( label, obj );
00950     }
00951 
00952     public void slabelfunc( PLCallbackLabel label )
00953     {
00954         if ( set_stream() == -1 ) return;
00955         plplotjavac.plslabelfunc( label, null );
00956     }
00957 
00958     public void smaj( double def, double scale )
00959     {
00960         if ( set_stream() == -1 ) return;
00961         plplotjavac.plsmaj( def, scale );
00962     }
00963 
00964     public void smin( double def, double scale )
00965     {
00966         if ( set_stream() == -1 ) return;
00967         plplotjavac.plsmin( def, scale );
00968     }
00969 
00970     public void sori( int ori )
00971     {
00972         if ( set_stream() == -1 ) return;
00973         plplotjavac.plsori( ori );
00974     }
00975 
00976     public void spage( double xp, double yp, int xleng, int yleng, int xoff, int yoff )
00977     {
00978         if ( set_stream() == -1 ) return;
00979         plplotjavac.plspage( xp, yp, xleng, yleng, xoff, yoff );
00980     }
00981 
00982     public void spal0( String filename )
00983     {
00984         if ( set_stream() == -1 ) return;
00985         plplotjavac.plspal0( filename );
00986     }
00987 
00988     public void spal1( String filename, boolean interpolate )
00989     {
00990         if ( set_stream() == -1 ) return;
00991         plplotjavac.plspal1( filename, interpolate );
00992     }
00993 
00994     public void spause( boolean pause )
00995     {
00996         if ( set_stream() == -1 ) return;
00997         plplotjavac.plspause( pause );
00998     }
00999 
01000     public void sstrm( int strm )
01001     {
01002         if ( set_stream() == -1 ) return;
01003         plplotjavac.plsstrm( strm );
01004     }
01005 
01006     public void ssub( int nx, int ny )
01007     {
01008         if ( set_stream() == -1 ) return;
01009         plplotjavac.plssub( nx, ny );
01010     }
01011 
01012     public void ssym( double def, double scale )
01013     {
01014         if ( set_stream() == -1 ) return;
01015         plplotjavac.plssym( def, scale );
01016     }
01017 
01018     public void star( int nx, int ny )
01019     {
01020         if ( set_stream() == -1 ) return;
01021         plplotjavac.plstar( nx, ny );
01022     }
01023 
01024     public void start( String devname, int nx, int ny )
01025     {
01026         if ( set_stream() == -1 ) return;
01027         plplotjavac.plstart( devname, nx, ny );
01028     }
01029 
01030     public void stransform( PLCallbackCT coordTrans, Object data )
01031     {
01032         if ( set_stream() == -1 ) return;
01033         plplotjavac.plstransform( coordTrans, data );
01034     }
01035 
01036     public void string( double[] x, double[] y, String string )
01037     {
01038         if ( set_stream() == -1 ) return;
01039         plplotjavac.plstring( x, y, string );
01040     }
01041 
01042     public void string3( double[] x, double[] y, double[] z, String string )
01043     {
01044         if ( set_stream() == -1 ) return;
01045         plplotjavac.plstring3( x, y, z, string );
01046     }
01047 
01048     public void stripa( int id, int pen, double x, double y )
01049     {
01050         if ( set_stream() == -1 ) return;
01051         plplotjavac.plstripa( id, pen, x, y );
01052     }
01053 
01054     public void stripc( int[] id, String xspec, String yspec,
01055                         double xmin, double xmax, double xjump,
01056                         double ymin, double ymax, double xlpos, double ylpos,
01057                         boolean y_ascl, boolean acc, int colbox, int collab,
01058                         int[] colline, int[] styline, String[] legline,
01059                         String labx, String laby, String labtop )
01060     {
01061         if ( set_stream() == -1 ) return;
01062         plplotjavac.plstripc( id, xspec, yspec, xmin, xmax, xjump, ymin, ymax,
01063             xlpos, ylpos, y_ascl, acc, colbox, collab, colline,
01064             styline, legline, labx, laby, labtop );
01065     }
01066 
01067     public void stripd( int id )
01068     {
01069         if ( set_stream() == -1 ) return;
01070         plplotjavac.plstripd( id );
01071     }
01072 
01073     public void styl( int[] mark, int[] space )
01074     {
01075         if ( set_stream() == -1 ) return;
01076         plplotjavac.plstyl( mark, space );
01077     }
01078 
01079     public void svect( double[] arrow_x, double[] arrow_y, boolean fill )
01080     {
01081         if ( set_stream() == -1 ) return;
01082         plplotjavac.plsvect( arrow_x, arrow_y, fill );
01083     }
01084 
01085     public void svpa( double xmin, double xmax, double ymin, double ymax )
01086     {
01087         if ( set_stream() == -1 ) return;
01088         plplotjavac.plsvpa( xmin, xmax, ymin, ymax );
01089     }
01090 
01091     public void sxax( int digmax, int digits )
01092     {
01093         if ( set_stream() == -1 ) return;
01094         plplotjavac.plsxax( digmax, digits );
01095     }
01096 
01097     public void syax( int digmax, int digits )
01098     {
01099         if ( set_stream() == -1 ) return;
01100         plplotjavac.plsyax( digmax, digits );
01101     }
01102 
01103     public void sym( double[] x, double[] y, int code )
01104     {
01105         if ( set_stream() == -1 ) return;
01106         plplotjavac.plsym( x, y, code );
01107     }
01108 
01109     public void szax( int digmax, int digits )
01110     {
01111         if ( set_stream() == -1 ) return;
01112         plplotjavac.plszax( digmax, digits );
01113     }
01114 
01115     public void text()
01116     {
01117         if ( set_stream() == -1 ) return;
01118         plplotjavac.pltext();
01119     }
01120 
01121     public void timefmt( String fmt )
01122     {
01123         if ( set_stream() == -1 ) return;
01124         plplotjavac.pltimefmt( fmt );
01125     }
01126 
01127     public void vasp( double aspect )
01128     {
01129         if ( set_stream() == -1 ) return;
01130         plplotjavac.plvasp( aspect );
01131     }
01132 
01133     public void vect( double[][] u, double[][] v, double scale, double[][] pltr, double[][] OBJECT_DATA )
01134     {
01135         if ( set_stream() == -1 ) return;
01136         plplotjavac.plvect( u, v, scale, pltr, OBJECT_DATA );
01137     }
01138 
01139     public void vpas( double xmin, double xmax, double ymin, double ymax, double aspect )
01140     {
01141         if ( set_stream() == -1 ) return;
01142         plplotjavac.plvpas( xmin, xmax, ymin, ymax, aspect );
01143     }
01144 
01145     public void vpor( double xmin, double xmax, double ymin, double ymax )
01146     {
01147         if ( set_stream() == -1 ) return;
01148         plplotjavac.plvpor( xmin, xmax, ymin, ymax );
01149     }
01150 
01151     public void vsta()
01152     {
01153         if ( set_stream() == -1 ) return;
01154         plplotjavac.plvsta();
01155     }
01156 
01157     public void w3d( double basex, double basey, double height, double xmin0,
01158                      double xmax0, double ymin0, double ymax0, double zmin0,
01159                      double zmax0, double alt, double az )
01160     {
01161         if ( set_stream() == -1 ) return;
01162         plplotjavac.plw3d( basex, basey, height, xmin0, xmax0, ymin0, ymax0,
01163             zmin0, zmax0, alt, az );
01164     }
01165 
01166     public void wid( int width )
01167     {
01168         if ( set_stream() == -1 ) return;
01169         plplotjavac.plwid( width );
01170     }
01171 
01172     public void wind( double xmin, double xmax, double ymin, double ymax )
01173     {
01174         if ( set_stream() == -1 ) return;
01175         plplotjavac.plwind( xmin, xmax, ymin, ymax );
01176     }
01177 
01178     public void xormod( boolean mode, boolean[] status )
01179     {
01180         if ( set_stream() == -1 ) return;
01181         plplotjavac.plxormod( mode, status );
01182     }
01183 
01184     public void ClearOpts()
01185     {
01186         if ( set_stream() == -1 ) return;
01187         plplotjavac.plClearOpts();
01188     }
01189 
01190     public void ResetOpts()
01191     {
01192         if ( set_stream() == -1 ) return;
01193         plplotjavac.plResetOpts();
01194     }
01195 
01196     public void SetUsage( String program_string, String usage_string )
01197     {
01198         if ( set_stream() == -1 ) return;
01199         plplotjavac.plSetUsage( program_string, usage_string );
01200     }
01201 
01202     public void OptUsage()
01203     {
01204         if ( set_stream() == -1 ) return;
01205         plplotjavac.plOptUsage();
01206     }
01207 
01208     public void hlsrgb( double h, double l, double s, double[] r, double[] g, double[] b )
01209     {
01210         if ( set_stream() == -1 ) return;
01211         plplotjavac.plhlsrgb( h, l, s, r, g, b );
01212     }
01213 
01214     public void rgbhls( double r, double g, double b, double[] h, double[] l, double[] s )
01215     {
01216         if ( set_stream() == -1 ) return;
01217         plplotjavac.plrgbhls( r, g, b, h, l, s );
01218     }
01219 
01220 // Deprecated versions of methods which use int for a flag instead of
01221 // boolean.
01222     public void cpstrm( int iplsr, int flags )
01223     {
01224         if ( set_stream() == -1 ) return;
01225         plplotjavac.plcpstrm( iplsr, flags != 0 );
01226     }
01227 
01228     public void plot3d( double[] x, double[] y, double[][] z, int opt, int side )
01229     {
01230         if ( set_stream() == -1 ) return;
01231         plplotjavac.plot3d( x, y, z, opt, side != 0 );
01232     }
01233 
01234     public void poly3( double[] x, double[] y, double[] z, int[] draw, int ifcc )
01235     {
01236         if ( set_stream() == -1 ) return;
01237         boolean [] loc_draw = new boolean[draw.length];
01238         for ( int i = 0; i < draw.length; i++ )
01239         {
01240             loc_draw[i] = ( draw[i] != 0 );
01241         }
01242         plplotjavac.plpoly3( x, y, z, loc_draw, ifcc != 0 );
01243     }
01244 
01245     public void scmap1l( int itype, double[] intensity, double[] coord1,
01246                          double[] coord2, double[] coord3, int[] rev )
01247     {
01248         if ( set_stream() == -1 ) return;
01249         boolean [] loc_rev = null;
01250         if ( rev != null )
01251         {
01252             loc_rev = new boolean[rev.length];
01253             for ( int i = 0; i < rev.length; i++ )
01254             {
01255                 loc_rev[i] = ( rev[i] != 0 );
01256             }
01257         }
01258         plplotjavac.plscmap1l( itype != 0, intensity, coord1, coord2, coord3, loc_rev );
01259     }
01260 
01261     public void shades( double[][] a, double xmin, double xmax, double ymin,
01262                         double ymax, double[] clevel, int fill_width, int cont_color,
01263                         int cont_width, int rectangular,
01264                         double[][] pltr, double[][] OBJECT_DATA )
01265     {
01266         if ( set_stream() == -1 ) return;
01267         plplotjavac.plshades( a, xmin, xmax, ymin, ymax, clevel, fill_width,
01268             cont_color, cont_width, rectangular != 0, pltr, OBJECT_DATA );
01269     }
01270 
01271     public void shade( double[][] a, double left, double right, double bottom,
01272                        double top, double shade_min, double shade_max, int sh_cmap,
01273                        double sh_color, int sh_width, int min_color, int min_width,
01274                        int max_color, int max_width, int rectangular,
01275                        double[][] pltr, double[][] OBJECT_DATA )
01276     {
01277         if ( set_stream() == -1 ) return;
01278         plplotjavac.plshade( a, left, right, bottom, top, shade_min, shade_max,
01279             sh_cmap, sh_color, sh_width, min_color, min_width,
01280             max_color, max_width, rectangular != 0, pltr, OBJECT_DATA );
01281     }
01282 
01283     public void spause( int pause )
01284     {
01285         if ( set_stream() == -1 ) return;
01286         plplotjavac.plspause( pause != 0 );
01287     }
01288 
01289     public void stripc( int[] id, String xspec, String yspec,
01290                         double xmin, double xmax, double xjump,
01291                         double ymin, double ymax, double xlpos, double ylpos,
01292                         int y_ascl, int acc, int colbox, int collab,
01293                         int[] colline, int[] styline, String[] legline,
01294                         String labx, String laby, String labtop )
01295     {
01296         if ( set_stream() == -1 ) return;
01297         plplotjavac.plstripc( id, xspec, yspec, xmin, xmax, xjump, ymin, ymax,
01298             xlpos, ylpos, y_ascl != 0, acc != 0, colbox, collab,
01299             colline, styline, legline, labx, laby, labtop );
01300     }
01301 
01302     public void svect( double[] arrow_x, double[] arrow_y, int fill )
01303     {
01304         if ( set_stream() == -1 ) return;
01305         plplotjavac.plsvect( arrow_x, arrow_y, fill != 0 );
01306     }
01307 
01308     public void xormod( int mode, int[] status )
01309     {
01310         if ( set_stream() == -1 ) return;
01311         boolean [] loc_status = new boolean[1];
01312         plplotjavac.plxormod( mode != 0, loc_status );
01313         status[0] = loc_status[0] ? 1 : 0;
01314     }
01315 }

Generated on Wed Oct 12 2011 20:42:23 for PLplot by  doxygen 1.7.1