com.lowagie.text.rtf.parser.properties
Class RtfProperty

java.lang.Object
  extended by com.lowagie.text.rtf.parser.properties.RtfProperty

public class RtfProperty
extends java.lang.Object

RtfProperty handles document, paragraph, etc. property values

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

Field Summary
static java.lang.String CHARACTER
           
static java.lang.String CHARACTER_BOLD
           
static java.lang.String CHARACTER_FONT
           
static java.lang.String CHARACTER_ITALIC
           
static java.lang.String CHARACTER_SIZE
           
static java.lang.String CHARACTER_STYLE
           
static java.lang.String CHARACTER_UNDERLINE
           
static java.lang.String COLOR
           
static java.lang.String COLOR_BG
           
static java.lang.String COLOR_FG
           
static java.lang.String DOCUMENT
           
static java.lang.String DOCUMENT_DEFAULT_FONT_NUMER
           
static java.lang.String DOCUMENT_ENABLE_FACING_PAGES
           
static java.lang.String DOCUMENT_MARGIN_BOTTOM_TWIPS
           
static java.lang.String DOCUMENT_MARGIN_LEFT_TWIPS
           
static java.lang.String DOCUMENT_MARGIN_RIGHT_TWIPS
           
static java.lang.String DOCUMENT_MARGIN_TOP_TWIPS
           
static java.lang.String DOCUMENT_PAGE_HEIGHT_TWIPS
           
static java.lang.String DOCUMENT_PAGE_NUMBER_START
           
static java.lang.String DOCUMENT_PAGE_ORIENTATION
           
static java.lang.String DOCUMENT_PAGE_WIDTH_TWIPS
           
static int JUSTIFY_CENTER
          Justify center
static int JUSTIFY_FULL
          Justify full
static int JUSTIFY_LEFT
          Justify left
static int JUSTIFY_RIGHT
          Justify right
static int OFF
           
static int ON
           
static java.lang.String PAGE_LANDSCAPE
          Landscape orientation
static java.lang.String PAGE_PORTRAIT
          Portrait orientation
static java.lang.String PARAGRAPH
           
static java.lang.String PARAGRAPH_BORDER
           
static int PARAGRAPH_BORDER_BOTTOM
          possible border settting
static java.lang.String PARAGRAPH_BORDER_CELL
           
static int PARAGRAPH_BORDER_DIAGONAL_UL_LR
          possible border settting
static int PARAGRAPH_BORDER_DIAGONAL_UR_LL
          possible border settting
static int PARAGRAPH_BORDER_LEFT
          possible border settting
static int PARAGRAPH_BORDER_NIL
          possible border settting
static int PARAGRAPH_BORDER_RIGHT
          possible border settting
static int PARAGRAPH_BORDER_TABLE_HORIZONTAL
          possible border settting
static int PARAGRAPH_BORDER_TABLE_VERTICAL
          possible border settting
static int PARAGRAPH_BORDER_TOP
          possible border settting
static java.lang.String PARAGRAPH_INDENT_FIRST_LINE
           
static java.lang.String PARAGRAPH_INDENT_LEFT
           
static java.lang.String PARAGRAPH_INDENT_RIGHT
           
static java.lang.String PARAGRAPH_JUSTIFICATION
           
static int PGN_DECIMAL
          Decimal number format
static int PGN_LETTER_LOWERCASE
          Lowercase Letter
static int PGN_LETTER_UPPERCASE
          Uppercase Letter
static int PGN_ROMAN_NUMERAL_LOWERCASE
          Lowercase Roman Numeral
static int PGN_ROMAN_NUMERAL_UPPERCASE
          Uppercase Roman Numeral
protected  java.util.HashMap properties
          Properties for this RtfProperty object
static int SBK_COLUMN
          Section Break Column break
static int SBK_EVEN
          Section Break Even page break
static int SBK_NONE
          Section Break None
static int SBK_ODD
          Section Break Odd page break
static int SBK_PAGE
          Section Break Page break
static java.lang.String SECTION
           
static java.lang.String SECTION_BREAK_TYPE
           
static java.lang.String SECTION_NUMBER_OF_COLUMNS
           
static java.lang.String SECTION_PAGE_NUMBER_FORMAT
           
static java.lang.String SECTION_PAGE_NUMBER_POSITION_X
           
static java.lang.String SECTION_PAGE_NUMBER_POSITION_Y
           
 
Constructor Summary
RtfProperty()
           
 
Method Summary
 void addRtfPropertyListener(RtfPropertyListener listener)
          Adds a RtfPropertyListener to the RtfProperty.
 void afterChange(java.lang.String propertyName)
           
 void beforeChange(java.lang.String propertyName)
           
 java.util.HashMap getProperties(java.lang.String propertyGroup)
          Get a group of properties.
 java.lang.Object getProperty(java.lang.String propertyName)
          Get the value of the property identified by the parameter.
 boolean isModified()
           
 boolean isModifiedCharacter()
           
 boolean isModifiedDocument()
           
 boolean isModifiedParagraph()
           
 boolean isModifiedSection()
           
 void removeRtfPropertyListener(RtfPropertyListener listener)
          Removes a RtfPropertyListener from the RtfProperty.
 void setModified(java.lang.String propertyName, boolean modified)
           
 void setModifiedCharacter(boolean modifiedCharacter)
           
 void setModifiedDocument(boolean modifiedDocument)
           
 void setModifiedParagraph(boolean modifiedParagraph)
           
 void setModifiedSection(boolean modifiedSection)
           
 boolean setProperty(RtfCtrlWordData ctrlWordData)
          Set the value of the property identified by the parameter.
 void setToDefault()
          Set all property objects to default values.
 void setToDefault(java.lang.String propertyGroup)
          Set individual property group to default values.
 boolean toggleProperty(RtfCtrlWordData ctrlWordData)
          Toggle the value of the property identified by the RtfCtrlWordData.specialHandler parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OFF

public static final int OFF
See Also:
Constant Field Values

ON

public static final int ON
See Also:
Constant Field Values

COLOR

public static final java.lang.String COLOR
See Also:
Constant Field Values

CHARACTER

public static final java.lang.String CHARACTER
See Also:
Constant Field Values

PARAGRAPH

public static final java.lang.String PARAGRAPH
See Also:
Constant Field Values

SECTION

public static final java.lang.String SECTION
See Also:
Constant Field Values

DOCUMENT

public static final java.lang.String DOCUMENT
See Also:
Constant Field Values

COLOR_FG

public static final java.lang.String COLOR_FG
See Also:
Constant Field Values

COLOR_BG

public static final java.lang.String COLOR_BG
See Also:
Constant Field Values

CHARACTER_BOLD

public static final java.lang.String CHARACTER_BOLD
See Also:
Constant Field Values

CHARACTER_UNDERLINE

public static final java.lang.String CHARACTER_UNDERLINE
See Also:
Constant Field Values

CHARACTER_ITALIC

public static final java.lang.String CHARACTER_ITALIC
See Also:
Constant Field Values

CHARACTER_SIZE

public static final java.lang.String CHARACTER_SIZE
See Also:
Constant Field Values

CHARACTER_FONT

public static final java.lang.String CHARACTER_FONT
See Also:
Constant Field Values

CHARACTER_STYLE

public static final java.lang.String CHARACTER_STYLE
See Also:
Constant Field Values

JUSTIFY_LEFT

public static final int JUSTIFY_LEFT
Justify left

See Also:
Constant Field Values

JUSTIFY_RIGHT

public static final int JUSTIFY_RIGHT
Justify right

See Also:
Constant Field Values

JUSTIFY_CENTER

public static final int JUSTIFY_CENTER
Justify center

See Also:
Constant Field Values

JUSTIFY_FULL

public static final int JUSTIFY_FULL
Justify full

See Also:
Constant Field Values

PARAGRAPH_INDENT_LEFT

public static final java.lang.String PARAGRAPH_INDENT_LEFT
See Also:
Constant Field Values

PARAGRAPH_INDENT_RIGHT

public static final java.lang.String PARAGRAPH_INDENT_RIGHT
See Also:
Constant Field Values

PARAGRAPH_INDENT_FIRST_LINE

public static final java.lang.String PARAGRAPH_INDENT_FIRST_LINE
See Also:
Constant Field Values

PARAGRAPH_JUSTIFICATION

public static final java.lang.String PARAGRAPH_JUSTIFICATION
See Also:
Constant Field Values

PARAGRAPH_BORDER

public static final java.lang.String PARAGRAPH_BORDER
See Also:
Constant Field Values

PARAGRAPH_BORDER_CELL

public static final java.lang.String PARAGRAPH_BORDER_CELL
See Also:
Constant Field Values

PARAGRAPH_BORDER_NIL

public static final int PARAGRAPH_BORDER_NIL
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_BOTTOM

public static final int PARAGRAPH_BORDER_BOTTOM
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_TOP

public static final int PARAGRAPH_BORDER_TOP
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_LEFT

public static final int PARAGRAPH_BORDER_LEFT
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_RIGHT

public static final int PARAGRAPH_BORDER_RIGHT
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_DIAGONAL_UL_LR

public static final int PARAGRAPH_BORDER_DIAGONAL_UL_LR
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_DIAGONAL_UR_LL

public static final int PARAGRAPH_BORDER_DIAGONAL_UR_LL
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_TABLE_HORIZONTAL

public static final int PARAGRAPH_BORDER_TABLE_HORIZONTAL
possible border settting

See Also:
Constant Field Values

PARAGRAPH_BORDER_TABLE_VERTICAL

public static final int PARAGRAPH_BORDER_TABLE_VERTICAL
possible border settting

See Also:
Constant Field Values

PGN_DECIMAL

public static final int PGN_DECIMAL
Decimal number format

See Also:
Constant Field Values

PGN_ROMAN_NUMERAL_UPPERCASE

public static final int PGN_ROMAN_NUMERAL_UPPERCASE
Uppercase Roman Numeral

See Also:
Constant Field Values

PGN_ROMAN_NUMERAL_LOWERCASE

public static final int PGN_ROMAN_NUMERAL_LOWERCASE
Lowercase Roman Numeral

See Also:
Constant Field Values

PGN_LETTER_UPPERCASE

public static final int PGN_LETTER_UPPERCASE
Uppercase Letter

See Also:
Constant Field Values

PGN_LETTER_LOWERCASE

public static final int PGN_LETTER_LOWERCASE
Lowercase Letter

See Also:
Constant Field Values

SBK_NONE

public static final int SBK_NONE
Section Break None

See Also:
Constant Field Values

SBK_COLUMN

public static final int SBK_COLUMN
Section Break Column break

See Also:
Constant Field Values

SBK_EVEN

public static final int SBK_EVEN
Section Break Even page break

See Also:
Constant Field Values

SBK_ODD

public static final int SBK_ODD
Section Break Odd page break

See Also:
Constant Field Values

SBK_PAGE

public static final int SBK_PAGE
Section Break Page break

See Also:
Constant Field Values

SECTION_NUMBER_OF_COLUMNS

public static final java.lang.String SECTION_NUMBER_OF_COLUMNS
See Also:
Constant Field Values

SECTION_BREAK_TYPE

public static final java.lang.String SECTION_BREAK_TYPE
See Also:
Constant Field Values

SECTION_PAGE_NUMBER_POSITION_X

public static final java.lang.String SECTION_PAGE_NUMBER_POSITION_X
See Also:
Constant Field Values

SECTION_PAGE_NUMBER_POSITION_Y

public static final java.lang.String SECTION_PAGE_NUMBER_POSITION_Y
See Also:
Constant Field Values

SECTION_PAGE_NUMBER_FORMAT

public static final java.lang.String SECTION_PAGE_NUMBER_FORMAT
See Also:
Constant Field Values

PAGE_PORTRAIT

public static final java.lang.String PAGE_PORTRAIT
Portrait orientation

See Also:
Constant Field Values

PAGE_LANDSCAPE

public static final java.lang.String PAGE_LANDSCAPE
Landscape orientation

See Also:
Constant Field Values

DOCUMENT_PAGE_WIDTH_TWIPS

public static final java.lang.String DOCUMENT_PAGE_WIDTH_TWIPS
See Also:
Constant Field Values

DOCUMENT_PAGE_HEIGHT_TWIPS

public static final java.lang.String DOCUMENT_PAGE_HEIGHT_TWIPS
See Also:
Constant Field Values

DOCUMENT_MARGIN_LEFT_TWIPS

public static final java.lang.String DOCUMENT_MARGIN_LEFT_TWIPS
See Also:
Constant Field Values

DOCUMENT_MARGIN_TOP_TWIPS

public static final java.lang.String DOCUMENT_MARGIN_TOP_TWIPS
See Also:
Constant Field Values

DOCUMENT_MARGIN_RIGHT_TWIPS

public static final java.lang.String DOCUMENT_MARGIN_RIGHT_TWIPS
See Also:
Constant Field Values

DOCUMENT_MARGIN_BOTTOM_TWIPS

public static final java.lang.String DOCUMENT_MARGIN_BOTTOM_TWIPS
See Also:
Constant Field Values

DOCUMENT_PAGE_NUMBER_START

public static final java.lang.String DOCUMENT_PAGE_NUMBER_START
See Also:
Constant Field Values

DOCUMENT_ENABLE_FACING_PAGES

public static final java.lang.String DOCUMENT_ENABLE_FACING_PAGES
See Also:
Constant Field Values

DOCUMENT_PAGE_ORIENTATION

public static final java.lang.String DOCUMENT_PAGE_ORIENTATION
See Also:
Constant Field Values

DOCUMENT_DEFAULT_FONT_NUMER

public static final java.lang.String DOCUMENT_DEFAULT_FONT_NUMER
See Also:
Constant Field Values

properties

protected java.util.HashMap properties
Properties for this RtfProperty object

Constructor Detail

RtfProperty

public RtfProperty()
Method Detail

setToDefault

public void setToDefault()
Set all property objects to default values.

Since:
2.0.8

setToDefault

public void setToDefault(java.lang.String propertyGroup)
Set individual property group to default values.

Parameters:
propertyGroup - String name of the property group to set to default.
Since:
2.0.8

toggleProperty

public boolean toggleProperty(RtfCtrlWordData ctrlWordData)
Toggle the value of the property identified by the RtfCtrlWordData.specialHandler parameter. Toggle values are assumed to be integer values per the RTF spec with a value of 0=off or 1=on.

Parameters:
ctrlWordData - The property name to set
Returns:
true for handled or false if propertyName is null or blank

setProperty

public boolean setProperty(RtfCtrlWordData ctrlWordData)
Set the value of the property identified by the parameter.

Parameters:
ctrlWordData - The controlword with the name to set
Returns:
true for handled or false if propertyName or propertyValue is null

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Get the value of the property identified by the parameter.

Parameters:
propertyName - String containing the property name to get
Returns:
Property Object requested or null if not found in map.

getProperties

public java.util.HashMap getProperties(java.lang.String propertyGroup)
Get a group of properties.

Parameters:
propertyGroup - The group name to obtain.
Returns:
Properties object with requested values.

isModified

public boolean isModified()
Returns:
the modified

setModified

public void setModified(java.lang.String propertyName,
                        boolean modified)
Parameters:
propertyName - the propertyName that is modified
modified - the modified to set

isModifiedCharacter

public boolean isModifiedCharacter()
Returns:
the modifiedCharacter

setModifiedCharacter

public void setModifiedCharacter(boolean modifiedCharacter)
Parameters:
modifiedCharacter - the modifiedCharacter to set

isModifiedParagraph

public boolean isModifiedParagraph()
Returns:
the modifiedParagraph

setModifiedParagraph

public void setModifiedParagraph(boolean modifiedParagraph)
Parameters:
modifiedParagraph - the modifiedParagraph to set

isModifiedSection

public boolean isModifiedSection()
Returns:
the modifiedSection

setModifiedSection

public void setModifiedSection(boolean modifiedSection)
Parameters:
modifiedSection - the modifiedSection to set

isModifiedDocument

public boolean isModifiedDocument()
Returns:
the modifiedDocument

setModifiedDocument

public void setModifiedDocument(boolean modifiedDocument)
Parameters:
modifiedDocument - the modifiedDocument to set

addRtfPropertyListener

public void addRtfPropertyListener(RtfPropertyListener listener)
Adds a RtfPropertyListener to the RtfProperty.

Parameters:
listener - the new RtfPropertyListener.

removeRtfPropertyListener

public void removeRtfPropertyListener(RtfPropertyListener listener)
Removes a RtfPropertyListener from the RtfProperty.

Parameters:
listener - the new RtfPropertyListener.

beforeChange

public void beforeChange(java.lang.String propertyName)

afterChange

public void afterChange(java.lang.String propertyName)


iText 2.1.7