org.extex.typesetter.tc
Class TypesettingContextImpl

java.lang.Object
  extended by org.extex.typesetter.tc.TypesettingContextImpl
All Implemented Interfaces:
java.io.Serializable, ModifiableTypesettingContext, TypesettingContext

public class TypesettingContextImpl
extends java.lang.Object
implements ModifiableTypesettingContext

This implementation of a typesetting context provides the required functionality for the container or attributes describing the appearance of glyphs or other nodes.

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
TypesettingContextImpl()
          Creates a new object filled with default values.
TypesettingContextImpl(Font theFont)
          Creates a new object with the given initial font, the color black and no hyphenation.
TypesettingContextImpl(TypesettingContext tc)
          Creates a new object (copy constructor).
 
Method Summary
 Color getColor()
          Getter for the color.
 Direction getDirection()
          Getter for the writing direction.
 Font getFont()
          Getter for the font component.
 Language getLanguage()
          Getter for the hyphenation table.
 void set(TypesettingContext context)
          Setter for all components.
 void setColor(Color color)
          Setter for the color.
 void setDirection(Direction direction)
          Setter for the writing direction.
 void setFont(Font font)
          Setter for the font component.
 void setLanguage(Language language)
          Setter for the hyphenation table.
 java.lang.String toString()
          Returns a string representation of the object.
 
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

TypesettingContextImpl

public TypesettingContextImpl()
Creates a new object filled with default values.


TypesettingContextImpl

public TypesettingContextImpl(Font theFont)
Creates a new object with the given initial font, the color black and no hyphenation.

Parameters:
theFont - the font to use

TypesettingContextImpl

public TypesettingContextImpl(TypesettingContext tc)
Creates a new object (copy constructor).

Parameters:
tc - the typesetting context to copy
Method Detail

getColor

public Color getColor()
Getter for the color.

Specified by:
getColor in interface TypesettingContext
Returns:
the current color
See Also:
TypesettingContext.getColor()

getDirection

public Direction getDirection()
Getter for the writing direction.

Specified by:
getDirection in interface TypesettingContext
Returns:
the current direction
See Also:
TypesettingContext.getDirection()

getFont

public Font getFont()
Getter for the font component.

Specified by:
getFont in interface TypesettingContext
Returns:
the font
See Also:
TypesettingContext.getFont()

getLanguage

public Language getLanguage()
Getter for the hyphenation table.

Specified by:
getLanguage in interface TypesettingContext
Returns:
the hyphenation table
See Also:
TypesettingContext.getLanguage()

set

public void set(TypesettingContext context)
Setter for all components. The components color, direction, font, language, etc are copied from the instance given.

Specified by:
set in interface ModifiableTypesettingContext
Parameters:
context - the context to clone
See Also:
ModifiableTypesettingContext.set( org.extex.typesetter.tc.TypesettingContext)

setColor

public void setColor(Color color)
Setter for the color.

Specified by:
setColor in interface ModifiableTypesettingContext
Parameters:
color - the new color
See Also:
ModifiableTypesettingContext.setColor( org.extex.color.Color)

setDirection

public void setDirection(Direction direction)
Setter for the writing direction.

Specified by:
setDirection in interface ModifiableTypesettingContext
Parameters:
direction - the new direction
See Also:
ModifiableTypesettingContext.setDirection( org.extex.typesetter.tc.Direction)

setFont

public void setFont(Font font)
Setter for the font component.

Specified by:
setFont in interface ModifiableTypesettingContext
Parameters:
font - the font to store
See Also:
ModifiableTypesettingContext.setFont( org.extex.typesetter.tc.font.Font)

setLanguage

public void setLanguage(Language language)
Setter for the hyphenation table.

Specified by:
setLanguage in interface ModifiableTypesettingContext
Parameters:
language - the hyphenation table
See Also:
ModifiableTypesettingContext.setLanguage( org.extex.language.Language)

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object
See Also:
Object.toString()