org.extex.unit.base.register.font
Class NumberedFont

java.lang.Object
  extended by org.extex.interpreter.type.AbstractCode
      extended by org.extex.interpreter.type.AbstractAssignment
          extended by org.extex.unit.base.register.font.NamedFont
              extended by org.extex.unit.base.register.font.NumberedFont
All Implemented Interfaces:
java.io.Serializable, Code, FontConvertible, Theable

public class NumberedFont
extends NamedFont

This class provides an implementation for a font stored under a name and a number in the context.

Version:
$Revision:4431 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
NumberedFont(CodeToken token)
          Creates a new object.
 
Method Summary
protected  java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter)
          Return the key (the number) for the font register.
static java.lang.String key(Context context, java.lang.String theName, java.lang.String theNumber)
          Construct the reference key for a numbered font.
 
Methods inherited from class org.extex.unit.base.register.font.NamedFont
assign, convertFont, the
 
Methods inherited from class org.extex.interpreter.type.AbstractAssignment
execute
 
Methods inherited from class org.extex.interpreter.type.AbstractCode
getLocalizer, getName, getToken, isIf, isOuter, readResolve, toString, toText, toText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

NumberedFont

public NumberedFont(CodeToken token)
Creates a new object.

Parameters:
token - the initial token for the primitive
Method Detail

key

public static java.lang.String key(Context context,
                                   java.lang.String theName,
                                   java.lang.String theNumber)
Construct the reference key for a numbered font.

Parameters:
context - the interpreter context
theName - the base name of the font
theNumber - the number of the font
Returns:
the key

getKey

protected java.lang.String getKey(Context context,
                                  TokenSource source,
                                  Typesetter typesetter)
                           throws HelpingException,
                                  TypesetterException
Return the key (the number) for the font register.

Overrides:
getKey in class NamedFont
Parameters:
context - the interpreter context to use
source - the source for the next tokens – if required
typesetter - the typesetter
Returns:
the key for the font register
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
NamedFont.getKey( org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)