org.newdawn.slick.font
Class HieroSettings

java.lang.Object
  extended by org.newdawn.slick.font.HieroSettings

public class HieroSettings
extends java.lang.Object

Holds the settings needed to configure a UnicodeFont.

Author:
Nathan Sweet

Constructor Summary
HieroSettings()
          Default constructor for injection
HieroSettings(java.io.InputStream in)
          Create a new set of configuration from a file
HieroSettings(java.lang.String hieroFileRef)
          Create a new set of configuration from a file
 
Method Summary
 java.util.List getEffects()
           
 int getFontSize()
           
 int getGlyphPageHeight()
           
 int getGlyphPageWidth()
           
 int getPaddingAdvanceX()
           
 int getPaddingAdvanceY()
           
 int getPaddingBottom()
           
 int getPaddingLeft()
           
 int getPaddingRight()
           
 int getPaddingTop()
           
 boolean isBold()
           
 boolean isItalic()
           
 void save(java.io.File file)
          Saves the settings to a file.
 void setBold(boolean bold)
           
 void setFontSize(int fontSize)
           
 void setGlyphPageHeight(int glyphPageHeight)
           
 void setGlyphPageWidth(int glyphPageWidth)
           
 void setItalic(boolean italic)
           
 void setPaddingAdvanceX(int paddingAdvanceX)
           
 void setPaddingAdvanceY(int paddingAdvanceY)
           
 void setPaddingBottom(int paddingBottom)
           
 void setPaddingLeft(int paddingLeft)
           
 void setPaddingRight(int paddingRight)
           
 void setPaddingTop(int paddingTop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HieroSettings

public HieroSettings()
Default constructor for injection


HieroSettings

public HieroSettings(java.lang.String hieroFileRef)
              throws SlickException
Create a new set of configuration from a file

Parameters:
hieroFileRef - The file system or classpath location of the Hiero settings file.
Throws:
SlickException - if the file could not be read.

HieroSettings

public HieroSettings(java.io.InputStream in)
              throws SlickException
Create a new set of configuration from a file

Parameters:
in - The stream from which to read the settings from
Throws:
SlickException - if the file could not be read.
Method Detail

getPaddingTop

public int getPaddingTop()
Returns:
The padding for the top of the glyph area in pixels
See Also:
UnicodeFont.getPaddingTop()

setPaddingTop

public void setPaddingTop(int paddingTop)
Parameters:
paddingTop - The padding for the top of the glyph area in pixels
See Also:
UnicodeFont.setPaddingTop(int)

getPaddingLeft

public int getPaddingLeft()
Returns:
The padding for the left of the glyph area in pixels
See Also:
UnicodeFont.getPaddingLeft()

setPaddingLeft

public void setPaddingLeft(int paddingLeft)
Parameters:
paddingLeft - The padding for the left of the glyph area in pixels
See Also:
UnicodeFont.setPaddingLeft(int)

getPaddingBottom

public int getPaddingBottom()
Returns:
The padding for the bottom of the glyph area in pixels
See Also:
UnicodeFont.getPaddingBottom()

setPaddingBottom

public void setPaddingBottom(int paddingBottom)
Parameters:
paddingBottom - The padding for the bottom of the glyph area in pixels
See Also:
UnicodeFont.setPaddingBottom(int)

getPaddingRight

public int getPaddingRight()
Returns:
The padding for the right of the glyph area in pixels
See Also:
UnicodeFont.getPaddingRight()

setPaddingRight

public void setPaddingRight(int paddingRight)
Parameters:
paddingRight - The padding for the right of the glyph area in pixels
See Also:
UnicodeFont.setPaddingRight(int)

getPaddingAdvanceX

public int getPaddingAdvanceX()
Returns:
The padding for the horizontal advance of each glyph
See Also:
UnicodeFont.getPaddingAdvanceX()

setPaddingAdvanceX

public void setPaddingAdvanceX(int paddingAdvanceX)
Parameters:
paddingAdvanceX - The padding for the horizontal advance of each glyph
See Also:
UnicodeFont.setPaddingAdvanceX(int)

getPaddingAdvanceY

public int getPaddingAdvanceY()
Returns:
The padding for the vertical advance of each glyph
See Also:
UnicodeFont.getPaddingAdvanceY()

setPaddingAdvanceY

public void setPaddingAdvanceY(int paddingAdvanceY)
Parameters:
paddingAdvanceY - The padding for the vertical advance of each glyph
See Also:
UnicodeFont.setPaddingAdvanceY(int)

getGlyphPageWidth

public int getGlyphPageWidth()
Returns:
The width of the generate glyph pages
See Also:
UnicodeFont.getGlyphPageWidth()

setGlyphPageWidth

public void setGlyphPageWidth(int glyphPageWidth)
Parameters:
glyphPageWidth - The width of the generate glyph pages
See Also:
UnicodeFont.setGlyphPageWidth(int)

getGlyphPageHeight

public int getGlyphPageHeight()
Returns:
The height of the generate glyph pages
See Also:
UnicodeFont.getGlyphPageHeight()

setGlyphPageHeight

public void setGlyphPageHeight(int glyphPageHeight)
Parameters:
glyphPageHeight - The height of the generate glyph pages
See Also:
UnicodeFont.setGlyphPageHeight(int)

getFontSize

public int getFontSize()
Returns:
The point size of the font generated
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

setFontSize

public void setFontSize(int fontSize)
Parameters:
fontSize - The point size of the font generated
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

isBold

public boolean isBold()
Returns:
True if the font was generated in bold typeface
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

setBold

public void setBold(boolean bold)
Parameters:
bold - True if the font was generated in bold typeface
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

isItalic

public boolean isItalic()
Returns:
True if the font was generated in italic typeface
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

setItalic

public void setItalic(boolean italic)
Parameters:
italic - True if the font was generated in italic typeface
See Also:
UnicodeFont.UnicodeFont(String, int, boolean, boolean), UnicodeFont.UnicodeFont(java.awt.Font, int, boolean, boolean)

getEffects

public java.util.List getEffects()
Returns:
The list of effects applied to the text
See Also:
UnicodeFont.getEffects()

save

public void save(java.io.File file)
          throws java.io.IOException
Saves the settings to a file.

Parameters:
file - The file we're saving to
Throws:
java.io.IOException - if the file could not be saved.


Copyright © 2006 New Dawn Software. All Rights Reserved.