| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.kwis.msp.lcdui.Font
글꼴 클래스 입니다.
 문자열을 찍는데 사용되는 문자를 나타내는 글꼴 클래스입니다.
 getFont를 사용해서 원하는 폰트를 가져옵니다. 
 기본적으로 getFont를 해서 가져온
 폰트는 내부적으로 공유하므로 자원을 프리해야할 필요는 없습니다.
 
 getFont함수로 가져와서 
 Graphics.setFont(org.kwis.msp.lcdui.Font)함수를 
 통해서 폰트를 지정하여 문자의 화면 출력 외형을 변경할 수 있습니다. 
 
 getFont를 통해서 시스템에 따라서,
 지정한 폰트가 아닌 그와 유사한 폰트를 돌려 받을 수 있습니다.
 
 문자열의 화면 출력 길이를 알기 위해서는 stringWidth나 
 substringWidth함수를 사용합니다.
 
 
 폰트의 스타일은 다음중 하나가 됩니다.
 STYLE_PLAIN
 STYLE_UNDERLINED 
 STYLE_BOLD
 STYLE_BOLD | STYLE_UNDERLINED
 STYLE_ITALIC
 STYLE_ITALIC | STYLE_UNDERLINED
 STYLE_BOLD | STYLE_ITALIC
 STYLE_BOLD | STYLE_ITALIC | STYLE_UNDERLINED
| Field Summary | |
| protected  int | face | 
| static int | FACE_MONOSPACEMonospace폰트 페이스. | 
| static int | FACE_PROPORTIONALProportional폰트 페이스. | 
| static int | FACE_SYSTEMSystem 폰트 페이스. | 
| protected  int | size | 
| static int | SIZE_LARGE큰 크기의 폰트 크기. | 
| static int | SIZE_MEDIUM중간 크기의 폰트 크기. | 
| static int | SIZE_SMALL작은 크기의 폰트 크기. | 
| protected  int | style | 
| static int | STYLE_BOLD진한 폰트 스타일. | 
| static int | STYLE_ITALIC기운 폰트 스타일. | 
| static int | STYLE_PLAIN보통 폰트 스타일. | 
| static int | STYLE_UNDERLINED밑줄 그은 폰트 스타일. | 
| Method Summary | |
|  int | charsWidth(char[] ch,
           int offset,
           int length)문자열의 화면상의 폭을 넘겨줍니다. | 
|  int | charWidth(char ch)문자의 화면상의 폭을 넘겨 줍니다. | 
|  int | getBaselinePosition()문자의 베이스 라인(base line) 높이를 돌려줍니다. | 
| static Font | getDefaultFont()시스템의 기본 폰트를 돌려줍니다. | 
|  int | getFace()폰트의 페이스를 돌려줍니다. | 
| static Font | getFont(int face,
        int style,
        int size)특정 폰트를 얻어 옵니다. | 
|  int | getHeight()폰트의 높이를 얻어옵니다. | 
|  int | getSize()폰트의 크기를 얻어 옵니다. | 
|  int | getStyle()폰트의 스타일을 얻어 옵니다. | 
|  boolean | isBold()폰트의 스타일을 STYLE_BOLD인지 아닌지 여부를 돌려줍니다. | 
|  boolean | isItalic()폰트의 스타일을 STYLE_ITALIC인지 아닌지 여부를 돌려줍니다. | 
|  boolean | isPlain()폰트의 스타일을 STYLE_PLAIN인지 아닌지 여부를 돌려줍니다. | 
|  boolean | isUnderlined()폰트의 스타일을 STYLE_UNDERLINED인지 
 아닌지 여부를 돌려줍니다. | 
|  int | stringWidth(String str)문자열의 폭을 얻어 옵니다. | 
|  int | substringWidth(String str,
               int offset,
               int len)문자열의 일부의 폭을 얻어 옵니다. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static int FACE_MONOSPACE
public static int FACE_PROPORTIONAL
public static int FACE_SYSTEM
public static int SIZE_LARGE
public static int SIZE_MEDIUM
public static int SIZE_SMALL
public static int STYLE_BOLD
public static int STYLE_ITALIC
public static int STYLE_PLAIN
public static int STYLE_UNDERLINED
protected int style
protected int size
protected int face
| Method Detail | 
public static Font getFont(int face,
                           int style,
                           int size)
face - 폰트의 face; FACE_MONOSPACE, 
 FACE_PROPORTIONAL, 
 FACE_SYSTEM과 같은 값이 올 수 있음style - 폰트 스타일; STYLE_PLAIN이나 
 STYLE_ITALIC, 
 STYLE_BOLD, 
 STYLE_UNDERLINED의 조합이 올 수 있음.size - 폰트 크기; SIZE_LARGE, 
 SIZE_MEDIUM, SIZE_SMALL중 하나가 
 올 수 있음IllegalArgumentException - face, style,
 size중에 하나라도 유효한 값을 가지지 않는 경우.
public int charsWidth(char[] ch,
                      int offset,
                      int length)
ch가 가르키는 
 문자 배열의 offset부터 시작해서
 length개 까지의 문자가 됩니다.ch - 문자 배열offset - 문자 배열에서의 위치length - 문자 갯수ArrayIndexOutOfBoundException - offset값과 length가 문자 
 어레이의 범위를 벗어나는 경우NullPointerException - ch가 null인 경우public int charWidth(char ch)
ch가 나타내는 문자의 화면상의 픽셀 단위의 폭을 넘겨줍니다.
 만일 시스템이 지원하지 않는 문자라면 ' '(0x20)의 폭을 넘겨줍니다.
 물론 화면에 출력시에도 ' '가 출력됩니다.ch - 문자public int getBaselinePosition()
public static Font getDefaultFont()
public int getFace()
FACE_MONOSPACE, 
 FACE_PROPORTIONAL, FACE_SYSTEM중의 
 하나가 됩니다.public int getHeight()
public int getSize()
public int getStyle()
STYLE_BOLD, 
 STYLE_ITALIC, STYLE_UNDERLINE,
 STYLE_PLAIN의 값을 OR한 값을 돌려줍니다.public boolean isBold()
STYLE_BOLD인지 아닌지 여부를 돌려줍니다.STYLE_BOLD이면 
 true 그렇지 않으면 
 falsepublic boolean isItalic()
STYLE_ITALIC인지 아닌지 여부를 돌려줍니다.STYLE_ITALIC이면 
 true 그렇지 않으면 falsepublic boolean isPlain()
STYLE_PLAIN인지 아닌지 여부를 돌려줍니다.STYLE_PLAIN이면 true
 그렇지 않으면 falsepublic boolean isUnderlined()
STYLE_UNDERLINED인지 
 아닌지 여부를 돌려줍니다.STYLE_UNDERLINED이면 
 true 그렇지 않으면 falsepublic int stringWidth(String str)
str가 지정하는 문자열의 화면에 출력시 폭을 얻어 옵니다.str - 폭을 계산할 문자열NullPointerException - str이 null인 경우.
public int substringWidth(String str,
                          int offset,
                          int len)
str가 지정하는 문자열의 offset부터 
 len개의 문자의 폭을 얻어 옵니다.str - 폭을 계산할 문자열offset - 문자열의 시작 점len - 문자열의 문자 갯수StringIndexOutOfBoundsException - offset과 
 len값이 문자열의 범위를 벗어나는 경우NullPointerException - str이 null인 경우.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
AromaSoft Corp. Proprietary and Confidential 
 
(C)opyright 2003 AromaSoft Corp. All right reserved.
Contact :  contact@aromasoft.com