亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? graph2d.java

?? java 作圖的程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package graph;import java.awt.*;import java.applet.*;import java.util.*;import java.lang.*;import java.io.StreamTokenizer;import java.io.InputStream;import java.io.IOException;import java.net.URL;/*******************************************************************************                      Class  graph.Graph2D******************************************************************************    Copyright (C) 1995, 1996 Leigh Brookshaw****    This program is free software; you can redistribute it and/or modify**    it under the terms of the GNU General Public License as published by**    the Free Software Foundation; either version 2 of the License, or**    (at your option) any later version.****    This program is distributed in the hope that it will be useful,**    but WITHOUT ANY WARRANTY; without even the implied warranty of**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the**    GNU General Public License for more details.****    You should have received a copy of the GNU General Public License**    along with this program; if not, write to the Free Software**    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.****************************************************************************** class Graph2D extends Canvas **** The main entry point and interface for the 2D graphing package.** This class keeps track of the DataSets and the Axes.** It has the main drawing engine that positions axis etc.***************************************************************************//** * This is the main plotting class. It partitions the canvas to contain the * specified axes with the remaining space taken with the plotting region. * Axes are packed against the walls of the canvas. The <B>paint</B> and * <B>update</B> methods of this class handle all the drawing operations of the * graph. This means that independent components like Axis and DataSets must be * registered with this class to be incorporated into the plot. * * @version  $Revision: 1.12 $, $Date: 1996/09/24 05:23:41 $ * @author   Leigh Brookshaw */public class Graph2D extends Canvas {/*** Default Background Color*/    private Color DefaultBackground = null;/************************** Protected Variables***********************//** *  A vector list of All the axes attached *  @see Graph2d#attachAxis() */    protected Vector axis          = new Vector(4);/** *  A vector list of All the DataSets attached *  @see Graph2d#attachDataSet() *  @see DataSet */    protected Vector dataset       = new Vector(10);/** *  The markers that may have been loaded *  @see Graph2D#setMarkers() */    protected Markers markers = null;/** * The blinking "data loading" thread * @see Graph2D#startedloading() */    protected LoadMessage load_thread = null;/** * The background color for the data window */    protected Color DataBackground = null;/*************************** Public Variables***********************//** *  If this is greater than zero it means that *  data loading threads are active so the message "loading data" *  is flashed on the plot canvas. When it is back to zero the plot *  progresses normally */    public int  loadingData  = 0;/** *  The width of the border at the top of the canvas. This allows  *  slopover from axis labels, legends etc. */    public int     borderTop          = 20;/** *  The width of the border at the bottom of the canvas. This allows  *  slopover from axis labels, legends etc. */    public int     borderBottom       = 20;/** *  The width of the border at the left of the canvas. This allows  *  slopover from axis labels, legends etc. */    public int     borderLeft         = 20;/** *  The width of the border at the right of the canvas. This allows  *  slopover from axis labels, legends etc. */    public int     borderRight        = 20;/** *  If set <I>true</I> a frame will be drawn around the data window. *  Any axes will overlay this frame. */    public boolean frame        = true;/** *  The color of the frame to be drawn */    public Color   framecolor;/** * If set <I>true</I> (the default) a grid will be drawn over the data window. * The grid will align with the major tic marks of the Innermost axes. */    public boolean drawgrid     = true; /** * The color of the grid to be drawn */    public Color   gridcolor    = Color.pink;/** *  If set <I>true</I> (the default) a grid line will be drawn  *  across the data window *  at the zeros of the innermost axes. */    public boolean drawzero     = true;/** *  The color of the zero grid lines. */     public Color   zerocolor    = Color.orange;/** *  The rectangle that the data will be plotted within. This is an output *  variable only.*/    public Rectangle datarect   = new Rectangle();/** *  If set <I>true</I> (the default) the canvas will be set to the background *  color (erasing the plot) when the update method is called. *  This would only be changed for special effects. */    public boolean clearAll     = true;/** *  If set <I>true</I> (the default) everything associated with the plot *  will be drawn when the update method or paint method are called. *  Normally *  only modified for special effects*/    public boolean paintAll     = true;/** *  Modify the position of the axis and the range of the axis so that *  the aspect ratio of the major tick marks are 1 and the plot is square *  on the screen*/    public boolean square = false;  /**   * Text to be painted Last onto the Graph Canvas.   */    public TextLine lastText = null;/************************  Public Methods*********************//** *  Load and Attach a DataSet from a File.  *  The method loads the data into a DataSet class *  and attaches the class to the graph for plotting. * *  The data is assumed to consist *  (at this stage) 2 ASCII columns of numbers x, y. As always blank lines *  are ignored and everything following # is ignored as a comment. * *  @param file    The URL of the data file to read. *  @return        The DataSet constructed containing the data read. */    public DataSet loadFile( URL file) {           byte b[] = new byte[50];           int nbytes = 0;           int max  = 100;           int inc  = 100;           int n    = 0;           double data[] = new double[max];           InputStream is = null;           boolean comment    = false;           int c;           try {                 is = file.openStream();                 while( (c=is.read()) > -1 ) {                                          switch (c) {                                              case '#':                                    comment = true;                                    break;                         case '\r': case '\n':                                    comment = false;                         case ' ': case '\t':                                if( nbytes > 0 ) {                                   String s = new String(b,0,0,nbytes);                                   data[n] = Double.valueOf(s).doubleValue();                                   n++;                                   if( n >= max ) {                                       max += inc;                                       double d[] = new double[max];                                       System.arraycopy(data, 0, d, 0, n);                                       data = d;                                   }                                   nbytes = 0;                                }                                break;                         default:                                   if( !comment ) {                                        b[nbytes] = (byte)c;                                        nbytes++;                                   }                                   break;                      }                  }                if (is != null) is.close();        } catch(Exception e) {          System.out.println("Failed to load Data set from file ");          e.printStackTrace();          if (is != null) try { is.close(); } catch (Exception ev) { }          return null;        }        return loadDataSet(data,n/2);            }/** *  Load and Attach a DataSet from an array.  *  The method loads the data into a DataSet class *  and attaches the class to the graph for plotting. * *  The data is assumed to be stored *  in the form  x,y,x,y,x,y.... A local copy of the data is made. * *  @param  data   The data to be loaded in the form x,y,x,y,... *  @param  n      The number of (x,y) data points. This means that the *                 minimum length of the data array is 2*n. *  @return        The DataSet constructed containing the data read. */    public DataSet loadDataSet( double data[], int n ) {       DataSet d;       try {              d =  new DataSet(data, n);             dataset.addElement( d );             d.g2d = this;            }       catch (Exception e) {          System.out.println("Failed to load Data set ");         e.printStackTrace();         return null;       }       return d;    }/** *   Attach a DataSet to the graph. By attaching the data set the class *   can draw the data through its paint method. */    public void attachDataSet( DataSet d ) {       if( d != null) {             dataset.addElement( d );             d.g2d = this;       }    }/** *    Detach the DataSet from the class. Data associated with the DataSet *    will nolonger be plotted. * *    @param d    The DataSet to detach. */    public void detachDataSet( DataSet d ) {       if(d != null) {                      if(d.xaxis != null) d.xaxis.detachDataSet(d);                      if(d.yaxis != null) d.yaxis.detachDataSet(d);                      dataset.removeElement(d);       }    }/** *    Detach All the DataSets from the class.*/    public void detachDataSets() {           DataSet d;           int i;           if(dataset == null | dataset.isEmpty() ) return;           for (i=0; i<dataset.size(); i++) {             d = ((DataSet)dataset.elementAt(i));             if(d.xaxis != null) d.xaxis.detachDataSet(d);             if(d.yaxis != null) d.yaxis.detachDataSet(d);           }           dataset.removeAllElements();    }/** *    Create and attach an Axis to the graph. The position of the axis *    is one of Axis.TOP, Axis.BOTTOM, Axis.LEFT or Axis.RIGHT. * *    @param position   Position of the axis in the drawing window. **/    public Axis createAxis( int position ) {       Axis a;       try {              a =  new Axis(position);             a.g2d = this;             axis.addElement( a );            }       catch (Exception e) {          System.out.println("Failed to create Axis");         e.printStackTrace();         return null;       }       return a;    }/** *  Attach a previously created Axis. Only Axes that have been attached will *  be drawn  * *    @param the Axis to attach.*/    public void attachAxis( Axis a ) {       if(a == null) return;              try {              axis.addElement( a );             a.g2d = this;            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产人妖系列| 亚洲一区av在线| 国产传媒日韩欧美成人| 亚洲欧洲无码一区二区三区| 国内偷窥港台综合视频在线播放| 久久综合狠狠综合| www.欧美日韩国产在线| 亚洲精品免费在线观看| 欧美日韩大陆一区二区| 蜜桃一区二区三区四区| 日本一区二区高清| 色综合天天视频在线观看| 天天影视色香欲综合网老头| 日韩精品一区二区在线| 白白色 亚洲乱淫| 午夜不卡在线视频| 久久久国产午夜精品| 99国产精品国产精品久久| 午夜精品久久久久久久99水蜜桃| 日韩一区二区三区av| jlzzjlzz亚洲女人18| 亚洲一二三区视频在线观看| 欧美成人bangbros| 99久久国产综合精品色伊 | 中文字幕在线播放不卡一区| 欧美视频完全免费看| 精品在线一区二区三区| 亚洲乱码国产乱码精品精小说| 在线综合+亚洲+欧美中文字幕| 国产精品伊人色| 一区二区三区高清| 久久综合九色综合久久久精品综合 | 久久精品国产77777蜜臀| 国产精品久久久久久久久果冻传媒 | 亚洲国产一区二区a毛片| 亚洲精品一区二区三区香蕉| 91首页免费视频| 久久99深爱久久99精品| 一区二区三区**美女毛片| 精品久久久影院| 欧美私人免费视频| 国产91精品一区二区麻豆亚洲| 亚洲高清视频中文字幕| 国产精品国产a| 日本一区二区久久| 3atv在线一区二区三区| 97精品国产97久久久久久久久久久久| 久久电影国产免费久久电影| 亚洲电影在线免费观看| 亚洲视频在线一区观看| 国产日韩欧美综合在线| 欧美成人精品3d动漫h| 欧美偷拍一区二区| 色域天天综合网| 91香蕉视频黄| 成人白浆超碰人人人人| 国内成人精品2018免费看| 日韩av电影天堂| 香蕉乱码成人久久天堂爱免费| 自拍av一区二区三区| 国产嫩草影院久久久久| 国产亚洲精品aa| 26uuu精品一区二区三区四区在线| 欧美三级日韩三级| 在线国产亚洲欧美| 一本色道综合亚洲| 色婷婷久久99综合精品jk白丝| 成人精品电影在线观看| 国产盗摄一区二区| 国产精品1区2区| 国产xxx精品视频大全| 国产精品综合在线视频| 国产99精品视频| 成人手机电影网| 99久久99久久久精品齐齐| av毛片久久久久**hd| 99精品久久只有精品| av一区二区不卡| 一本久久a久久精品亚洲| 色菇凉天天综合网| 欧美色偷偷大香| 欧美乱熟臀69xxxxxx| 91精品国产色综合久久不卡蜜臀 | 3d动漫精品啪啪| 日韩欧美高清在线| 久久天天做天天爱综合色| 国产视频一区在线观看| 中文字幕在线一区二区三区| 《视频一区视频二区| 一区二区三区丝袜| 亚洲国产精品久久人人爱| 日韩电影在线看| 韩国午夜理伦三级不卡影院| 国产精品456| 色域天天综合网| 5566中文字幕一区二区电影 | 欧美日韩精品二区第二页| 正在播放亚洲一区| 久久久高清一区二区三区| 最新成人av在线| 日韩精品91亚洲二区在线观看| 麻豆高清免费国产一区| 成人手机电影网| 欧美日韩高清一区| 国产午夜精品理论片a级大结局| 1000部国产精品成人观看| 午夜国产不卡在线观看视频| 狠狠色丁香久久婷婷综合丁香| 成人爱爱电影网址| 欧美一区二区三区啪啪| 日本一区二区视频在线| 午夜精品久久久久久久久久| 国产精品一区二区久激情瑜伽 | 91麻豆精品国产91久久久| 久久久久国产一区二区三区四区| 亚洲人成网站色在线观看| 丝袜美腿高跟呻吟高潮一区| 国产福利一区在线| 欧美美女黄视频| 国产精品美女视频| 免费在线观看一区二区三区| 成人在线视频一区| 日韩一区二区在线免费观看| 亚洲国产岛国毛片在线| 日本成人超碰在线观看| 91首页免费视频| 久久人人97超碰com| 五月婷婷综合在线| gogogo免费视频观看亚洲一| 日韩限制级电影在线观看| 亚洲人成7777| 国产精品一区三区| 欧美一卡二卡在线观看| 亚洲欧美日韩国产另类专区| 国产一区视频在线看| 欧美精品亚洲二区| 亚洲精品高清在线观看| 大桥未久av一区二区三区中文| 欧美日韩成人激情| 尤物在线观看一区| 波多野结衣在线一区| 久久久国产精华| 久久99久久精品| 91精品国产综合久久福利| 免费成人在线观看| 欧美最猛黑人xxxxx猛交| 国产精品久久久久久户外露出| 久久国产福利国产秒拍| 欧美日韩夫妻久久| 亚洲一区二区三区在线看 | 一本色道亚洲精品aⅴ| 欧美激情一区在线| 国产精品一品二品| 精品久久久久久久久久久久包黑料| 亚洲最大成人综合| 日本丶国产丶欧美色综合| 日韩伦理av电影| www.爱久久.com| 亚洲欧美一区二区视频| 不卡视频在线看| 中文字幕在线观看一区| 成人网在线播放| 亚洲欧洲精品一区二区三区| 成人免费视频国产在线观看| 欧美高清在线一区| 成人午夜看片网址| 国产精品久久久久久久第一福利| 成人一区二区三区视频| 国产精品久久久久国产精品日日| 国产 日韩 欧美大片| 中文字幕一区日韩精品欧美| 91丨九色丨蝌蚪富婆spa| 亚洲免费资源在线播放| 欧美自拍偷拍一区| 天天综合色天天综合色h| 67194成人在线观看| 精品一区二区三区在线播放视频 | 久久精品日韩一区二区三区| 国产福利91精品一区| 中文字幕在线播放不卡一区| 91年精品国产| 亚洲成人午夜影院| 日韩欧美资源站| 国产精品综合二区| 亚洲人精品一区| 欧美日韩国产片| 黑人巨大精品欧美一区| 中文字幕电影一区| 欧美综合久久久| 青青草原综合久久大伊人精品优势| 26uuu久久综合| 91在线播放网址| 日韩影视精彩在线| 国产欧美精品区一区二区三区 | 五月天久久比比资源色| 日韩精品中文字幕一区| 成人性生交大片免费看中文 | 国产成人亚洲精品青草天美| 中文字幕一区二区在线观看| 欧美日韩国产综合久久 |