Unified Typesetting API M1-20040817

de.inghuimische.uta.typeset
Class AbstractScript

java.lang.Object
  extended byde.inghuimische.uta.typeset.AbstractScript
All Implemented Interfaces:
QManageable, Script
Direct Known Subclasses:
SimpleScript

public abstract class AbstractScript
extends Object
implements Script

Abstract script which provides an empty feature list and handles script listeners.

Author:
Christian Ziesemer

Field Summary
protected  EmbeddingLevel embeddingLevel
          Holds the embedding level where newly generated glyphs are placed.
protected  FeatureList features
          Holds the features of this script.
protected  Vector listener
          Holds the listeners interested in script events.
 
Constructor Summary
AbstractScript()
           
 
Method Summary
 void addScriptListener(ScriptListener aListener)
          Adds a script listener to the script.
protected  void fireNewItem(Item newItem)
          A script has to call this method if it generates a new item.
 FeatureList getFeatures()
          The list of supported features.
 void removeScriptListener(ScriptListener aListener)
          Removes a script listener.
 void setEmbeddingLevel(EmbeddingLevel anEmbeddingLevel)
          Sets the embedding level this script should place its generated glyphs in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.inghuimische.uta.typeset.Script
getLocale, newEmbeddingLevel, relax, typeset, wakeup
 

Field Detail

features

protected FeatureList features
Holds the features of this script. Subclasses have to use this list.


embeddingLevel

protected EmbeddingLevel embeddingLevel
Holds the embedding level where newly generated glyphs are placed.


listener

protected Vector listener
Holds the listeners interested in script events.

Constructor Detail

AbstractScript

public AbstractScript()
Method Detail

getFeatures

public FeatureList getFeatures()
Description copied from interface: Script
The list of supported features. Scripts may differ a lot in the features the list contains.

The returned features are compared to a reference list for the corresponding locale (if there is one).

Specified by:
getFeatures in interface Script
Returns:
A list of supported features.

setEmbeddingLevel

public void setEmbeddingLevel(EmbeddingLevel anEmbeddingLevel)
Description copied from interface: Script
Sets the embedding level this script should place its generated glyphs in. This method is called either if the script has to wake up (previous glyphs got processed by another script) or if there's a inner embedding level (previous glyphs where processed by this script, but there's a change in directionaltiy, e.g.).

Specified by:
setEmbeddingLevel in interface Script
Parameters:
anEmbeddingLevel - The embedding level to place the generated gylphs.

addScriptListener

public void addScriptListener(ScriptListener aListener)
Description copied from interface: Script
Adds a script listener to the script. A ScriptListener gets informed if e.g. a new item is generated.

Specified by:
addScriptListener in interface Script
Parameters:
aListener - The listener to add.

removeScriptListener

public void removeScriptListener(ScriptListener aListener)
Description copied from interface: Script
Removes a script listener.

Specified by:
removeScriptListener in interface Script
Parameters:
aListener - The listener to remove.

fireNewItem

protected void fireNewItem(Item newItem)
A script has to call this method if it generates a new item. Informs all listeners of the newly generated item.

Parameters:
newItem - The newly generated item.

Unified Typesetting API M1-20040817


An inghuimische.de project.
Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details.