com.lowagie.text.rtf.parser.destinations
Class RtfDestinationStylesheetTable

java.lang.Object
  extended by com.lowagie.text.rtf.parser.destinations.RtfDestination
      extended by com.lowagie.text.rtf.parser.destinations.RtfDestinationStylesheetTable

public class RtfDestinationStylesheetTable
extends RtfDestination

RtfDestinationStylesheetTable handles data destined for the Stylesheet Table destination

Since:
2.1.0
Author:
Howard Shank (hgshank@yahoo.com)

Field Summary
private  int adustRightIndent
          Automatically adjust right indentation when docunent grid is defined
private  int alignment
          Alignment - page 85 \qc, \qj, \ql, \qr, \qd, \qkN, \qt
private  int AutoSpaceBetweenDBCEnglish
          auto spacing betwee DBC and English
private  int AutoSpaceBetweenDBCNumbers
          auto spacing betwee DBC and numbers
private  String elementName
           
private  int firstLineIndent
          First line indentation.
private  RtfImportMgr importHeader
          The RtfImportHeader to add color mappings to.
private  int justificationPercentage
          Percentage of line occupied by Kashida justification (0 � low, 10 � medium, 20 � high).
private  int leftIndent
          Left indentation
private  int mirrorIndent
          Mirror indents?
private  int noCharacterWrapping
          No Character wrapping
private  int noOverflowPeriodComma
          No overflow period and comma
private  int noWordWrapping
          No Word wrapping
private  int overrideWidowControl
          Override orphan/widow control.
private  int rightIndent
          Right indentation
private  RtfParagraphStyle rtfParagraphStyle
          RtfParagraphStyle object for setting styleshee values as they are parsed from the input.
private  String styleName
           
private  int styleNr
          RTF Style number from stylesheet table.
private  int styleType
          What kind of style is this, Paragraph or Character or Table
private  String type
           
 
Fields inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination
lastCtrlWord, modified, rtfParser
 
Constructor Summary
RtfDestinationStylesheetTable()
           
RtfDestinationStylesheetTable(RtfParser parser, String type)
           
 
Method Summary
 boolean closeDestination()
          Clean up when destination is closed.
 void createNewStyle()
           
 int getAdustRightIndent()
          Get the right indent adjustment value
 int getAlignment()
          Get the alignment value.
 int getAutoSpaceBetweenDBCEnglish()
          Get the auto space between DBC and English indicator.
 int getAutoSpaceBetweenDBCNumbers()
          Get the auto space between DBC and Numbers indicator.
 int getFirstLineIndent()
          Get the first line indent value.
 int getIndent()
          Get the left indent value
 int getJustificationPercentage()
          Get the justification percentage.
 int getLeftIndent()
          Get the left indent value
 int getMirrorIndent()
          Get the value indicating if document has mirrored indents.
 int getNoCharacterWrapping()
          Get no character wrapping indicator.
 int getNoOverflowPeriodComma()
          Get the no overflow period comma indicator.
 int getNoWordWrapping()
          Get the no word wrapping indicator.
 int getOverrideWidowControl()
          Get the ovirride widow control value.
 int getRightIndent()
          Get the right indent value.
 int getStyleNr()
          Get this style number.
 int getStyleType()
          Get this style type.
 boolean handleCharacter(int ch)
          Handle text for this destination
 boolean handleCloseGroup()
          Clean up when group is closed.
 boolean handleControlWord(RtfCtrlWordData ctrlWordData)
          Handle control word for this destination
 boolean handleOpenGroup()
          Setup when group is opened.
 boolean handleOpeningSubGroup()
          Handle a new subgroup contained within this group
 void setAdustRightIndent(int adustRightIndent)
          Set the right indent adjustment value
 int setAlignment(int alignment)
          Set the alignment value from the parsed value.
 void setAutoSpaceBetweenDBCEnglish(int autoSpaceBetweenDBCEnglish)
          Set the auto space between DBC and English indicator.
 void setAutoSpaceBetweenDBCNumbers(int autoSpaceBetweenDBCNumbers)
          Set the auto space between DBC and Numbers indicator.
 void setElementName(String value)
           
 void setFirstLineIndent(int firstLineIndent)
          Set the first line indent value.
 void setIndent(int indent)
          Set the left indent value from the value parsed.
 int setJustificationPercentage(int percent)
          Set the justification percentage from parsed value.
 void setLeftIndent(int leftIndent)
          Set the left indent value
 void setMirrorIndent(int mirrorIndent)
          Set the mirrored indent value from the parsed value.
 void setNoCharacterWrapping(int noCharacterWrapping)
          Set the no character wrapping indicator from parsed value
 void setNoOverflowPeriodComma(int noOverflowPeriodComma)
          Set the no overflow period comma indicator from the parsed value.
 void setNoWordWrapping(int noWordWrapping)
          Set the no word wrapping indicator from the parsed value.
 void setOverrideWidowControl(int overrideWidowControl)
          Set the override widow control.
 void setParser(RtfParser parser)
          Set the parser to use with the RtfDestination object.
 void setRightIndent(int rightIndent)
          Set the right indent value.
 void setStyleNr(int styleNr)
          Set this style number from the parsed value.
 void setStyleType(int styleType)
          Set the style type.
 void setToDefaults()
          Method to set this object to the default values.
 void setType(String value)
           
 
Methods inherited from class com.lowagie.text.rtf.parser.destinations.RtfDestination
addListener, afterCharacter, afterCtrlWord, beforeCharacter, beforeCtrlWord, getNewTokeniserState, isModified, onCharacter, onCloseGroup, onCtrlWord, onOpenGroup, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

styleName

private String styleName

rtfParagraphStyle

private RtfParagraphStyle rtfParagraphStyle
RtfParagraphStyle object for setting styleshee values as they are parsed from the input.


elementName

private String elementName

styleNr

private int styleNr
RTF Style number from stylesheet table.


styleType

private int styleType
What kind of style is this, Paragraph or Character or Table


alignment

private int alignment
Alignment - page 85 \qc, \qj, \ql, \qr, \qd, \qkN, \qt


justificationPercentage

private int justificationPercentage
Percentage of line occupied by Kashida justification (0 � low, 10 � medium, 20 � high). \qkN


firstLineIndent

private int firstLineIndent
First line indentation.


leftIndent

private int leftIndent
Left indentation


rightIndent

private int rightIndent
Right indentation


adustRightIndent

private int adustRightIndent
Automatically adjust right indentation when docunent grid is defined


mirrorIndent

private int mirrorIndent
Mirror indents?


overrideWidowControl

private int overrideWidowControl
Override orphan/widow control.


AutoSpaceBetweenDBCEnglish

private int AutoSpaceBetweenDBCEnglish
auto spacing betwee DBC and English


AutoSpaceBetweenDBCNumbers

private int AutoSpaceBetweenDBCNumbers
auto spacing betwee DBC and numbers


noCharacterWrapping

private int noCharacterWrapping
No Character wrapping


noWordWrapping

private int noWordWrapping
No Word wrapping


noOverflowPeriodComma

private int noOverflowPeriodComma
No overflow period and comma


importHeader

private RtfImportMgr importHeader
The RtfImportHeader to add color mappings to.


type

private String type
Constructor Detail

RtfDestinationStylesheetTable

public RtfDestinationStylesheetTable()

RtfDestinationStylesheetTable

public RtfDestinationStylesheetTable(RtfParser parser,
                                     String type)
Method Detail

setParser

public void setParser(RtfParser parser)
Description copied from class: RtfDestination
Set the parser to use with the RtfDestination object.

Overrides:
setParser in class RtfDestination
Parameters:
parser - The RtfParser object.

setType

public void setType(String value)

setElementName

public void setElementName(String value)

handleOpeningSubGroup

public boolean handleOpeningSubGroup()
Description copied from class: RtfDestination
Handle a new subgroup contained within this group

Specified by:
handleOpeningSubGroup in class RtfDestination
Returns:
true if handled, false if not handled

closeDestination

public boolean closeDestination()
Description copied from class: RtfDestination
Clean up when destination is closed.

Specified by:
closeDestination in class RtfDestination
Returns:
true if handled, false if not handled

handleControlWord

public boolean handleControlWord(RtfCtrlWordData ctrlWordData)
Description copied from class: RtfDestination
Handle control word for this destination

Specified by:
handleControlWord in class RtfDestination
Parameters:
ctrlWordData - The control word and parameter information object
Returns:
true if handled, false if not handled

handleCloseGroup

public boolean handleCloseGroup()
Description copied from class: RtfDestination
Clean up when group is closed.

Specified by:
handleCloseGroup in class RtfDestination
Returns:
true if handled, false if not handled

handleOpenGroup

public boolean handleOpenGroup()
Description copied from class: RtfDestination
Setup when group is opened.

Specified by:
handleOpenGroup in class RtfDestination
Returns:
true if handled, false if not handled

handleCharacter

public boolean handleCharacter(int ch)
Description copied from class: RtfDestination
Handle text for this destination

Specified by:
handleCharacter in class RtfDestination
Returns:
true if handled, false if not handled

createNewStyle

public void createNewStyle()

setJustificationPercentage

public int setJustificationPercentage(int percent)
Set the justification percentage from parsed value.

Parameters:
percent - The justification percentage
Returns:
The justification percentage

getJustificationPercentage

public int getJustificationPercentage()
Get the justification percentage.

Returns:
The justification percentage value.

setAlignment

public int setAlignment(int alignment)
Set the alignment value from the parsed value.

Parameters:
alignment - The alignment value.
Returns:
The alignment value.

getAlignment

public int getAlignment()
Get the alignment value.

Returns:
The alignment value.

getFirstLineIndent

public int getFirstLineIndent()
Get the first line indent value.

Returns:
the firstLineIndent

setFirstLineIndent

public void setFirstLineIndent(int firstLineIndent)
Set the first line indent value.

Parameters:
firstLineIndent - the firstLineIndent to set

getIndent

public int getIndent()
Get the left indent value

Returns:
the left indent

setIndent

public void setIndent(int indent)
Set the left indent value from the value parsed.

Parameters:
indent - the left indent value.

getAdustRightIndent

public int getAdustRightIndent()
Get the right indent adjustment value

Returns:
the adustRightIndent value

setAdustRightIndent

public void setAdustRightIndent(int adustRightIndent)
Set the right indent adjustment value

Parameters:
adustRightIndent - the adustRightIndent to set

getLeftIndent

public int getLeftIndent()
Get the left indent value

Returns:
the leftIndent

setLeftIndent

public void setLeftIndent(int leftIndent)
Set the left indent value

Parameters:
leftIndent - the leftIndent to set

getMirrorIndent

public int getMirrorIndent()
Get the value indicating if document has mirrored indents.

Returns:
the mirrorIndent

setMirrorIndent

public void setMirrorIndent(int mirrorIndent)
Set the mirrored indent value from the parsed value.

Parameters:
mirrorIndent - the mirrorIndent to set

getRightIndent

public int getRightIndent()
Get the right indent value.

Returns:
the rightIndent

setRightIndent

public void setRightIndent(int rightIndent)
Set the right indent value.

Parameters:
rightIndent - the rightIndent to set

getOverrideWidowControl

public int getOverrideWidowControl()
Get the ovirride widow control value.

Returns:
the overrideWidowControl

setOverrideWidowControl

public void setOverrideWidowControl(int overrideWidowControl)
Set the override widow control.

Parameters:
overrideWidowControl - the overrideWidowControl to set

getAutoSpaceBetweenDBCEnglish

public int getAutoSpaceBetweenDBCEnglish()
Get the auto space between DBC and English indicator.

Returns:
the autoSpaceBetweenDBCEnglish

setAutoSpaceBetweenDBCEnglish

public void setAutoSpaceBetweenDBCEnglish(int autoSpaceBetweenDBCEnglish)
Set the auto space between DBC and English indicator.

Parameters:
autoSpaceBetweenDBCEnglish - the autoSpaceBetweenDBCEnglish to set

getAutoSpaceBetweenDBCNumbers

public int getAutoSpaceBetweenDBCNumbers()
Get the auto space between DBC and Numbers indicator.

Returns:
the autoSpaceBetweenDBCNumbers

setAutoSpaceBetweenDBCNumbers

public void setAutoSpaceBetweenDBCNumbers(int autoSpaceBetweenDBCNumbers)
Set the auto space between DBC and Numbers indicator.

Parameters:
autoSpaceBetweenDBCNumbers - the autoSpaceBetweenDBCNumbers to set

getNoCharacterWrapping

public int getNoCharacterWrapping()
Get no character wrapping indicator.

Returns:
the noCharacterWrapping

setNoCharacterWrapping

public void setNoCharacterWrapping(int noCharacterWrapping)
Set the no character wrapping indicator from parsed value

Parameters:
noCharacterWrapping - the noCharacterWrapping to set

getNoOverflowPeriodComma

public int getNoOverflowPeriodComma()
Get the no overflow period comma indicator.

Returns:
the noOverflowPeriodComma

setNoOverflowPeriodComma

public void setNoOverflowPeriodComma(int noOverflowPeriodComma)
Set the no overflow period comma indicator from the parsed value.

Parameters:
noOverflowPeriodComma - the noOverflowPeriodComma to set

getNoWordWrapping

public int getNoWordWrapping()
Get the no word wrapping indicator.

Returns:
the noWordWrapping

setNoWordWrapping

public void setNoWordWrapping(int noWordWrapping)
Set the no word wrapping indicator from the parsed value.

Parameters:
noWordWrapping - the noWordWrapping to set

getStyleNr

public int getStyleNr()
Get this style number.

Returns:
the styleNr

setStyleNr

public void setStyleNr(int styleNr)
Set this style number from the parsed value.

Parameters:
styleNr - the styleNr to set

getStyleType

public int getStyleType()
Get this style type. For example Style, Character Style, etc.

Returns:
the styleType

setStyleType

public void setStyleType(int styleType)
Set the style type.

Parameters:
styleType - the styleType to set

setToDefaults

public void setToDefaults()
Description copied from class: RtfDestination
Method to set this object to the default values. Must be implemented in child class.

Specified by:
setToDefaults in class RtfDestination

Hosted by Hostbasket