📄 e.java
字号:
sizeLarge=16;
heightSmall=12;
heightMedium=12;
heightLarge=16;
break;
case Emulator.NOKIA_N7610:
sizeSmall=12;
sizeMedium=16;
sizeLarge=16;
heightSmall=15;
heightMedium=20;
heightLarge=20;
break;
case Emulator.NOKIA_QD:
sizeSmall=12;
sizeMedium=12;
sizeLarge=16;
heightSmall=14;
heightMedium=14;
heightLarge=20;
break;
case Emulator.NOKIA_N7260:
sizeSmall=12;
sizeMedium=12;
sizeLarge=16;
heightSmall=12;
heightMedium=12;
heightLarge=16;
break;
case Emulator.MOTOROLA_A760:
case Emulator.MOTOROLA_V600:
case Emulator.MOTOROLA_V878_V690:
case Emulator.MOTOROLA_E680:
case Emulator.MOTOROLA_C650:
case Emulator.MOTOROLA_E398:
case Emulator.MOTOROLA_A668:
sizeSmall=16;
sizeMedium=16;
sizeLarge=16;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.SONYERICSSON_K700:
sizeSmall=16;
sizeMedium=16;
sizeLarge=20;
heightSmall=18;
heightMedium=18;
heightLarge=22;
break;
case Emulator.SONYERICSSON_K506:
case Emulator.SONYERICSSON_S700:
case Emulator.SONYERICSSON_T628:
case Emulator.SONYERICSSON_P908:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=14;
heightMedium=14;
heightLarge=16;
break;
case Emulator.SAMSUNG_S208:
case Emulator.SAMSUNG_E108:
case Emulator.SAMSUNG_D508:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.SIEMENS_S57:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.NEC_N800:
case Emulator.NEC_N810:
case Emulator.NEC_N820:
case Emulator.NEC_N100:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.PANASONICX_MX6:
case Emulator.PANASONICX_X800:
case Emulator.PANASONICX_A500:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.DATANG_GX10N:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.TCL_E767:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
case Emulator.DOPOD_585:
sizeSmall=12;
sizeMedium=13;
sizeLarge=14;
heightSmall=20;
heightMedium=20;
heightLarge=20;
break;
default:
throw new IllegalArgumentException("Unsupported Device");
}
BQFont.initFontSize(sizeSmall,sizeMedium,sizeLarge,
heightSmall,heightMedium,heightLarge);
}
public int getCurrentDevice(){
return deviceType;
}
public static int getDeviceType(String deviceName){
if(deviceName.equalsIgnoreCase("NOKIA_N7210")){
return Emulator.NOKIA_N7210;
}else if(deviceName.equalsIgnoreCase("NOKIA_N7610")){
return Emulator.NOKIA_N7610;
}else if(deviceName.equalsIgnoreCase("NOKIA_QD")){
return Emulator.NOKIA_QD;
}else if(deviceName.equalsIgnoreCase("NOKIA_N7260")){
return Emulator.NOKIA_N7260;
}else if(deviceName.equalsIgnoreCase("MOTOROLA_A760")){
return Emulator.MOTOROLA_A760;
}else if(deviceName.equalsIgnoreCase("MOTOROLA_V600")){
return Emulator.MOTOROLA_V600;
}
else if(deviceName.equalsIgnoreCase("MOTOROLA_V878_V690")){
return Emulator.MOTOROLA_V878_V690;
}
else if(deviceName.equalsIgnoreCase("MOTOROLA_E680")){
return Emulator.MOTOROLA_E680;
}
else if(deviceName.equalsIgnoreCase("MOTOROLA_C650")){
return Emulator.MOTOROLA_C650;
}
else if(deviceName.equalsIgnoreCase("MOTOROLA_E398")){
return Emulator.MOTOROLA_E398;
}
else if(deviceName.equalsIgnoreCase("MOTOROLA_A668")){
return Emulator.MOTOROLA_A668;
}
else if(deviceName.equalsIgnoreCase("SONYERICSSON_K700")){
return Emulator.SONYERICSSON_K700;
}
else if(deviceName.equalsIgnoreCase("SONYERICSSON_K506")){
return Emulator.SONYERICSSON_K506;
}
else if(deviceName.equalsIgnoreCase("SONYERICSSON_S700")){
return Emulator.SONYERICSSON_S700;
}
else if(deviceName.equalsIgnoreCase("SONYERICSSON_T628")){
return Emulator.SONYERICSSON_T628;
}
else if(deviceName.equalsIgnoreCase("SONYERICSSON_P908")){
return Emulator.SONYERICSSON_P908;
}
else if(deviceName.equalsIgnoreCase("SAMSUNG_S208")){
return Emulator.SAMSUNG_S208;
}
else if(deviceName.equalsIgnoreCase("SAMSUNG_E108")){
return Emulator.SAMSUNG_E108;
}
else if(deviceName.equalsIgnoreCase("SAMSUNG_D508")){
return Emulator.SAMSUNG_D508;
}
else if(deviceName.equalsIgnoreCase("SIEMENS_S57")){
return Emulator.SIEMENS_S57;
}
else if(deviceName.equalsIgnoreCase("NEC_N800")){
return Emulator.NEC_N800;
}
else if(deviceName.equalsIgnoreCase("NEC_N810")){
return Emulator.NEC_N810;
}
else if(deviceName.equalsIgnoreCase("NEC_N820")){
return Emulator.NEC_N820;
}
else if(deviceName.equalsIgnoreCase("NEC_N100")){
return Emulator.NEC_N100;
}
else if(deviceName.equalsIgnoreCase("PANASONICX_MX6")){
return Emulator.PANASONICX_MX6;
}
else if(deviceName.equalsIgnoreCase("PANASONICX_X800")){
return Emulator.PANASONICX_X800;
}
else if(deviceName.equalsIgnoreCase("PANASONICX_A500")){
return Emulator.PANASONICX_A500;
}
else if(deviceName.equalsIgnoreCase("DATANG_GX10N")){
return Emulator.DATANG_GX10N;
}
else if(deviceName.equalsIgnoreCase("TCL_E767")){
return Emulator.TCL_E767;
}
else if(deviceName.equalsIgnoreCase("DOPOD_585")){
return Emulator.DOPOD_585;
}
return Emulator.NOKIA_N7610;
}
public int getCurrentScreenType(){
return screenType;
}
public int getDeviceImageWidth(){
return deviceImageWidth;
}
public int getDeviceImageHeight(){
return deviceImageHeight;
}
public static String getString(String key,int type){
return i(key,type);
}
public BQImage loadDeviceImage() {
BQImage img=null;
try{
img=BQImage.createImage(new ByteArrayInputStream(h(screenType)));
deviceImageWidth=img.getWidth();
deviceImageHeight=img.getHeight();
}catch(IOException e){
e.printStackTrace();
}
return img;
}
public BQImage loadAlphaImage(){
BQImage img=null;
try{
img=BQImage.createImage(new ByteArrayInputStream(t(screenType)));
}catch(IOException e){
e.printStackTrace();
}
return img;
}
public BufferedImage loadButtonImage(){
BufferedImage img=null;
try{
BQImage tp=BQImage.createImage(new ByteArrayInputStream(q(screenType)));
img=new BufferedImage(tp.getWidth(),tp.getHeight(),BufferedImage.TYPE_INT_ARGB);
img.getGraphics().drawImage(tp.getTrueImage(),0,0,null);
}catch(IOException e){
e.printStackTrace();
}
return img;
}
public int[] getButtonPositions(){
return r(screenType);
}
public BQImage getIconImage(){
BQImage img=null;
try{
img=BQImage.createImage(new ByteArrayInputStream(k()));
}catch(IOException e){
e.printStackTrace();
}
return img;
}
public void addScreenPanel(DevicePanel p, BQDisplayable d){
l(p,d);
}
public void setScreenBounds(BQDisplayable d, int ox, int oy, int w, int h){
f(d,ox,oy,w,h);
}
public BQImage getLogoImage(){
BQImage img=null;
try{
img=BQImage.createImage(new ByteArrayInputStream(m()));
}catch(IOException e){
e.printStackTrace();
}
return img;
}
public int getSupportedDeviceTypeCnt(){
return n();
}
public int getCertainDeviceCnt(int type){
return o(type);
}
public String getDeviceName(int type){
return p(type);
}
public void shellExecute(int type, String arg){
j(type,arg);
}
public static int[] getImageRGB(byte[] imgData,int off, int len){
return s(imgData,off,len);
}
/*
public static void playTone(int freq, int dur){
t(freq,dur);
}*/
public int getAlphabetX(){
return u(screenType);
}
public int getAlphabetY(){
return v(screenType);
}
public void alert(String cap,String str){
}
//get screenType;
private native int a(int deviceType);
//get width;
private native int c(int screenType);
//get height
private native int d(int screenType);
//get screenx
private native int b(int screenType);
//get screeny
private native int g(int screenType);
//get deviceImageData
private native byte[] h(int deviceType);
//set bounds of device
private native void f(BQDisplayable d, int ox, int oy, int o, int oo);
//get Emulator UI used string
private static native String i(String k, int type);
//shellExecute
private native void j(int type, String arg);
//get icon image data
private native byte[] k();
//add BQDisplayable to Devicepanel
private native void l(DevicePanel p, BQDisplayable d);
//getLogoData
private native byte[] m();
//getSupportedDeviceTypeCnt()
private native int n();
//getCertainDeviceCnt(int type)
private native int o(int type);
//getDeviceName()
private native String p(int type);
//getButtonImageData
private native byte[] q(int screenType);
//getButtonPositions
private native int[] r(int screenType);
//getImageRGB
private static native int[] s(byte[] data, int off, int len);
//get alphabet img
private native byte[] t(int screenType);
private native int u(int screenType);
private native int v(int screenType);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -