亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产女主播视频一区二区| 亚洲曰韩产成在线| 亚洲国产wwwccc36天堂| 秋霞国产午夜精品免费视频| 成人一区在线观看| 777午夜精品免费视频| 亚洲国产高清aⅴ视频| 午夜精品久久久久久久久久| 国产91在线观看丝袜| 欧美一区二区三区在线| 国产精品电影一区二区| 美女一区二区视频| 欧美日韩中文另类| 一区二区三区在线播| 国产精品亚洲一区二区三区在线| 在线不卡免费av| 亚洲激情图片qvod| 成人三级伦理片| 精品捆绑美女sm三区| 日韩专区在线视频| 欧美性xxxxx极品少妇| 国产精品你懂的在线| 久久 天天综合| 欧美二区在线观看| 亚洲国产精品天堂| 欧美日韩午夜影院| 夜夜嗨av一区二区三区中文字幕 | 国产成人精品三级麻豆| 欧美一级日韩免费不卡| 亚洲一区二区三区四区在线免费观看| 粉嫩13p一区二区三区| 国产亚洲精品精华液| 国产精一区二区三区| 久久中文娱乐网| 韩国视频一区二区| 精品国产乱码久久久久久浪潮 | 91精品国产日韩91久久久久久| 亚洲欧美在线aaa| www.激情成人| 亚洲天堂av老司机| 色欧美乱欧美15图片| 亚洲美女区一区| 在线免费观看视频一区| 一区二区三区毛片| 欧美精品乱码久久久久久按摩 | 精品视频在线看| 亚洲成av人片www| 欧美一级免费大片| 精品中文字幕一区二区| 国产日韩欧美不卡| 91在线丨porny丨国产| 一区二区三区日韩在线观看| 欧美视频三区在线播放| 美女网站色91| 国产日韩一级二级三级| 91免费在线视频观看| 一区二区三区成人| 日韩一二在线观看| 国产麻豆成人精品| 夜夜夜精品看看| 日韩视频免费直播| 国产suv精品一区二区6| 亚洲综合av网| 久久嫩草精品久久久精品| 波多野结衣一区二区三区| 亚洲最快最全在线视频| 欧美一级免费大片| 99久久婷婷国产综合精品| 日韩精品欧美成人高清一区二区| 精品国内片67194| caoporen国产精品视频| 免费在线观看一区二区三区| 日本一区二区免费在线| 欧美麻豆精品久久久久久| 国产精品影视在线| 亚洲r级在线视频| 久久精品欧美一区二区三区麻豆| av高清不卡在线| 玖玖九九国产精品| 亚洲第一在线综合网站| 久久精品人人做人人综合 | 国产高清成人在线| 亚洲成人av在线电影| 国产精品理伦片| 日韩精品一区二区三区中文精品| 99精品国产视频| 老司机午夜精品99久久| 亚洲大片在线观看| 亚洲欧洲三级电影| 国产午夜精品久久久久久久| 制服丝袜日韩国产| 色噜噜偷拍精品综合在线| 国产电影一区在线| 久久精品国产99国产精品| 亚洲成人综合在线| 亚洲欧美激情在线| 国产精品久久久久久久久果冻传媒| 欧美一区二区视频在线观看| 在线精品视频一区二区三四| 99久久精品一区二区| 国产精品一二一区| 久久99最新地址| 蜜臀国产一区二区三区在线播放| 亚洲高清中文字幕| 亚洲一区二区三区视频在线| 亚洲欧洲av色图| 亚洲天堂2014| 亚洲视频一区二区在线观看| 亚洲国产高清在线| 国产亚洲欧美一级| 精品成a人在线观看| 日韩欧美中文字幕制服| 欧美日韩国产免费| 欧美剧在线免费观看网站| 欧美日韩国产一级二级| 欧美亚洲日本国产| 日本电影欧美片| 91福利国产精品| 在线观看视频欧美| 在线观看网站黄不卡| 欧美三级欧美一级| 欧美精品久久天天躁| 制服丝袜亚洲色图| 精品女同一区二区| 久久久www成人免费无遮挡大片| 久久久久久麻豆| 欧美激情一区二区三区全黄| 欧美国产日产图区| 亚洲免费观看高清完整| 亚洲午夜三级在线| 日产国产高清一区二区三区| 青青草国产精品97视觉盛宴| 久久国产精品第一页| 国产精品一区二区三区99| 99精品国产一区二区三区不卡| 91美女片黄在线| 制服丝袜亚洲播放| 久久精品网站免费观看| 国产精品高潮呻吟| 亚洲午夜久久久久久久久电影网 | 亚洲一区二区三区美女| 另类小说视频一区二区| 成人网页在线观看| 在线看国产日韩| 欧美一级欧美一级在线播放| 国产亚洲va综合人人澡精品| 最新不卡av在线| 日韩精品一二三区| 国产成人在线观看免费网站| 91亚洲午夜精品久久久久久| 欧美高清你懂得| 欧美国产日韩一二三区| 亚洲一级二级三级在线免费观看| 久草在线在线精品观看| heyzo一本久久综合| 欧美精品乱码久久久久久按摩 | 成人午夜激情视频| 欧美综合久久久| 久久久久久久久久久黄色| 国产精品久久久久久福利一牛影视 | 一区二区三区毛片| 狠狠v欧美v日韩v亚洲ⅴ| 99九九99九九九视频精品| 日韩视频一区二区三区在线播放| 中文字幕一区二区三| 久草精品在线观看| 欧美三级韩国三级日本三斤| 久久精品亚洲国产奇米99| 日韩成人免费看| 色哟哟国产精品免费观看| 久久久久9999亚洲精品| 青椒成人免费视频| 欧美在线三级电影| 自拍偷自拍亚洲精品播放| 美女精品自拍一二三四| 在线免费观看日韩欧美| 国产精品污www在线观看| 精品无人区卡一卡二卡三乱码免费卡 | 国产成人自拍在线| 91精品国产欧美一区二区成人| 中文字幕在线播放不卡一区| 久久99精品久久久久久久久久久久 | 国产尤物一区二区| 不卡视频在线观看| 3atv在线一区二区三区| 自拍偷拍亚洲综合| 日韩av中文字幕一区二区三区 | 日本道精品一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 国产偷国产偷精品高清尤物| 日韩成人一级大片| 欧美自拍丝袜亚洲| 国产精品午夜免费| 成av人片一区二区| 国产午夜精品一区二区三区四区| 天天综合天天综合色| 91影视在线播放| 国产精品免费久久| 国产乱子轮精品视频| 欧美亚洲免费在线一区|