Class RtfProperty
- java.lang.Object
-
- com.lowagie.text.rtf.parser.properties.RtfProperty
-
public class RtfProperty extends java.lang.ObjectRtfPropertyhandles document, paragraph, etc. property values- Since:
- 2.0.8
- Author:
- Howard Shank (hgshank@yahoo.com)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHARACTERstatic java.lang.StringCHARACTER_BOLDstatic java.lang.StringCHARACTER_FONTstatic java.lang.StringCHARACTER_ITALICstatic java.lang.StringCHARACTER_SIZEstatic java.lang.StringCHARACTER_STYLEstatic java.lang.StringCHARACTER_UNDERLINEstatic java.lang.StringCOLORstatic java.lang.StringCOLOR_BGstatic java.lang.StringCOLOR_FGstatic java.lang.StringDOCUMENTstatic java.lang.StringDOCUMENT_DEFAULT_FONT_NUMERstatic java.lang.StringDOCUMENT_ENABLE_FACING_PAGESstatic java.lang.StringDOCUMENT_MARGIN_BOTTOM_TWIPSstatic java.lang.StringDOCUMENT_MARGIN_LEFT_TWIPSstatic java.lang.StringDOCUMENT_MARGIN_RIGHT_TWIPSstatic java.lang.StringDOCUMENT_MARGIN_TOP_TWIPSstatic java.lang.StringDOCUMENT_PAGE_HEIGHT_TWIPSstatic java.lang.StringDOCUMENT_PAGE_NUMBER_STARTstatic java.lang.StringDOCUMENT_PAGE_ORIENTATIONstatic java.lang.StringDOCUMENT_PAGE_WIDTH_TWIPSstatic intJUSTIFY_CENTERJustify centerstatic intJUSTIFY_FULLJustify fullstatic intJUSTIFY_LEFTJustify leftstatic intJUSTIFY_RIGHTJustify rightstatic intOFFstatic intONstatic java.lang.StringPAGE_LANDSCAPELandscape orientationstatic java.lang.StringPAGE_PORTRAITPortrait orientationstatic java.lang.StringPARAGRAPHstatic java.lang.StringPARAGRAPH_BORDERstatic intPARAGRAPH_BORDER_BOTTOMpossible border setttingstatic java.lang.StringPARAGRAPH_BORDER_CELLstatic intPARAGRAPH_BORDER_DIAGONAL_UL_LRpossible border setttingstatic intPARAGRAPH_BORDER_DIAGONAL_UR_LLpossible border setttingstatic intPARAGRAPH_BORDER_LEFTpossible border setttingstatic intPARAGRAPH_BORDER_NILpossible border setttingstatic intPARAGRAPH_BORDER_RIGHTpossible border setttingstatic intPARAGRAPH_BORDER_TABLE_HORIZONTALpossible border setttingstatic intPARAGRAPH_BORDER_TABLE_VERTICALpossible border setttingstatic intPARAGRAPH_BORDER_TOPpossible border setttingstatic java.lang.StringPARAGRAPH_INDENT_FIRST_LINEstatic java.lang.StringPARAGRAPH_INDENT_LEFTstatic java.lang.StringPARAGRAPH_INDENT_RIGHTstatic java.lang.StringPARAGRAPH_JUSTIFICATIONstatic intPGN_DECIMALDecimal number formatstatic intPGN_LETTER_LOWERCASELowercase Letterstatic intPGN_LETTER_UPPERCASEUppercase Letterstatic intPGN_ROMAN_NUMERAL_LOWERCASELowercase Roman Numeralstatic intPGN_ROMAN_NUMERAL_UPPERCASEUppercase Roman Numeralprotected java.util.Map<java.lang.String,java.lang.Object>propertiesProperties for this RtfProperty objectstatic intSBK_COLUMNSection Break Column breakstatic intSBK_EVENSection Break Even page breakstatic intSBK_NONESection Break Nonestatic intSBK_ODDSection Break Odd page breakstatic intSBK_PAGESection Break Page breakstatic java.lang.StringSECTIONstatic java.lang.StringSECTION_BREAK_TYPEstatic java.lang.StringSECTION_NUMBER_OF_COLUMNSstatic java.lang.StringSECTION_PAGE_NUMBER_FORMATstatic java.lang.StringSECTION_PAGE_NUMBER_POSITION_Xstatic java.lang.StringSECTION_PAGE_NUMBER_POSITION_Y
-
Constructor Summary
Constructors Constructor Description RtfProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRtfPropertyListener(RtfPropertyListener listener)Adds aRtfPropertyListenerto theRtfProperty.voidafterChange(java.lang.String propertyName)voidbeforeChange(java.lang.String propertyName)java.util.HashMap<java.lang.String,java.lang.Object>getProperties(java.lang.String propertyGroup)Get a group of properties.java.lang.ObjectgetProperty(java.lang.String propertyName)Get the value of the property identified by the parameter.booleanisModified()booleanisModifiedCharacter()booleanisModifiedDocument()booleanisModifiedParagraph()booleanisModifiedSection()voidremoveRtfPropertyListener(RtfPropertyListener listener)Removes aRtfPropertyListenerfrom theRtfProperty.voidsetModified(java.lang.String propertyName, boolean modified)voidsetModifiedCharacter(boolean modifiedCharacter)voidsetModifiedDocument(boolean modifiedDocument)voidsetModifiedParagraph(boolean modifiedParagraph)voidsetModifiedSection(boolean modifiedSection)booleansetProperty(RtfCtrlWordData ctrlWordData)Set the value of the property identified by the parameter.voidsetToDefault()Set all property objects to default values.voidsetToDefault(java.lang.String propertyGroup)Set individual property group to default values.booleantoggleProperty(RtfCtrlWordData ctrlWordData)Toggle the value of the property identified by theRtfCtrlWordData.specialHandlerparameter.
-
-
-
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 final java.util.Map<java.lang.String,java.lang.Object> properties
Properties for this RtfProperty object
-
-
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-Stringname 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 theRtfCtrlWordData.specialHandlerparameter. 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:
truefor handled orfalseifpropertyNameisnullor 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:
truefor handled orfalseifpropertyNameorpropertyValueisnull
-
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<java.lang.String,java.lang.Object> 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 modifiedmodified- 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 aRtfPropertyListenerto theRtfProperty.- Parameters:
listener- the new RtfPropertyListener.
-
removeRtfPropertyListener
public void removeRtfPropertyListener(RtfPropertyListener listener)
Removes aRtfPropertyListenerfrom theRtfProperty.- Parameters:
listener- the new RtfPropertyListener.
-
beforeChange
public void beforeChange(java.lang.String propertyName)
-
afterChange
public void afterChange(java.lang.String propertyName)
-
-