blackberrygraphicaltheme.java

来自「moblie syncml mail javame」· Java 代码 · 共 56 行

JAVA
56
字号
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.funambol.mailclient.ui.view;

import javax.microedition.lcdui.Font;


public class BlackberryGraphicalTheme extends BasicGraphicalTheme {

    private Font defaultFont;
    
    public BlackberryGraphicalTheme() {
    
    //BlackBerry does not implement theme reading. Black gets returned for
    //everything, contrary to javadocs. 
    
    this.highlightedBackgroundColor=getTitleBackgroundColor();
    this.highlightedForegroundColor=0xFFFFFF;
    this.highlightedBorderColor=getTitleBackgroundColor();
    this.backgroundColor=0xFFFFFF;
    this.foregroundColor=0x000000;
    this.borderColor=0xFFFFFF;
    defaultFont =     Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);
    }

     public Font getDefaultFont() {
        return defaultFont;
        //return getSmallFont();
    }
      public Font getSmallBoldFont() {
        return Font.getFont(defaultFont.getFace(), Font.STYLE_BOLD, Font.SIZE_SMALL);
     
    }
     public Font getBoldFont() {
        return Font.getFont(defaultFont.getFace(), Font.STYLE_BOLD, defaultFont.getSize());
        //return getSmallBoldFont();
    }
    
    public Font getTitleFont() {
        
        return Font.getFont(defaultFont.getFace(), defaultFont.getStyle(), Font.SIZE_SMALL);
       
    }
 
      public Font getSmallFont() {
        return Font.getFont(defaultFont.getFace(), defaultFont.getStyle(), Font.SIZE_SMALL);
     
    }
    
     
     
}

⌨️ 快捷键说明

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