org.gnu.jfiglet.core
Class FIGCharacter

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

public class FIGCharacter
extends java.lang.Object

A character defined by a FIGFont. For example, the character 'A' defined by the alphabet FIGFont is the following :

   AA
  A  A
  AAAA
  A  A
  A  A
 

Version:
$Id: FIGCharacter.java,v 1.3 2004/05/02 15:24:48 sbrunot Exp $
Author:
Sebastien Brunot

Constructor Summary
FIGCharacter(java.lang.String[] theCharacterLines)
          A constructor which argument is an array of the lines of subcharacters the character is defined by.
 
Method Summary
 java.lang.String getCharacterLine(int theLineNumber)
          Get one of the lines of subcharacters the character is defined by.
 java.lang.String[] getCharacterLines()
          Get an array of the lines of subcharacters the character is defined by.
 int getNumberOfBackSpacesForLine(int theLineNumber)
           
 int getNumberOfFrontSpacesForLine(int theLineNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIGCharacter

public FIGCharacter(java.lang.String[] theCharacterLines)
A constructor which argument is an array of the lines of subcharacters the character is defined by. For example, the character 'A' in the alphabet FIGFont is defined by the seven following lines :
 line 0 :"  AA  "
 line 1 :" A  A "
 line 2 :" AAAA "
 line 3 :" A  A "
 line 4 :" A  A "
 line 5 :"      "
 line 6 :"      "
 
If any @ subcharacters are present in a line, it is automaticaly suppressed : this is because characters definitions in FIGFont files are including final @ subcharacter at the end of each line. An IllegalArgumentException is thrown if theCharacterLines is empty or null.

Parameters:
theCharacterLines - an array of the lines of subcharacters the character is defined by.
Method Detail

getCharacterLines

public java.lang.String[] getCharacterLines()
Get an array of the lines of subcharacters the character is defined by. For example, the character 'A' in the alphabet FIGFont is defined by the seven following lines :
 line 0 :"  AA  "
 line 1 :" A  A "
 line 2 :" AAAA "
 line 3 :" A  A "
 line 4 :" A  A "
 line 5 :"      "
 line 6 :"      "
 

Returns:
an array of the lines of subcharacters the character is defined by.

getCharacterLine

public java.lang.String getCharacterLine(int theLineNumber)
Get one of the lines of subcharacters the character is defined by.

Parameters:
theLineNumber - the line number, the first line beeing numbered 0. For example, the last line of subcharacters the character 'A' is defined by in the alphabet FIGFont is line number 6, and its value is :
 line 6 :"      "
 
Returns:
the line of subcharacters.

getNumberOfFrontSpacesForLine

public int getNumberOfFrontSpacesForLine(int theLineNumber)
Parameters:
theLineNumber -
Returns:

getNumberOfBackSpacesForLine

public int getNumberOfBackSpacesForLine(int theLineNumber)
Parameters:
theLineNumber -
Returns:


Copyright © 2004 Sebastien Brunot. All Rights Reserved.