Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.map.MapFont Class Reference

Represents a bitmap font drawable to a map. More...

+ Inheritance diagram for org.bukkit.map.MapFont:

Classes

class  CharacterSprite
 Represents the graphics for a single character in a MapFont. More...
 

Public Member Functions

void setChar (char ch, CharacterSprite sprite)
 Set the sprite for a given character.
 
CharacterSprite getChar (char ch)
 Get the sprite for a given character.
 
int getWidth (String text)
 Get the width of the given text as it would be rendered using this font.
 
int getHeight ()
 Get the height of this font.
 
boolean isValid (String text)
 Check whether the given text is valid.
 

Protected Attributes

boolean malleable = true
 

Detailed Description

Represents a bitmap font drawable to a map.

Definition at line 8 of file MapFont.java.

Member Function Documentation

CharacterSprite org.bukkit.map.MapFont.getChar ( char  ch)

Get the sprite for a given character.

Parameters
chThe character to get the sprite for.
Returns
The CharacterSprite associated with the character, or null if there is none.

Definition at line 38 of file MapFont.java.

int org.bukkit.map.MapFont.getHeight ( )

Get the height of this font.

Returns
The height of the font.

Definition at line 65 of file MapFont.java.

int org.bukkit.map.MapFont.getWidth ( String  text)

Get the width of the given text as it would be rendered using this font.

Parameters
textThe text.
Returns
The width in pixels.

Definition at line 48 of file MapFont.java.

References org.bukkit.map.MapFont.isValid().

boolean org.bukkit.map.MapFont.isValid ( String  text)

Check whether the given text is valid.

Parameters
textThe text.
Returns
True if the string contains only defined characters, false otherwise.

Definition at line 75 of file MapFont.java.

Referenced by org.bukkit.map.MapFont.getWidth().

void org.bukkit.map.MapFont.setChar ( char  ch,
CharacterSprite  sprite 
)

Set the sprite for a given character.

Parameters
chThe character to set the sprite for.
spriteThe CharacterSprite to set.
Exceptions
IllegalStateExceptionif this font is static.

Definition at line 21 of file MapFont.java.

References org.bukkit.map.MapFont.CharacterSprite.getHeight(), and org.bukkit.map.MapFont.malleable.

Member Data Documentation

boolean org.bukkit.map.MapFont.malleable = true
protected

Definition at line 12 of file MapFont.java.

Referenced by org.bukkit.map.MapFont.setChar().


The documentation for this class was generated from the following file: