Apime v1.0

com.java4ever.apime.ui.font
Class NativeFont

java.lang.Object
  extended bycom.java4ever.apime.ui.IFont
      extended bycom.java4ever.apime.ui.font.NativeFont

public class NativeFont
extends IFont

Fuente nativa.


Constructor Summary
NativeFont(int face, int style, int size)
          Crea la fuente.
 
Method Summary
 int charWidth(char c)
          Devuelve el ancho de un caracter.
 void drawSubstring(javax.microedition.lcdui.Graphics g, java.lang.String s, int offset, int length, int x, int y, int anchor)
          Dibuja una subcadena de texto (1 línea).
 int getHeight()
          Devuelve la altura de la fuente.
 int getLeading()
          Devuelve el espacio entre líneas.
 int substringWidth(java.lang.String s, int offset, int length)
          Devuelve el ancho en pixels de una subcadena de texto.
 
Methods inherited from class com.java4ever.apime.ui.IFont
addFont, calculateLines, drawString, drawString, drawString, getFont, getLineHeight, getName, removeFont, stringWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeFont

public NativeFont(int face,
                  int style,
                  int size)
Crea la fuente.

Parameters:
face - Tipo
style - Estilo
size - Tamaño
See Also:
Font
Method Detail

substringWidth

public int substringWidth(java.lang.String s,
                          int offset,
                          int length)
Description copied from class: IFont
Devuelve el ancho en pixels de una subcadena de texto.

Overrides:
substringWidth in class IFont
Parameters:
s - Subcadena de texto
offset - Indice del primer caracter
length - Longitud de la subcadena

charWidth

public int charWidth(char c)
Description copied from class: IFont
Devuelve el ancho de un caracter.

Specified by:
charWidth in class IFont
Parameters:
c - Caracter

getHeight

public int getHeight()
Description copied from class: IFont
Devuelve la altura de la fuente.

Specified by:
getHeight in class IFont

getLeading

public int getLeading()
Description copied from class: IFont
Devuelve el espacio entre líneas.

Specified by:
getLeading in class IFont

drawSubstring

public void drawSubstring(javax.microedition.lcdui.Graphics g,
                          java.lang.String s,
                          int offset,
                          int length,
                          int x,
                          int y,
                          int anchor)
Description copied from class: IFont
Dibuja una subcadena de texto (1 línea).

Specified by:
drawSubstring in class IFont
Parameters:
g - Contexto gráfico
s - Subcadena de texto
offset - Indice del primer caracter
length - Longitud de la subcadena
x - Coordenada X
y - Coordenada Y
anchor - Punto de referencia
See Also:
Graphics

Apime v1.0

Copyright 2004 Java4Ever.com. All Rights Reserved.