de.dante.extex.interpreter.context.tc
Class TypesettingContextImpl

java.lang.Object
  extended byde.dante.extex.interpreter.context.tc.TypesettingContextImpl
All Implemented Interfaces:
ModifiableTypesettingContext, java.io.Serializable, 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: 1.1 $
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 theColor)
          Setter for the color.
 void setDirection(Direction theDirection)
          Setter for the writing direction.
 void setFont(Font theFont)
          Setter for the font component.
 void setLanguage(Language language)
          Setter for the hyphenation table.
 java.lang.String toString()
           
 
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()
Description copied from interface: TypesettingContext
Getter for the color.

Specified by:
getColor in interface TypesettingContext
Returns:
the current color
See Also:
de.dante.extex.interpreter.context.TypesettingContext#getColor()

getDirection

public Direction getDirection()
Description copied from interface: TypesettingContext
Getter for the writing direction.

Specified by:
getDirection in interface TypesettingContext
Returns:
the current direction
See Also:
de.dante.extex.interpreter.context.TypesettingContext#getDirection()

getFont

public Font getFont()
Description copied from interface: TypesettingContext
Getter for the font component.

Specified by:
getFont in interface TypesettingContext
Returns:
the font
See Also:
de.dante.extex.interpreter.context.TypesettingContext#getFont()

getLanguage

public Language getLanguage()
Description copied from interface: TypesettingContext
Getter for the hyphenation table.

Specified by:
getLanguage in interface TypesettingContext
Returns:
the hyphenation table
See Also:
de.dante.extex.interpreter.context.TypesettingContext#getLanguage()

set

public void set(TypesettingContext context)
Description copied from interface: ModifiableTypesettingContext
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:
de.dante.extex.interpreter.context.ModifiableTypesettingContext#set( de.dante.extex.interpreter.context.TypesettingContext)

setColor

public void setColor(Color theColor)
Description copied from interface: ModifiableTypesettingContext
Setter for the color.

Specified by:
setColor in interface ModifiableTypesettingContext
Parameters:
theColor - the new color
See Also:
de.dante.extex.interpreter.context.ModifiableTypesettingContext#setColor( de.dante.extex.interpreter.context.Color)

setDirection

public void setDirection(Direction theDirection)
Description copied from interface: ModifiableTypesettingContext
Setter for the writing direction.

Specified by:
setDirection in interface ModifiableTypesettingContext
Parameters:
theDirection - the new direction
See Also:
de.dante.extex.interpreter.context.ModifiableTypesettingContext#setDirection( de.dante.extex.interpreter.context.Direction)

setFont

public void setFont(Font theFont)
Description copied from interface: ModifiableTypesettingContext
Setter for the font component.

Specified by:
setFont in interface ModifiableTypesettingContext
Parameters:
theFont - the font to store
See Also:
de.dante.extex.interpreter.context.ModifiableTypesettingContext#setFont( de.dante.extex.interpreter.type.font.Font)

setLanguage

public void setLanguage(Language language)
Description copied from interface: ModifiableTypesettingContext
Setter for the hyphenation table.

Specified by:
setLanguage in interface ModifiableTypesettingContext
Parameters:
language - the hyphenation table
See Also:
de.dante.extex.interpreter.context.ModifiableTypesettingContext#setLanguage( de.dante.extex.language.Language)

toString

public java.lang.String toString()
See Also:
Object.toString()