?? lblstyleeditor.java
字號(hào):
package chapter8;
import java.beans.*;
public class LblStyleEditor
extends PropertyEditorSupport
{
static String[] resourceStrings ={"英文標(biāo)簽","中文標(biāo)簽","數(shù)學(xué)標(biāo)簽",};
static int[] intValues ={0,1,2,};
static String[] sourceCodeStrings ={"RangeBean.EN_LABLE_STYLE",
"RangeBean.CN_LABLE_STYLE",
"RangeBean.MATH_LABLE_STYLE",};
public LblStyleEditor()
{
}
public String[] getTags()
{
return resourceStrings;
}
public String getJavaInitializationString()
{
Object value = getValue();
for (int i = 0; i < intValues.length; i++)
{
if (value.equals(new Integer(intValues[i])))
{
return sourceCodeStrings[i];
}
}
return null;
}
public String getAsText()
{
Object value = getValue();
for (int i = 0; i < intValues.length; i++)
{
if (value.equals(new Integer(intValues[i])))
{
return resourceStrings[i];
}
}
return null;
}
public void setAsText(String text)
throws IllegalArgumentException
{
for (int i = 0; i < resourceStrings.length; i++)
{
if (text.equals(resourceStrings[i]))
{
setValue(new Integer(intValues[i]));
return;
}
}
throw new IllegalArgumentException();
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -