org.extex.font.format.xtf.tables.cff
Class CharString

java.lang.Object
  extended by org.extex.font.format.xtf.tables.cff.CharString
All Implemented Interfaces:
XMLWriterConvertible

public class CharString
extends java.lang.Object
implements XMLWriterConvertible

Container for each char string.

Version:
$Revision: 6748 $
Author:
Michael Niedermair

Field Summary
protected  int idx
          The index.
protected  java.lang.Integer width
          The width.
 
Constructor Summary
protected CharString()
          Creates a new object.
  CharString(CffFont cffFont, int idx)
          Creates a new object.
  CharString(CffFont cffFont, int idx, boolean noname)
          Creates a new object.
 
Method Summary
 void add(T2Operator op)
          Add a T2Operator.
 void addHint()
          Add a hint count.
 void addHints(int cnt)
          Add hints.
 void checkWidth()
          Check, if the width is set.
 T2Operator get(int index)
           
 int getActualHints()
          Returns the hints in the commands.
 CffFont getCffFont()
          Getter for cffFont.
 int getIdx()
          Getter for idx.
 int getMaxX()
          Getter for maxX.
 int getMaxY()
          Getter for maxY.
 int getMinX()
          Getter for minX.
 int getMinY()
          Getter for minY.
 java.lang.String getName()
          Returns the name of the charstring.
 java.util.List<T2Operator> getT2Ops()
          Getter for t2Ops.
 java.lang.Integer getWidth()
          Getter for width.
 boolean isEmpty()
           
 java.util.Iterator<T2Operator> iterator()
           
 void resetHints()
          Reset the hint counter.
 void setHints(int cnt)
          Set the hints.
 void setMX(int x)
          Set the maximum x.
 void setMY(int y)
          Set the maximum y.
 void setWidth(T2Number width)
          Setter for width.
 int size()
           
 java.lang.String toString()
          
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

idx

protected int idx
The index.


width

protected java.lang.Integer width
The width.

Constructor Detail

CharString

protected CharString()
Creates a new object. Only for sub classes.


CharString

public CharString(CffFont cffFont,
                  int idx)
Creates a new object.

Parameters:
idx - The index.

CharString

public CharString(CffFont cffFont,
                  int idx,
                  boolean noname)
Creates a new object.

Parameters:
idx - The index.
Method Detail

add

public void add(T2Operator op)
Add a T2Operator.

Parameters:
op - The t2 operator to add.

addHint

public void addHint()
Add a hint count.


addHints

public void addHints(int cnt)
Add hints.

Parameters:
cnt - The count of hints to add.

checkWidth

public void checkWidth()
Check, if the width is set.


get

public T2Operator get(int index)
Parameters:
index - The index.
Returns:
Returns the t2operator.
See Also:
List.get(int)

getActualHints

public int getActualHints()
Returns the hints in the commands.

Returns:
Returns the hints in the commands.

getCffFont

public CffFont getCffFont()
Getter for cffFont.

Returns:
the cffFont

getIdx

public int getIdx()
Getter for idx.

Returns:
the idx

getMaxX

public int getMaxX()
Getter for maxX.

Returns:
the maxX

getMaxY

public int getMaxY()
Getter for maxY.

Returns:
the maxY

getMinX

public int getMinX()
Getter for minX.

Returns:
the minX

getMinY

public int getMinY()
Getter for minY.

Returns:
the minY

getName

public java.lang.String getName()
Returns the name of the charstring.

Returns:
Returns the name of the charstring.

getT2Ops

public java.util.List<T2Operator> getT2Ops()
Getter for t2Ops.

Returns:
the t2Ops

getWidth

public java.lang.Integer getWidth()
Getter for width.

Returns:
the width

isEmpty

public boolean isEmpty()
Returns:
Returns true, if no t2ops exits.
See Also:
List.isEmpty()

iterator

public java.util.Iterator<T2Operator> iterator()
Returns:
Returns the t2ops iterator.
See Also:
List.iterator()

resetHints

public void resetHints()
Reset the hint counter.


setHints

public void setHints(int cnt)
Set the hints.

Parameters:
cnt - The new hints.

setMX

public void setMX(int x)
Set the maximum x.

Parameters:
x - The x value.

setMY

public void setMY(int y)
Set the maximum y.

Parameters:
y - The y value.

setWidth

public void setWidth(T2Number width)
Setter for width.

Parameters:
width - the width to set

size

public int size()
Returns:
Returns the size of the t2ops.
See Also:
List.size()

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Write the data to a XMLStreamWriter.

Specified by:
writeXML in interface XMLWriterConvertible
Parameters:
writer - the XML-Writer
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
XMLWriterConvertible.writeXML(org.extex.util.xml.XMLStreamWriter)