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

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

?? propertytable.java

?? 本書收入了164個完整的Java編程實例
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.gui;import java.awt.*;import javax.swing.*;import javax.swing.table.*;   // TableModel and other JTable-related classesimport java.beans.*;          // For JavaBean introspectionimport java.util.*;           // For array sorting /** * This class is a JTable subclass that displays a table of the JavaBeans * properties of any specified class. **/public class PropertyTable extends JTable {    /** This main method allows the class to be demonstrated  standalone */    public static void main(String[] args) {	// Specify the name of the class as a command-line argument	Class beanClass = null; 	try {	    // Use reflection to get the Class from the classname	    beanClass = Class.forName(args[0]);	}	catch (Exception e) {  // Report errors	    System.out.println("Can't find specified class: "+e.getMessage());	    System.out.println("Usage: java TableDemo <JavaBean class name>");	    System.exit(0);	}		// Create a table to display the properties of the specified class	JTable table = new PropertyTable(beanClass);		// Then put the table in a scrolling window, put the scrolling 	// window into a frame, and pop it all up on to the screen	JScrollPane scrollpane = new JScrollPane(table);	JFrame frame = new JFrame("Properties of JavaBean: " + args[0]);	frame.getContentPane().add(scrollpane);	frame.setSize(500, 400);	frame.setVisible(true);    }    /**     * This constructor method specifies what data the table will display     * (the table model) and uses the TableColumnModel to customize the     * way that the table displays it.  The hard work is done by the     * TableModel implementation below.     **/    public PropertyTable(Class beanClass) {	// Set the data model for this table	try {	    setModel(new JavaBeanPropertyTableModel(beanClass));	}	catch (IntrospectionException e) {	    System.err.println("WARNING: can't introspect: " + beanClass);	}		// Tweak the appearance of the table by manipulating its column model	TableColumnModel colmodel = getColumnModel();		// Set column widths	colmodel.getColumn(0).setPreferredWidth(125);	colmodel.getColumn(1).setPreferredWidth(200);	colmodel.getColumn(2).setPreferredWidth(75);	colmodel.getColumn(3).setPreferredWidth(50);		// Right justify the text in the first column	TableColumn namecol = colmodel.getColumn(0);	DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();	renderer.setHorizontalAlignment(SwingConstants.RIGHT);	namecol.setCellRenderer(renderer);    }    /**     * This class implements TableModel and represents JavaBeans property data     * in a way that the JTable component can display.  If you've got some     * type of tabular data to display, implement a TableModel class to     * describe that data, and the JTable component will be able to display it.     **/    static class JavaBeanPropertyTableModel extends AbstractTableModel {	PropertyDescriptor[] properties;  // The properties to display	/**	 * The constructor: use the JavaBeans introspector mechanism to get 	 * information about all the properties of a bean.  Once we've got	 * this information, the other methods will interpret it for JTable.	 **/	public JavaBeanPropertyTableModel(Class beanClass)	    throws java.beans.IntrospectionException	{	    // Use the introspector class to get "bean info" about the class.	    BeanInfo beaninfo = Introspector.getBeanInfo(beanClass);	    // Get the property descriptors from that BeanInfo class	    properties = beaninfo.getPropertyDescriptors();	    // Now do a case-insensitive sort by property name	    // The anonymous Comparator implementation specifies how to 	    // sort PropertyDescriptor objects by name	    Arrays.sort(properties, new Comparator() {		    public int compare(Object p, Object q) {			PropertyDescriptor a = (PropertyDescriptor) p;			PropertyDescriptor b = (PropertyDescriptor) q;			return a.getName().compareToIgnoreCase(b.getName());		    }		    public boolean equals(Object o) { return o == this; }		});	}	// These are the names of the columns represented by this TableModel	static final String[] columnNames = new String[] {	    "Name", "Type", "Access", "Bound"	};	// These are the types of the columns represented by this TableModel	static final Class[] columnTypes = new Class[] {	    String.class, Class.class, String.class, Boolean.class	};	// These simple methods return basic information about the table	public int getColumnCount() { return columnNames.length; }	public int getRowCount() { return properties.length; }	public String getColumnName(int column) { return columnNames[column]; }	public Class getColumnClass(int column) { return columnTypes[column]; }	/**	 * This method returns the value that appears at the specified row and	 * column of the table	 **/	public Object getValueAt(int row, int column) {	    PropertyDescriptor prop = properties[row];	    switch(column) {	    case 0: return prop.getName();	    case 1: return prop.getPropertyType();	    case 2: return getAccessType(prop);	    case 3: return new Boolean(prop.isBound());	    default: return null;	    }	}	// A helper method called from getValueAt() above	String getAccessType(PropertyDescriptor prop) {	    java.lang.reflect.Method reader = prop.getReadMethod();	    java.lang.reflect.Method writer = prop.getWriteMethod();	    if ((reader != null) && (writer != null)) return "Read/Write";	    else if (reader != null) return "Read-Only";	    else if (writer != null) return "Write-Only";	    else return "No Access";  // should never happen	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看不卡一区| 亚洲影视在线播放| 色美美综合视频| 久久99精品久久久久| 亚洲一区免费在线观看| 国产精品女人毛片| 日韩一区二区在线免费观看| 91在线无精精品入口| 国产精品一二二区| 美腿丝袜一区二区三区| 午夜不卡av在线| 亚洲一区二区三区四区中文字幕| 久久精品夜色噜噜亚洲aⅴ| 欧美日韩一区三区| 在线中文字幕一区二区| www.日韩av| 国产成人一区在线| 麻豆传媒一区二区三区| 日韩黄色在线观看| 亚洲福利一二三区| 亚洲一区在线观看网站| 亚洲一区二区三区在线| 亚洲激情av在线| 一区二区三区在线视频播放| 中文字幕一区二区三中文字幕| 国产色婷婷亚洲99精品小说| 国产日韩欧美综合在线| 337p亚洲精品色噜噜噜| 91精品国产91久久久久久一区二区 | 日韩国产精品大片| 亚洲综合久久av| 亚洲激情成人在线| 香蕉影视欧美成人| 日本成人在线一区| 久久爱www久久做| 久久99精品久久久| 懂色av一区二区三区免费观看| 粉嫩aⅴ一区二区三区四区五区| 成人免费毛片a| 99久久婷婷国产| 欧美年轻男男videosbes| 欧美群妇大交群中文字幕| 91精品国产aⅴ一区二区| 337p粉嫩大胆色噜噜噜噜亚洲| 国产色产综合产在线视频| 久久精品一区二区| 一区二区三区资源| 日本不卡视频一二三区| 精品在线你懂的| 色综合亚洲欧洲| 欧美三级在线看| 337p粉嫩大胆噜噜噜噜噜91av | 日本不卡视频在线| 国模冰冰炮一区二区| 色综合久久中文字幕综合网| 91精品国产品国语在线不卡| 欧美日韩色一区| 国产亚洲一区字幕| 午夜精品一区二区三区免费视频 | 五月婷婷另类国产| 国产成人综合亚洲网站| 欧美视频一区在线| 国产日韩v精品一区二区| 亚洲欧美电影一区二区| 热久久免费视频| 91麻豆国产香蕉久久精品| 精品国产欧美一区二区| 亚洲精品中文在线影院| 寂寞少妇一区二区三区| 91国产免费看| 国产精品全国免费观看高清| 亚洲女同一区二区| 国产福利精品一区二区| 7777精品伊人久久久大香线蕉超级流畅| 欧美三级视频在线播放| 中文字幕精品在线不卡| 国内精品久久久久影院薰衣草| 日韩欧美中文字幕一区| 麻豆精品国产传媒mv男同| 欧美一区二区三区四区在线观看| 视频一区在线视频| 欧美一区二视频| 激情综合一区二区三区| 久久综合国产精品| 成人激情文学综合网| 亚洲免费观看高清完整版在线| 一本一道久久a久久精品 | 欧美日韩成人综合在线一区二区| 亚洲国产视频直播| 91精品国模一区二区三区| 男男成人高潮片免费网站| 日韩一二三四区| 国产精一品亚洲二区在线视频| 国产精品天干天干在线综合| 97久久久精品综合88久久| 亚洲精品免费播放| 制服丝袜亚洲播放| 激情偷乱视频一区二区三区| 中文在线一区二区| 欧美日韩日日摸| 国产一区91精品张津瑜| 亚洲女同一区二区| 制服丝袜亚洲网站| 国产成人午夜电影网| 亚洲视频在线一区二区| 欧美精品久久99| 国产99久久精品| 香港成人在线视频| 中文字幕乱码亚洲精品一区| 欧美在线观看一二区| 精品一区二区三区欧美| 综合久久给合久久狠狠狠97色| 69堂成人精品免费视频| 成人国产精品免费| 免费观看在线综合| 亚洲色图丝袜美腿| 精品精品国产高清a毛片牛牛 | 成人亚洲一区二区一| 亚洲一区二区视频在线| 日本一区二区免费在线| 精品视频999| 大白屁股一区二区视频| 日韩精品欧美精品| 国产精品久久久久久久久免费相片 | 欧美韩国一区二区| 91精品国产入口| 在线视频你懂得一区| 国产精品系列在线播放| 奇米色777欧美一区二区| 亚洲欧美一区二区三区国产精品 | 国产精品高潮呻吟久久| 精品国产乱码久久久久久闺蜜| 在线日韩av片| 大胆亚洲人体视频| 国产一区二区三区观看| 男男视频亚洲欧美| 午夜精品123| 亚洲国产综合91精品麻豆| 国产精品乱码久久久久久| 久久久久国产免费免费| 日韩三级精品电影久久久| 欧美日本一道本在线视频| 色婷婷av一区二区三区大白胸| 国产成人综合精品三级| 精品一区二区精品| 麻豆成人av在线| 美女被吸乳得到大胸91| 视频一区二区三区入口| 一区二区欧美视频| 亚洲精品成人天堂一二三| 国产精品色呦呦| 国产精品欧美一区二区三区| 国产精品丝袜黑色高跟| 国产精品国产三级国产a | 精品视频一区 二区 三区| 在线精品视频小说1| 欧洲精品在线观看| 欧美日韩一区三区| 欧美色偷偷大香| 欧美麻豆精品久久久久久| 欧美肥大bbwbbw高潮| 欧美高清精品3d| 日韩一区二区三| 精品福利一区二区三区| 久久精品亚洲精品国产欧美kt∨ | 国产宾馆实践打屁股91| 丰满亚洲少妇av| 日本韩国一区二区| 欧美日韩精品福利| 欧美不卡在线视频| 国产婷婷色一区二区三区在线| 中文字幕av不卡| 一区二区三区中文字幕| 日本少妇一区二区| 国产不卡一区视频| 一本到不卡精品视频在线观看| 欧美日韩亚洲另类| 精品国产乱码久久久久久影片| 国产色爱av资源综合区| 最新久久zyz资源站| 首页亚洲欧美制服丝腿| 韩日av一区二区| a在线播放不卡| 欧美精品1区2区3区| 国产网红主播福利一区二区| 亚洲精品五月天| 毛片基地黄久久久久久天堂| www.欧美.com| 制服.丝袜.亚洲.中文.综合| 国产三级精品视频| 亚洲午夜电影在线观看| 国产成人精品免费网站| 欧美色涩在线第一页| 久久久久9999亚洲精品| 一区二区三区精品| 国产一区 二区| 欧美视频三区在线播放| 中文子幕无线码一区tr| 日本色综合中文字幕| 99精品视频一区二区三区|