?? coloreditor.java~1~
字號:
package javabeans;import java.beans.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class ColorEditor extends PropertyEditorSupport { private static String[] resourceStrings = { "White", "Black", "Control Text", }; private static String[] sourceCodeStrings = { "Color.white", "new Color(0,0,0)", "SystemColor.controlText", }; public ColorEditor() { } public String[] getTags() { return resourceStrings; } public String getJavaInitializationString() { return getValue().toString(); } public String getAsText() { if (getValue() == null) { return ""; } for (int i = 0; i < sourceCodeStrings.length; i++) { if (getValue().toString().equals(sourceCodeStrings[i])) { return resourceStrings[i]; } } return ""; } public void setAsText(String text) throws IllegalArgumentException { for (int i = 0; i < resourceStrings.length; i++) { if (text.equals(resourceStrings[i])) { setValue(sourceCodeStrings[i]); return; } } throw new IllegalArgumentException(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -