selectionchangedevent.java

来自「geotools的源码」· Java 代码 · 共 38 行

JAVA
38
字号
package uk.ac.leeds.ccg.geotools;

import java.util.*;
public class SelectionChangedEvent extends java.util.EventObject
{
    private int selected[];
    private int count;
    
    public SelectionChangedEvent(java.awt.Component source, int s[]){
        super(source);
        count = s.length;
        selected = new int[count];
        System.arraycopy(s,0,selected,0,count);//copying is safer
    }
    
    public int[] getSelection(){
        return selected;
    }
    
    public final boolean isSelected(int id){
        for(int i=0;i<count;i++){
            if(selected[i] == id){return true;}
        }
        return false;
    }
    
    public int getCount(){
        return count;
    }
    
    private String header = "~Zone DEsign System (ZDES) - Version 3.1 \n"+
                            "Designed by S.Openshaw and L.Rao, March 1994 \n"+
                            "Redesigned by S. Alvanides, March 1997 ";
                            
    private String bits = "                        ~zd3set.zdf	:  Zoning option file for...z_cgrid	:  Output zoning system from...cgrid	:  Input zoning system.Date of run	: 14 Oct 99, 2:01 PM~";
        
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?