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

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

?? theme.java

?? geotools的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package uk.ac.leeds.ccg.geotools;

import java.lang.*;
import java.awt.*;
import java.util.*;
import java.io.*;

/**
 * A theme holds all of the information needed by a viewer to display a thematic map, including a layer, shadeing and highlightng scheem.
 * A theme acts as a container for all of the aspects that make up a thematic display of a geographic feature.  It
 * also handles all of the comunication between viewers, layers and some highlights.
 * Any clicks in the viewer can be set to pass to a theme where it will be converted to an ID from the layer and then finaly set in the highlightManager.
 * Once constructed a theme can be added to multiple viewers without problems.<p>
 * There are a number of parts that make up a theme, and this is reflected by the
 * number of constructers, the following is a list of all the parts. <br>
 * Constructors that lack parts will make their own as needed.<p>
 * The main parts that make up a <b>full</b> theme are:
 * <ul>
 * <li><b>layer: </b>Contains the geographic features for this theme.
 * <li><b>shade: </b>Defines the shading scheme to use when displaying.
 * <li><b>data: </b>The GeoData that will provide data to the layer.
 * <li><b>style: </b>Defines how a feature should be painted.
 * <li><b>highlightStyle: </b>Defines how highlighting should look.
 * <li><b>selectionStyle: </b>Defines how selections should look.
 * <li><b>highlight: </b>A highlight manager, probably shared with other themes
 * <li><b>selectionMgr: </b>A selection manager, can be shared with other themes
 * <li><b>name: </b>A name for this theme.
 * </ul>
 */
public class Theme extends Object implements FilterChangedListener,SelectionPositionChangedListener,HighlightPositionChangedListener,HighlightChangedListener,LayerChangedListener, SelectionChangedListener, SelectionRegionChangedListener,ShaderChangedListener,Serializable{
private final static boolean DEBUG=false;
protected Layer layer;
protected Shader shade = new MonoShader(Color.lightGray);
protected Filter filter = null; //i.e. no filtering
protected GeoData data = new SimpleGeoData();
protected GeoData tipData = new SimpleGeoData();
protected GeoData[] complexTipData;
protected String tipformat;
protected ShadeStyle style = new ShadeStyle();
protected ShadeStyle highlightStyle = new ShadeStyle(true, true, Color.red,Color.red,false);
protected ShadeStyle selectionStyle = new ShadeStyle(true, true, Color.blue,Color.blue,false);
protected HighlightManager highlight;
protected Vector listeners;
protected SelectionManager selectionMgr;
protected String name = "Unknown";
public static final String cvsid = "$Id: Theme.java,v 1.20 2001/11/15 13:49:07 jmacgill Exp $";
    /**
     * A full constructor for a theme, requiering the provision of all parts.
     * @param l The layer containing the geographic features.
     * @param s The shader to use when colouring in the layer.
     * @param n A String describing or nameing this theme.
     * @param hm A HighlightManager, clicks in the viewer converted into highlight requests.
     * @param d The GeoData object to base link feature IDs in the layer with attribute values.
     * @param t The GeoData object to base link feature IDs in the layer with ToolTip info.
     * @param style A ShadeStyle object to pass to the layer.
     */
    public Theme(Layer l,Shader s,String n,HighlightManager hm,GeoData d,GeoData t,ShadeStyle style){
		if(DEBUG)System.out.println("---->uk.ac.leeds.ccg.geotools.Theme constructed. Will identify itself as T--->");
		layer = l;
        if(s!=null){
            shade = s;
        }
        shade.addShaderChangedListener(this);
        //shade = s;
        name = n;
        if(d!=null){
            data = d;
        }
        if(t!=null){
            tipData = t;
        }
        /*else{
            tipData = data;
        }*/
        if(style!=null){
            this.style = style;
        }
        else
        {
            if(l instanceof LineLayer){
                this.style.setLineColorFromShader(true);
                if(s==null){shade = new MonoShader(Color.black);}
            }
        }
        
        setHighlightManager(hm);
        listeners = new Vector();
        layer.addLayerChangedListener(this);  
    }
    
    /**
     * A full constructor for a theme, requiering the provision of all parts except the new tipData .
     * @param l The layer containing the geographic features.
     * @param s The shader to use when colouring in the layer.
     * @param n A String describing or nameing this theme.
     * @param hm A HighlightManager, clicks in the viewer converted into highlight requests.
     * @param d The GeoData object to base link feature IDs in the layer with attribute values.
     * @param style A ShadeStyle object to pass to the layer.
     */
    public Theme(Layer l,Shader s,String n,HighlightManager hm,GeoData d,ShadeStyle style){
        this(l,s,n,hm,d,null,null);
    }
    
    /**
     * The old full constructor for a theme, requiering the provision of all parts except the style object
     * @param l The layer containing the geographic features.
     * @param s The shader to use when colouring in the layer.
     * @param n A String describing or nameing this theme.
     * @param hm A HighlightManager, clicks in the viewer converted into highlight requests.
     * @param d The GeoData object to base link feature IDs in the layer with attribute values.
     */
    public Theme(Layer l,Shader s,String n,HighlightManager hm,GeoData d){
        this(l,s,n,hm,d,null);
    }
    

    /**
     * The default constructor lacks too many of the requred paramiters to be of general use.
     */
    public Theme(){
        //shade = new MonoShader(Color.lightGray);
        listeners = new Vector();
    }

    /**
     * Constructs a very simple mono shaded (lightGray) theme from the given layer.
     * It will have no name,highlightManager or data and all features will be shaded light gray
     * @param l the Layer to base this theme on.
     */
    public Theme(Layer l){
        this(l,null,"Unknown",null,null);
    }
    
    /**
     * Constructs a simple theme from a layer and a shader.
     * As this theme has no GeoData object this constructor only makes sence
     * if the layer has its own built in data or if the shader is designed to give
     * sensible shading from the feature IDs alone.
     * @param l The layer to base this theme on.
     * @param s A shader for this theme.
     */
    public Theme(Layer l,Shader s){
        this(l,s,"Unknown",null,null);
    }
    
    /**
     * Constructs a simple named theme from a layer and a shader.
     * As this theme has no GeoData object this constructor only makes sence
     * if the layer has its own built in data or if the shader is designed to give
     * sensible shading from the feature IDs alone.
     * @param l The layer to base this theme on.
     * @param s A shader for this theme.
     * @param n A String that names this shader
     */
    public Theme(Layer l,Shader s,String n){
        this(l,s,n,null,null);
    }
    
    /**
     * Constructs a named theme from a layer and a shader.
     * Linked displays can be constructed if a theme in a different viewer
     * shares the same HighlightManager.
     * @param l The layer to base this theme on.
     * @param s A shader for this theme.
     * @param n A String that names this shader
     * @param hm The HighlightManager to comunicarte highlight requests through.
     */
    public Theme(Layer l,Shader s,String n,HighlightManager hm){
        this(l,s,n,hm,null);  
    }
    
   
    /**
     * Gets the current HighlightManager that can be used to set up linked views to this theme.
     */
    public HighlightManager getHighlightManager(){
        return highlight;
    }
    
    /**
     * Gets the current SelectionManager that can be used to set up linked views to this theme.
     */
    public SelectionManager getSelectionManager(){
        return this.selectionMgr;
    }

    /**
     * Sets the current shader for this theme
     * @param shader The Shader to use.
     */
    public void setShader(Shader s){
        if(shade!=null)shade.removeShaderChangedListener(this);
        shade=s;
        if(layer instanceof PolygonLayer){
            s.setKeyStyle(Shader.BOX);
            System.out.println("Set style as box");
        }
        if(layer instanceof LineLayer){
            s.setKeyStyle(Shader.LINE);
            System.out.println("Set style as line");
        }
        if(layer instanceof PointLayer){
            s.setKeyStyle(Shader.POINT);
            System.out.println("Set style as point");
        }
        shade.addShaderChangedListener(this);
        notifyThemeChangedListeners(ThemeChangedEvent.SHADE);
        
    }
    
    /**
     * Called when the properties of the current shader have changed
     * @param shader The Shader to use.
     */
    public void shaderChanged(ShaderChangedEvent e){
        if(DEBUG)System.out.println("T--->("+name+")The shader has been modified");
        notifyThemeChangedListeners(ThemeChangedEvent.SHADE);
    }
        
    
    /**
     * Get a key for this theme from its shader
     * @return Key the key object for this themes shader
     */
     public Key getKey(){
        return shade.getKey();
     }
    
    /**
     * Sets the ShadeStyle for this theme
     * @param style The ShadeStyle for this themes layer to use.
     */
    public void setStyle(ShadeStyle style){
        this.style = style;
    }
    
    /**
     * Gets the ShadeStyle currently in use by this theme
     * @return ShadeStyle the ShadeStyle object
     */
    public ShadeStyle getShadeStyle(){
        return this.style;
    }
    
    /**
     * Sets the HighlightShadeStyle for this theme
     * @param style The ShadeStyle for this themes layer to use.
     */
    public void setHighlightStyle(ShadeStyle style){
        this.highlightStyle = style;
    }
    
    /**
     * Gets the HighlightShadeStyle currently in use by this theme
     * @return ShadeStyle the HighlightShadeStyle object
     */
    public ShadeStyle getHighlightShadeStyle(){
        return this.highlightStyle;
    }    
    
        
    /**
     * Sets the SelectionShadeStyle for this theme
     * @param style The ShadeStyle for this themes layer to use.
     */
    public void setSelectionStyle(ShadeStyle style){
        this.selectionStyle = style;
    }

    /**
     * Gets the HighlightShadeStyle currently in use by this theme
     * @return ShadeStyle the HighlightShadeStyle object
     */
    public ShadeStyle getSelectionShadeStyle(){
        return this.selectionStyle;
    }        
    
    /**
     * Sets the highlightManager for this theme.  The theme will then take care of 
     * highlight comunication with its layer.
     * @param h A HighlightManager.
     */
    public void setHighlightManager(HighlightManager h){
        if(highlight!=null){
            highlight.removeHighlightChangedListener(this);
        }
        highlight = h;
        if(highlight !=null){
            highlight.addHighlightChangedListener(this);
        }
    }
    
    /**
     * Sets the selectionManager for this theme.  The theme will then take care of 
     * selection comunication with its layer.
     * @param s A SelectionManager.
     */
    public void setSelectionManager(SelectionManager s){
        if(selectionMgr!=null){
            selectionMgr.removeSelectionChangedListener(this);
        }
        selectionMgr = s;
        if(selectionMgr !=null){
            selectionMgr.addSelectionChangedListener(this);
        }
    }
    
    
    /**
     * Sets the GeoData for this theme, any viwers containing this theme will be 
     * notifed in order to repaint and display the new information.
     * @param d A GeoData containing the new data for this theme.
     */
    public void setGeoData(GeoData d){
        if(data!=d){
            data=d;
            notifyThemeChangedListeners(ThemeChangedEvent.GEOGRAPHY);
        }
        //???change this to .DATA
    }
    
    /**
     * Viewers have the ability to display short popup messages
     * in the form of tool tips when the users mouse rests over features
     * in the map.<p>
     * By setting the TipData for a theme it is posible to set what this string
     * should be for each feature.<br>
     * The GeoData supplied to this method sould assosiate feature ids found in this
     * theme with numeric or string values to display in the tool tips.<p>
     *
     * An example of use might be:<br>
     * <code>theme.setTipData(shapefileReader.readData("Names"));<br>
     * </code>
     * 
     * @author James Macgill
     * @see #getTipText
     * @param d A GeoData containing the new Tool Tip data for this theme.
     */
    public void setTipData(GeoData t){
        if(tipData!=t){
            tipData=t;
          //  notifyThemeChangedListeners(ThemeChangedEvent.GEOGRAPHY);
        }
        //???change this to .DATA
    } 
    
     /**
     * Viewers have the ability to display short popup messages
     * in the form of tool tips when the users mouse rests over features
     * in the map.<p>
     * This method provides flexible tooltips at the expence of being a little less
     * straight forward than setTipData().<br>
     * To construct setup a tooltip this method needs a format string wich is a string
     * containing special characters that will be parsed, and an array of GeoData columns
     * to be put into the formatstring when the tooltip is shown<p>
     *
     * An example of use might be:<br>
     * <code>
     *      TooltipArray[0]=shapefileReader.readData("Country");
     *      TooltipArray[1]=shapefileReader.readData("Population");
     *      theme.setComplexTipData(TooltipArray, "%s: %s");<br>
     * </code>
     * This would produce tooltips of the form "Norway: 40000000" when run. Note that more than 
     * one element can be used, and static strings can be a part of the tooltip.
     *
     * 
     * @author Kjetil Thuen
     * @see #setTipData
     * @see #getTipText
     * @param t An array of GeoDatas containing the new Tool Tip data for this theme.
     * @param ts A formatstring. 
     */
    public void setComplexTipData(GeoData t[], String ts) {
      if (complexTipData != t) {
         complexTipData = t;
      }
      tipformat = ts;
    }
    
    
    /**
     * gets the current geoData.
     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品久久理论片| 中文字幕欧美国产| 欧美一区二区三区视频在线| 色婷婷综合久久久久中文一区二区 | 五月婷婷欧美视频| 亚洲综合丝袜美腿| 日欧美一区二区| 九一九一国产精品| 99re热视频精品| 91蝌蚪porny成人天涯| 欧美日韩www| 国产欧美精品一区| 亚洲精品视频在线看| 免费高清视频精品| 91色综合久久久久婷婷| 91精品国产一区二区三区蜜臀 | 日韩一区二区三区视频在线| 久久品道一品道久久精品| 亚洲精品国产a| 美女久久久精品| 国产精品1区2区| 欧美在线观看禁18| 国产日韩高清在线| 日韩精品一二三| 91丨国产丨九色丨pron| 欧美视频日韩视频在线观看| 欧美精品v国产精品v日韩精品| 777午夜精品免费视频| 中文字幕不卡在线观看| 热久久久久久久| 一本高清dvd不卡在线观看| 日韩美一区二区三区| 亚洲成人av一区二区三区| 不卡一区在线观看| 久久精品综合网| 蜜桃视频在线观看一区二区| 欧美狂野另类xxxxoooo| 亚洲国产精品久久人人爱蜜臀| 99久久伊人久久99| 中文字幕欧美三区| 极品美女销魂一区二区三区免费| 欧美三级韩国三级日本一级| 国产亚洲视频系列| 成人免费视频免费观看| 欧美电影免费提供在线观看| 毛片不卡一区二区| 国产精品美女久久久久久久久久久| 国产九九视频一区二区三区| 精品国产百合女同互慰| 国产寡妇亲子伦一区二区| 日韩欧美国产wwwww| 狠狠色狠狠色综合日日91app| 欧美人与性动xxxx| 天使萌一区二区三区免费观看| 欧美三级乱人伦电影| 国内精品国产成人| 国产精品不卡视频| 欧美三级视频在线| 精品亚洲成av人在线观看| 国产日韩欧美高清在线| 色婷婷精品久久二区二区蜜臀av| 天天色综合天天| 久久久久久97三级| 欧美色成人综合| 麻豆成人在线观看| 中文字幕一区二区三区不卡在线| 99re热这里只有精品视频| 日韩综合在线视频| 亚洲美女一区二区三区| 欧美成人一区二区三区在线观看 | 国产片一区二区三区| 在线观看日韩国产| 国产**成人网毛片九色| 99久久精品免费| 蜜桃视频在线观看一区| 国产日产欧产精品推荐色 | 国产网红主播福利一区二区| jvid福利写真一区二区三区| 亚洲成av人片| 日本一区中文字幕| 国产欧美综合在线观看第十页 | 亚洲成人综合网站| 亚洲综合色自拍一区| 国产精品亲子伦对白| 国产亲近乱来精品视频| 中文字幕免费不卡在线| 久久看人人爽人人| 国产精品私人影院| 国产精品久久久久一区二区三区 | 国产精品高潮呻吟| 国产欧美日韩视频一区二区| 国产精品国产三级国产| 久久久久久免费| 日韩欧美高清dvd碟片| 精品国产第一区二区三区观看体验 | 欧美xxxx老人做受| 久久久精品免费网站| 欧美精品一区二区三区四区| 这里只有精品视频在线观看| 精品国产sm最大网站免费看| 精品国产一区二区三区久久久蜜月 | 欧美视频一区在线观看| 在线观看免费亚洲| 欧美一区二区三区在线电影| 欧美一区中文字幕| 久久这里只有精品6| **性色生活片久久毛片| 精品影视av免费| 欧美区在线观看| 亚洲高清视频在线| 91视视频在线观看入口直接观看www | 国产伦精品一区二区三区视频青涩 | 不卡高清视频专区| 欧美日韩中文字幕精品| 久久奇米777| 午夜视频在线观看一区二区| 国产精品一二三四五| 6080国产精品一区二区| 国产精品国产三级国产aⅴ原创| 国产欧美日韩激情| 国产综合色精品一区二区三区| 92国产精品观看| 精品国产亚洲一区二区三区在线观看 | 日韩av中文字幕一区二区 | av电影天堂一区二区在线观看| 欧美日韩中字一区| 亚洲国产毛片aaaaa无费看 | 亚洲色欲色欲www| 色哟哟欧美精品| 亚洲制服丝袜一区| 91成人在线免费观看| 亚洲综合区在线| 欧美猛男gaygay网站| 五月激情综合婷婷| 亚洲精品一区二区精华| 国产成人精品免费在线| 综合婷婷亚洲小说| 欧美三级资源在线| 国内一区二区在线| 国产精品系列在线| 欧美日韩亚洲综合一区 | 欧美一区永久视频免费观看| 日韩精品一级中文字幕精品视频免费观看| 色婷婷精品久久二区二区蜜臂av| 亚洲精品五月天| 日韩精品一区二区在线| 国产乱妇无码大片在线观看| 久久久国产精品午夜一区ai换脸| 99国产欧美久久久精品| 日韩中文字幕一区二区三区| 欧美精品一区二区三区蜜桃| 91污片在线观看| 免费在线观看一区二区三区| 国产精品免费久久| 日韩欧美二区三区| 欧美色视频一区| 国产91精品欧美| 免费成人在线视频观看| 亚洲伦在线观看| 久久精品视频免费| 精品乱码亚洲一区二区不卡| 色呦呦国产精品| 色综合久久综合网欧美综合网| 久久精品国产99久久6| 日本美女一区二区| 亚洲三级电影网站| 中文av一区特黄| 国产精品色一区二区三区| 精品国产免费一区二区三区香蕉| 91精品久久久久久久99蜜桃 | 亚洲欧洲制服丝袜| 国产精品美女一区二区在线观看| 国产香蕉久久精品综合网| 欧美精品一区二区三区视频| 精品噜噜噜噜久久久久久久久试看 | 精品少妇一区二区三区在线播放| 精品视频在线看| 日韩午夜小视频| 国产精品网站在线播放| 国产精品成人一区二区三区夜夜夜| 国产精品久久99| 一区二区三区精品久久久| 亚洲一区在线视频观看| 日韩和欧美一区二区三区| 国产综合久久久久久久久久久久 | 91免费在线视频观看| 欧美日韩性生活| 欧美成人精品高清在线播放 | 奇米影视一区二区三区小说| 一区二区三区四区视频精品免费| 午夜av一区二区| 国产成人精品一区二区三区四区| 91美女在线看| 欧美精品一级二级三级| 欧美国产欧美综合| 视频一区二区欧美| 91丝袜国产在线播放| 久久久久国产精品人| 奇米精品一区二区三区在线观看| 99久久精品免费看国产|