de.dante.extex.interpreter.context.impl
Class LanguageObserver

java.lang.Object
  extended byde.dante.extex.interpreter.context.impl.LanguageObserver
All Implemented Interfaces:
CountObserver, TokensObserver

public class LanguageObserver
extends java.lang.Object
implements CountObserver, TokensObserver

This observer is meant for keeping the current typesetting context in sync with the registers \language and \lang.

The tokens register \lang is considered first. Only if this register is not set or it is empty then the count register \language is taken into account.

Version:
$Revision: 1.8 $
Author:
Gerd Neugebauer

Constructor Summary
LanguageObserver()
          Creates a new object.
 
Method Summary
 void receiveCountChange(ContextInternals context, java.lang.String name, Count value)
          Receive a notification on a count change.
 void receiveTokensChange(ContextInternals context, java.lang.String name, Tokens value)
          Receive a notification on a tokens change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageObserver

public LanguageObserver()
Creates a new object.

Method Detail

receiveCountChange

public void receiveCountChange(ContextInternals context,
                               java.lang.String name,
                               Count value)
                        throws ConfigurationException
Description copied from interface: CountObserver
Receive a notification on a count change.

Specified by:
receiveCountChange in interface CountObserver
Parameters:
context - the interpreter context
name - the token containing the name of the changed Count.
value - the new value assigned to the name. In case of null the name is unbound.
Throws:
ConfigurationException
See Also:
CountObserver.receiveCountChange( de.dante.extex.interpreter.context.ContextInternals, java.lang.String, de.dante.extex.interpreter.type.count.Count)

receiveTokensChange

public void receiveTokensChange(ContextInternals context,
                                java.lang.String name,
                                Tokens value)
                         throws ConfigurationException
Description copied from interface: TokensObserver
Receive a notification on a tokens change.

Specified by:
receiveTokensChange in interface TokensObserver
Parameters:
context - the interpreter context
name - the token containing the name of the changed tokens.
value - the new value assigned to the name. In case of null the name is unbound.
Throws:
ConfigurationException
See Also:
TokensObserver.receiveTokensChange( de.dante.extex.interpreter.context.ContextInternals, java.lang.String, de.dante.extex.interpreter.type.tokens.Tokens)