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

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

?? graphapplet.java

?? 基于geotools的demo GeoTools is a Java library for manipulating and displaying geographic maps.
?? JAVA
字號:
// first import standard java packages that we will needimport java.applet.*;import java.awt.*;import java.net.*;import java.io.*;//now import the main geotools packageimport uk.ac.leeds.ccg.geotools.*;//finaly import the toolbar from the widgets packageimport uk.ac.leeds.ccg.widgets.*;/** * GraphApplet is based for the main part on example 4, this time with the addition some charting options. * <p> * Applet parameters * * The relative location of a zip file from a single peramiter in the applet tag for the applet: * param name="shapefile" value="nameOfShapefileWithoutExtension" * param name="tooltip" value="nameOfColumn" * param name="groups" value="numberOfGroups" * param name="groupXcol" value="nameOfColumn" // for each group * param name="groupXcolor" value="#rrggbb hex colour reference" * param name="groupXname" value="Description of group" *  * The applet demostrates how to set up a theme with a pie chart. *  * If you would like to use this applet as it is then edit BarGraph.html so that the parametiers points to the shapefile and columname that you want to display. * <br> For best performance put the shp and dbf files into a zip file with the same name * <br> e.g.  map.shp, map.dbf -> map.zip * * If you have any questions or need help then contact the author at<br> * j.macgill@geog.leeds.ac.uk * <p> * Note this applet was built and tested against GeoTools 0.7.9dev1  *  * @author James Macgill * @version 1.0 * @since 0.7.8.1 */public class GraphApplet extends Applet implements java.awt.event.ItemListener{    //A Viewer is the component in which any maps are actualy displayed.    Viewer view = new Viewer(); // Note it is declared and initalized here    Panel pieKeys = new Panel(); //Panel to hold the pie chart key    Panel mapKeys = new Panel(); //Panel to hold the map keys    Panel pickShader = new Panel(); //Panel to hold radio button for each group        PieChart graph; // the Pie chart    Checkbox[] radios; // radio button for each group    Panel sideBar; // to hold all of the keys, chart and radios.        FirstPastPostShader fpps; //only used here as a quick way to build the key for the pie chart.    //Future versions of charts should be able to produce their own keys.        GeoData[] groupData; // The values for each group    Key[] groupKeys; // Key for each groups shader    ClassificationShader[]  groupShader; //Shader for each group    Theme t;    GeoLabel place = new GeoLabel(); //Linked label to display current state name    boolean loaded = false; //Have the maps been loaded yet?        //Initalise the applets comonents and sort out the layout    public void init(){        System.out.println("Graph Applet Demo v1.1.1");        //Switch to BorderLayout        this.setBackground(Color.white);        setLayout(new BorderLayout(5,5)); // Small amount of white space between each section.                //setup panels.        Panel graphPanel = new Panel();        sideBar = new Panel();        pickShader.setLayout(new GridLayout(0,1));        sideBar.setLayout(new GridLayout(2,2));                add(view,"Center"); //Add the view to the center so that it will expand to fill available space                //The toolbar widget object is a small panel with buttons to control a viewer.        ToolBar tools = new ToolBar(view);//Constucted with the Viewer to control        tools.add(new ZoomLevelPicker(view)); //Constructed with the Viewer to control        add(tools,"South");//add the toolbar to the south of the applet                //Add the key panel (which will have a key added to it latter) to the east of the applet.        sideBar.add(mapKeys);               graph = new PieChart();         graph.setSize(50,50);                add(sideBar,"East");                      sideBar.add(pickShader);                graphPanel.setLayout(new BorderLayout());        graphPanel.add(graph,"Center");                //Set up place label        Font f = new Font("Arial",Font.BOLD,14);        place.setFont(f);        graphPanel.add(place,"South");                sideBar.add(graphPanel);        sideBar.add(pieKeys);                       //that's it for initalization, the rest will come when start() is called.}        public void start(){        //load maps        try{            if(!loaded){                loaded=true;                loadMaps();            }        }        catch(IOException e){            this.showStatus("Error loading map file "+e);        }    }        //Keep a note of which group was displayed last.    public int last =0;                public void loadMaps() throws IOException{        //setup the shapefile reader as in past examples.        String shapefile = this.getParameter("shapefile"); //this should be a relative address.        URL url = new URL(getCodeBase(),shapefile);        ShapefileReader sfr = new ShapefileReader(url);                           //Grab the theme as normal        t = sfr.getTheme();             //setup tooltips as in example2        String tooltip = this.getParameter("tooltip"); //this should be the name of a column in the dbf file        GeoData tips = sfr.readData(tooltip);                //Find how many groups there are        int groups = Integer.parseInt(this.getParameter("groups"));                 fpps = new FirstPastPostShader();//This shader is just being used to build a key.        groupShader = new ClassificationShader[groups];//An array of shaders, one for each group        groupData = new GeoData[groups];//An array of geodatas one for each group                CheckboxGroup cbgroup = new CheckboxGroup();//Group for all of the checkboxes                radios = new Checkbox[groups];        groupKeys = new Key[groups];                //loop through once for each group        for(int i =1;i<=groups;i++){            String name = this.getParameter("group"+i+"col"); //The column in the dbf file for this group            System.out.println("Adding "+name);                       GeoData data = sfr.readData(name);//Grab the data                        String niceName = this.getParameter("group"+i+"name"); //Optional text name for this group                        if(niceName==null) niceName = name; // If no name was given revert to column name                        data.setName(niceName); // Set the name for the geodata to the one selected above            radios[i-1] = new Checkbox(niceName,false,cbgroup);//Add a checkbox for this group            radios[i-1].addItemListener(this);//Listen to it            pickShader.add(radios[i-1]);                                    Color color = Color.decode(this.getParameter("group"+i+"color"));//get and decode colour to use in pie chart            System.out.println("Building shader for "+name);            //Build a shader, this one has 7 classifications split by equal intervals.            groupShader[i-1] = new ClassificationShader(data, 7,ClassificationShader.EQUAL_INTERVAL,Color.yellow.brighter().brighter(),Color.red);            groupData[i-1] = data;            fpps.addGroup(data,color);            graph.addGroup(data,color);//add the data to the graph                        groupKeys[i-1] = groupShader[i-1].getKey();//get the key for that groups shader                 }        radios[0].setState(true);//Set the first group as active                System.out.println("Setting up highlight manager");        mapKeys.add(groupKeys[0]);                pieKeys.add(fpps.getKey());//pull the key from the shader, graphs should be able to do this themselves.                //Create a higlight manager        HighlightManager hm = new HighlightManager();        //pass it to the theme        t.setHighlightManager(hm);                              String highlightHex = this.getParameter("highlightColor");//get optional highlight color        ShadeStyle hs = t.getHighlightShadeStyle();        Color hiColor;        if(highlightHex!=null){            hiColor = Color.decode(highlightHex);        }        else{            hiColor = Color.pink;        }        hs.setFillColor(hiColor);                                //add the graph component as a listener to the highlight manager        hm.addHighlightChangedListener(graph);                               System.out.println("Setting shader");        t.setShader(groupShader[0]);//set the theme up with the first shader and data pair.        t.setGeoData(groupData[0]);                //set the tool tip data as the tip data for the theme        t.setTipData(tips);                place.setGeoData(tips);//Set the data for the label        hm.addHighlightChangedListener(place);//Add the label as a highlight listener                 //is there a starting point?        String start = this.getParameter("startID"); //get optional starting pont                if(start!=null){            int startID = Integer.parseInt(start);            hm.setHighlight(startID);//If set then set highlight (and graph+label) to given id.        }               //add the theme to the viewer        view.addTheme(t);    }        /**      * Called when one of the group radio buttons has been selected.     **/    public void itemStateChanged(java.awt.event.ItemEvent ie){        //Which group was chosen.        Checkbox src = (Checkbox)ie.getSource();        for(int i=0;i<radios.length;i++){            if(radios[i] == src){                //group found                t.setShader(groupShader[i]);//Switch to the shader for that group                t.setGeoData(groupData[i]);//Switch to the data for that group                //Swap the keys over in the key panel                mapKeys.add(groupKeys[i]);                mapKeys.remove(groupKeys[last]);                                //Small fudge to get the keys to be the right size                groupKeys[i].setSize(groupKeys[last].getSize());                groupKeys[i].setLocation(groupKeys[last].getLocation());                groupKeys[i].addNotify();                last = i;                groupKeys[i].doLayout();                sideBar.doLayout();                repaint();                                return;//finished            }        }    }            /**     * A Standard Applet method     * @return String description of applet perameters.     */    public String getAppletInfo(){        String info = "A very basic shapefile viewing applet demonstrating the use of GeoTools\nAuthor - James Macgill";        return info;    }        /**     * A Standard Applet method     * @return String description of applet perameters.     */    public String[][] getParameterInfo(){        String pinfo[][] = {	        {"shapefile",    "relative url",    "location of shapefile to use"},            { "groups","int","number of groups" },            { "groupXcol","String","name of column wich holds group X"},            { "groupXcolor","String","#rrggbb hex colour reference for shading group X"},  	        {"tooltip","string","name of column in shapefiles dbf to pull tooltips from"},                {"startID","int","Optional inital id to highlight and show graph for"},                {"highlightColor","String","Optional highlight color #rrggbb - defaults to pink."}        };        return pinfo;    }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品理论片| 6080午夜不卡| 国产精品高潮呻吟久久| 国产成人在线看| 国产日韩一级二级三级| 成人免费看视频| 国产精品乱码妇女bbbb| 99视频热这里只有精品免费| 亚洲精品日产精品乱码不卡| 91国在线观看| 日韩激情av在线| 精品国产3级a| 99视频在线精品| 视频在线观看91| 26uuu欧美| 91在线观看美女| 亚洲成人中文在线| 久久久久久久国产精品影院| 99热精品一区二区| 日韩精品一级二级 | 中文字幕亚洲在| 色哦色哦哦色天天综合| 日本不卡一区二区三区| 国产日产欧产精品推荐色| 91论坛在线播放| 乱一区二区av| 亚洲婷婷综合色高清在线| 欧美日本一区二区三区| 韩国av一区二区三区在线观看| 国产精品第五页| 日韩一区二区三区四区五区六区 | 国产精品综合视频| 一区二区三区在线视频免费| 日韩一区二区视频| 色综合久久久久久久久久久| 六月丁香婷婷久久| 中文字幕中文在线不卡住| 制服丝袜成人动漫| 99精品国产热久久91蜜凸| 麻豆国产精品视频| 一区二区三区电影在线播| 久久伊人中文字幕| 欧美日本乱大交xxxxx| 成人网页在线观看| 毛片不卡一区二区| 亚洲综合偷拍欧美一区色| 久久久精品影视| 日韩一区二区在线免费观看| 91片在线免费观看| 国产麻豆午夜三级精品| 亚洲.国产.中文慕字在线| 国产精品久久久久久户外露出 | 日韩欧美激情在线| 色综合天天综合狠狠| 成人午夜视频在线观看| 视频一区二区不卡| 1024成人网色www| 久久九九全国免费| www成人在线观看| 亚洲视频图片小说| 久久久久亚洲蜜桃| 日韩精品综合一本久道在线视频| 色综合久久中文综合久久97| 丁香网亚洲国际| 蜜臀av一区二区三区| 亚洲成人1区2区| 亚洲一区二区三区三| 亚洲人午夜精品天堂一二香蕉| 中文字幕第一区| 国产日韩三级在线| 久久这里只有精品6| 日韩欧美国产精品| 日韩一区二区三区av| 91.com视频| 日韩一区二区三区四区| 欧美一区二区在线视频| 欧美片网站yy| 91精品国产手机| 欧美一区二区在线免费播放| 91精品国产高清一区二区三区| 欧美伊人久久久久久久久影院| 色综合久久99| 欧美在线啊v一区| 欧美午夜片在线看| 91精品婷婷国产综合久久性色| 欧美日韩高清一区| 欧美一级爆毛片| 26uuu亚洲综合色欧美| 久久久久久久网| 国产免费观看久久| 中文字幕综合网| 亚洲国产综合色| 琪琪久久久久日韩精品| 久久99国产精品久久99果冻传媒| 激情欧美一区二区| 国产成人精品免费一区二区| 9久草视频在线视频精品| 在线欧美一区二区| 91精品国产综合久久福利软件| 日韩免费成人网| 亚洲国产精品传媒在线观看| 亚洲日本护士毛茸茸| 午夜精品成人在线| 国产一区日韩二区欧美三区| 99精品久久只有精品| 欧美亚洲愉拍一区二区| 日韩午夜精品视频| 国产精品亲子乱子伦xxxx裸| 亚洲免费在线观看| 欧美aaa在线| 成人免费黄色大片| 欧美日韩不卡在线| www久久精品| 亚洲激情图片小说视频| 日韩国产在线一| 国产一区二区不卡在线| 91蝌蚪国产九色| 精品国产免费视频| 亚洲欧美日韩系列| 狠狠色丁香婷综合久久| 91免费视频网址| 精品乱码亚洲一区二区不卡| 中文字幕佐山爱一区二区免费| 日本女人一区二区三区| www.日韩av| 精品国产一区二区三区久久久蜜月| 国产精品麻豆一区二区 | 亚洲一区二区三区在线看| 蜜臀av性久久久久蜜臀av麻豆| 风间由美一区二区三区在线观看 | 欧美日韩高清一区二区三区| 欧美极品美女视频| 丝袜亚洲另类欧美| 97精品久久久久中文字幕| 6080午夜不卡| 亚洲一区二区三区免费视频| 高清av一区二区| 日韩精品自拍偷拍| 午夜视频久久久久久| 99久久精品国产毛片| 久久综合九色综合久久久精品综合| 亚洲国产美女搞黄色| 9色porny自拍视频一区二区| 久久亚洲综合色一区二区三区| 亚洲综合在线免费观看| av男人天堂一区| 欧美激情一区不卡| 久久爱www久久做| 欧美精品乱码久久久久久按摩| 综合久久一区二区三区| 国内精品自线一区二区三区视频| 欧美肥胖老妇做爰| 亚洲国产日韩一级| 欧美视频自拍偷拍| 亚洲精品乱码久久久久久| eeuss鲁一区二区三区| 国产亚洲精品资源在线26u| 久久99国内精品| 日韩欧美一级二级| 蜜臀99久久精品久久久久久软件| 欧美视频一区二区三区| 亚洲一区二区三区视频在线 | 美女www一区二区| 欧美一区二区三区婷婷月色| 亚洲成人免费观看| 欧美日韩极品在线观看一区| 一区二区不卡在线播放| 欧美在线免费观看亚洲| 亚洲国产日韩精品| 欧美日韩视频在线观看一区二区三区 | 亚洲激情一二三区| 在线观看区一区二| 亚洲大尺度视频在线观看| 欧美日韩一区在线| 亚洲成人久久影院| 777奇米四色成人影色区| 天堂精品中文字幕在线| 欧美一级免费大片| 精品一区二区日韩| 日本一二三四高清不卡| 成人v精品蜜桃久久一区| 日韩理论片网站| 欧美性色欧美a在线播放| 五月婷婷激情综合| 精品久久国产字幕高潮| 在线亚洲一区观看| 免费欧美在线视频| 久久久久久久久伊人| yourporn久久国产精品| 亚洲自拍另类综合| 欧美一级一级性生活免费录像| 久久精品国产第一区二区三区| 久久久五月婷婷| 91在线一区二区三区| 亚洲bt欧美bt精品777| 2017欧美狠狠色| 色综合天天综合给合国产| 日一区二区三区| 久久精品在线观看| 在线观看三级视频欧美|