org.gnu.jfiglet.core
Class FIGFontInfo

java.lang.Object
  extended byorg.gnu.jfiglet.core.FIGFontInfo

public class FIGFontInfo
extends java.lang.Object

Informations about a FIGFont.

Version:
$Id: FIGFontInfo.java,v 1.1 2004/04/14 16:38:21 sbrunot Exp $
Author:
Sebastien Brunot

Field Summary
static int PRINT_DIRECTION_LEFT_TO_RIGHT
          Value for the printDirection attributes that means a print direction from left to right.
static int PRINT_DIRECTION_RIGHT_TO_LEFT
          Value for the printDirection attributes that means a print direction from right to left.
 
Constructor Summary
FIGFontInfo()
           
 
Method Summary
 void addCommentLine(java.lang.String theCommentLine)
          Add a line of comments to describe the FIGFont.
 int getBaseline()
          Get the baseline of the FIGCharacters in the FIGFont.
 java.util.Iterator getCommentLines()
          Get an iterator through the lines of comments (String) that describes the FIGFont.
protected  int getCommentLinesNumber()
          Get the number of lines of comments that describes the FIGFont.
 char getHardblank()
          Get the hardblank subcharacter used in the FIGCharaters of the FIGFont.
 int getHeight()
          Get the height of the FIGCharacters in the FIGFont.
 FIGFontLayout getLayout()
          Get the default layout specification of the FIGFont.
 int getMaxLength()
          Get the max lenght of the FIGCharacters in the FIGFont.
 java.lang.String getName()
          Get the name of the FIGFont.
 int getPrintDirection()
          Get the print direction of the FIGFont, which is either PRINT_DIRECTION_LEFT_TO_RIGHT or PRINT_DIRECTION_RIGHT_TO_LEFT.
 void setBaseline(int theBaseline)
          Set the baseline of the FIGCharacters in the FIGFont.
protected  void setCommentLinesNumber(int theCommentLinesNumber)
          Set the number of lines of comments that describes the FIGFont.
 void setHardblank(char theHardblank)
          Set the hardblank subcharacter used in the FIGCharaters of the FIGFont.
 void setHeight(int theHeight)
          Set the height of the FIGCharacters in the FIGFont.
 void setLayout(FIGFontLayout theLayout)
          Set the default layout specification of the FIGFont.
 void setMaxLength(int theMaxLength)
          Get the max lenght of the FIGCharacters in the FIGFont.
 void setName(java.lang.String theName)
          Set the name of the FIGFont.
 void setPrintDirection(int thePrintDirection)
          Set the print direction of the FIGFont, which should either be PRINT_DIRECTION_LEFT_TO_RIGHT or PRINT_DIRECTION_RIGHT_TO_LEFT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_DIRECTION_LEFT_TO_RIGHT

public static final int PRINT_DIRECTION_LEFT_TO_RIGHT
Value for the printDirection attributes that means a print direction from left to right.

See Also:
Constant Field Values

PRINT_DIRECTION_RIGHT_TO_LEFT

public static final int PRINT_DIRECTION_RIGHT_TO_LEFT
Value for the printDirection attributes that means a print direction from right to left.

See Also:
Constant Field Values
Constructor Detail

FIGFontInfo

public FIGFontInfo()
Method Detail

getBaseline

public int getBaseline()
Get the baseline of the FIGCharacters in the FIGFont. The Baseline parameter is the number of lines of sub-characters from the baseline of a FIGcharacter to the top of the tallest FIGcharacter. The baseline of a FIGfont is an imaginary line on top of which capital letters would rest, while the tails of lowercase g, j, p, q, and y may hang below. In other words, Baseline is the height of a FIGcharacter, ignoring any descenders.

Returns:
the baseline.

getHardblank

public char getHardblank()
Get the hardblank subcharacter used in the FIGCharaters of the FIGFont.

Returns:
the hardblank subcharacter.

getHeight

public int getHeight()
Get the height of the FIGCharacters in the FIGFont. The Height parameter specifies the consistent height of every FIGcharacter, measured in sub-characters. Note that ALL FIGcharacters in a given FIGfont have the same height, since this includes any empty space above or below. This is a measurement from the top of the tallest FIGcharacter to the bottom of the lowest hanging FIGcharacter, such as a lowercase g.

Returns:
the height.

getLayout

public FIGFontLayout getLayout()
Get the default layout specification of the FIGFont.

Returns:
the default layout specification.

getMaxLength

public int getMaxLength()
Get the max lenght of the FIGCharacters in the FIGFont. The Max_Length parameter is the maximum length of any line describing a FIGcharacter. This is usually the width of the widest FIGcharacter, plus 2 (to accommodate FIGCharacters endmarks).

Returns:
the max length.

getName

public java.lang.String getName()
Get the name of the FIGFont. Note that the file that holds the FIGFont data must be named name.flf.

Returns:
the name of the FIGFont.

getPrintDirection

public int getPrintDirection()
Get the print direction of the FIGFont, which is either PRINT_DIRECTION_LEFT_TO_RIGHT or PRINT_DIRECTION_RIGHT_TO_LEFT.

Returns:
the print direction.

setBaseline

public void setBaseline(int theBaseline)
Set the baseline of the FIGCharacters in the FIGFont. The Baseline parameter is the number of lines of sub-characters from the baseline of a FIGcharacter to the top of the tallest FIGcharacter. The baseline of a FIGfont is an imaginary line on top of which capital letters would rest, while the tails of lowercase g, j, p, q, and y may hang below. In other words, Baseline is the height of a FIGcharacter, ignoring any descenders.

Parameters:
theBaseline - the baseline.

setHardblank

public void setHardblank(char theHardblank)
Set the hardblank subcharacter used in the FIGCharaters of the FIGFont.

Parameters:
theHardblank - the hardblank subcharacter.

setHeight

public void setHeight(int theHeight)
Set the height of the FIGCharacters in the FIGFont. The Height parameter specifies the consistent height of every FIGcharacter, measured in sub-characters. Note that ALL FIGcharacters in a given FIGfont have the same height, since this includes any empty space above or below. This is a measurement from the top of the tallest FIGcharacter to the bottom of the lowest hanging FIGcharacter, such as a lowercase g.

Parameters:
theHeight - the height.

setLayout

public void setLayout(FIGFontLayout theLayout)
Set the default layout specification of the FIGFont.

Parameters:
theLayout - the default layout specification.

setMaxLength

public void setMaxLength(int theMaxLength)
Get the max lenght of the FIGCharacters in the FIGFont. The Max_Length parameter is the maximum length of any line describing a FIGcharacter. This is usually the width of the widest FIGcharacter, plus 2 (to accommodate FIGCharacters endmarks).

Parameters:
theMaxLength - the max length.

setName

public void setName(java.lang.String theName)
Set the name of the FIGFont. Note that the file that holds the FIGFont data must be named name.flf.

Parameters:
theName - the name of the FIGFont.

setPrintDirection

public void setPrintDirection(int thePrintDirection)
Set the print direction of the FIGFont, which should either be PRINT_DIRECTION_LEFT_TO_RIGHT or PRINT_DIRECTION_RIGHT_TO_LEFT.

Parameters:
thePrintDirection - the print direction. An IllegalArgumentException is returned if the value is not a legal one.

setCommentLinesNumber

protected void setCommentLinesNumber(int theCommentLinesNumber)
Set the number of lines of comments that describes the FIGFont.

Parameters:
theCommentLinesNumber - the number of lines of comments

getCommentLinesNumber

protected int getCommentLinesNumber()
Get the number of lines of comments that describes the FIGFont.

Returns:
the number of lines of comments previously set using setCommentLinesNumber(int).

addCommentLine

public void addCommentLine(java.lang.String theCommentLine)
Add a line of comments to describe the FIGFont.

Parameters:
theCommentLine - the line of comments to add.

getCommentLines

public java.util.Iterator getCommentLines()
Get an iterator through the lines of comments (String) that describes the FIGFont.

Returns:
the interator


Copyright © 2004 Sebastien Brunot. All Rights Reserved.