📄 basicgraphicaltheme.java
字号:
/*
* Copyright (C) 2006-2007 Funambol
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
package com.funambol.mailclient.ui.view;
import com.funambol.mailclient.ui.controller.UIController;
import javax.microedition.lcdui.Font;
public class BasicGraphicalTheme implements GraphicalTheme {
private int backgroundColor=UIController.display.getColor(UIController.display.COLOR_BACKGROUND);
private int highlightedBackgroundColor=UIController.display.getColor(UIController.display.COLOR_HIGHLIGHTED_BACKGROUND);
private int foregroundColor= UIController.display.getColor(UIController.display.COLOR_FOREGROUND);
private int highlightedForegroundColor=UIController.display.getColor(UIController.display.COLOR_HIGHLIGHTED_FOREGROUND);
private int borderColor= UIController.display.getColor(UIController.display.COLOR_BORDER);
private int highlightedBorderColor = UIController.display.getColor(UIController.display.COLOR_HIGHLIGHTED_BORDER);
/** Creates a new instance of Graphicaltheme with platform-coherent colors */
public BasicGraphicalTheme() {
}
public int getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(int backgroundColor) {
this.backgroundColor = backgroundColor;
}
public int getHighlightedBackgroundColor() {
return highlightedBackgroundColor;
}
public void setHighlightedBackgroundColor(int highlightedBackgroundColor) {
this.highlightedBackgroundColor = highlightedBackgroundColor;
}
public int getForegroundColor() {
return foregroundColor;
}
public void setForegroundColor(int foregroundColor) {
this.foregroundColor = foregroundColor;
}
public int getHighlightedForegroundColor() {
return highlightedForegroundColor;
}
public void setHighlightedForegroundColor(int higlightedForegroundColor) {
this.highlightedForegroundColor = higlightedForegroundColor;
}
public int getBorderColor() {
return borderColor;
}
public void setBorderColor(int borderColor) {
this.borderColor = borderColor;
}
public int getHighlightedBorderColor() {
return highlightedBorderColor;
}
public void setHighlightedBorderColor(int higlightedBorderColor) {
this.highlightedBorderColor = higlightedBorderColor;
}
public Font getDefaultFont(){
//return Font.getDefaultFont();
return getSmallFont();
}
public Font getSmallFont() {
return Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);
}
public Font getBoldFont() {
//return Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
return getSmallBoldFont();
}
public int getTitleColor() {
//return getBackgroundColor();
// use white as color for title text
return 0xFFFFFF;
}
public Font getTitleFont() {
// return getBoldFont();
return Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
}
public int getTitleBackgroundColor() {
//return getForegroundColor();
// use blue from logo icon as color for title background
return 0x0878a1;
}
public int getTitleBorderColor() {
return getHighlightedBorderColor();
}
public Font getSmallBoldFont() {
return Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_SMALL);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -