Package com.lowagie.text.rtf.graphic
Class RtfShapeProperty
java.lang.Object
com.lowagie.text.Chunk
com.lowagie.text.rtf.RtfAddableElement
com.lowagie.text.rtf.graphic.RtfShapeProperty
- All Implemented Interfaces:
com.lowagie.text.Element
,RtfBasicElement
,com.lowagie.text.RtfElementInterface
The RtfShapeProperty stores all shape properties that are
not handled by the RtfShape and RtfShapePosition.
There is a huge selection of properties that can be set. For the most important properites there are constants for the property name, for all others you must find the correct property name in the RTF specification (version 1.6).
The following types of property values are supported:
There is a huge selection of properties that can be set. For the most important properites there are constants for the property name, for all others you must find the correct property name in the RTF specification (version 1.6).
The following types of property values are supported:
- long
- double
- boolean
- Color
- int[]
- Point[]
- Version:
- $Id: RtfShapeProperty.java 3580 2008-08-06 15:52:00Z howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The RtfShapeProperty name.static final String
Property for defining the first adjust handle for shapes.static final String
Property for defining the fill color of the shape.static final String
Property for signaling a horizontal flip of the shape.static final String
Property for signaling a vertical flip of the shape.static final String
Property for defining the maximum vertical coordinate that is visible.static final String
Property for defining the minimum horizontal coordinate that is visible.static final String
Property for defining the maximum horizontal coordinate that is visible.static final String
Property for defining the minimum vertical coordinate that is visible.static final String
Property for defining an image.static final String
Property for defining that the shape is in a table cell.static final String
Property for defining the line color of the shape.private static final int
The stored value is either an int or a Point array.private static final int
The stored value is boolean.private static final int
The stored value is a Color.private static final int
The stored value is a double.private static final int
The stored value is an Image.private static final int
The stored value is a long.static final String
Property for defining vertices in freeform shapes.private int
The value type.private final Object
The RtfShapeProperty value.Fields inherited from class com.lowagie.text.rtf.RtfAddableElement
doc, inHeader, inTable
Fields inherited from class com.lowagie.text.Chunk
ACTION, attributes, BACKGROUND, CHAR_SPACING, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, TEXTRENDERMODE, UNDERLINE
Fields inherited from interface com.lowagie.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRtfShapeProperty
(String name, boolean value) Constructs a RtfShapeProperty with a boolean value.RtfShapeProperty
(String name, double value) Constructs a RtfShapeProperty with a double value.RtfShapeProperty
(String name, int[] value) Constructs a RtfShapeProperty with an int array value.RtfShapeProperty
(String name, long value) Constructs a RtfShapeProperty with a long value.RtfShapeProperty
(String name, com.lowagie.text.Image value) Constructs a RtfShapeProperty with an Image value.RtfShapeProperty
(String name, Color value) Constructs a RtfShapeProperty with a Color value.RtfShapeProperty
(String name, Point[] value) Constructs a RtfShapeProperty with a Point array value.private
RtfShapeProperty
(String name, Object value) Internally used to create the RtfShape. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the name of this RtfShapeProperty.void
writeContent
(OutputStream result) Writes the property definition.Methods inherited from class com.lowagie.text.rtf.RtfAddableElement
intToByteArray, isEmpty, setInHeader, setInTable, setRtfDocument
Methods inherited from class com.lowagie.text.Chunk
append, getCharacterSpacing, getChunkAttributes, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setCharacterSpacing, setChunkAttributes, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type
-
Field Details
-
PROPERTY_IMAGE
Property for defining an image.- See Also:
-
PROPERTY_VERTICIES
Property for defining vertices in freeform shapes. Requires a Point array as the value.- See Also:
-
PROPERTY_GEO_TOP
Property for defining the minimum vertical coordinate that is visible. Requires a long value.- See Also:
-
PROPERTY_GEO_LEFT
Property for defining the minimum horizontal coordinate that is visible. Requires a long value.- See Also:
-
PROPERTY_GEO_RIGHT
Property for defining the maximum horizontal coordinate that is visible. Requires a long value.- See Also:
-
PROPERTY_GEO_BOTTOM
Property for defining the maximum vertical coordinate that is visible. Requires a long value.- See Also:
-
PROPERTY_LAYOUT_IN_CELL
Property for defining that the shape is in a table cell. Requires a boolean value.- See Also:
-
PROPERTY_FLIP_V
Property for signaling a vertical flip of the shape. Requires a boolean value.- See Also:
-
PROPERTY_FLIP_H
Property for signaling a horizontal flip of the shape. Requires a boolean value.- See Also:
-
PROPERTY_FILL_COLOR
Property for defining the fill color of the shape. Requires a Color value.- See Also:
-
PROPERTY_LINE_COLOR
Property for defining the line color of the shape. Requires a Color value.- See Also:
-
PROPERTY_ADJUST_VALUE
Property for defining the first adjust handle for shapes. Used with the rounded rectangle. Requires a long value.- See Also:
-
PROPERTY_TYPE_LONG
private static final int PROPERTY_TYPE_LONGThe stored value is a long.- See Also:
-
PROPERTY_TYPE_BOOLEAN
private static final int PROPERTY_TYPE_BOOLEANThe stored value is boolean.- See Also:
-
PROPERTY_TYPE_DOUBLE
private static final int PROPERTY_TYPE_DOUBLEThe stored value is a double.- See Also:
-
PROPERTY_TYPE_COLOR
private static final int PROPERTY_TYPE_COLORThe stored value is a Color.- See Also:
-
PROPERTY_TYPE_ARRAY
private static final int PROPERTY_TYPE_ARRAYThe stored value is either an int or a Point array.- See Also:
-
PROPERTY_TYPE_IMAGE
private static final int PROPERTY_TYPE_IMAGEThe stored value is an Image.- See Also:
-
type
private int typeThe value type. -
name
The RtfShapeProperty name. -
value
The RtfShapeProperty value.
-
-
Constructor Details
-
RtfShapeProperty
Internally used to create the RtfShape.- Parameters:
name
- The property name to use.value
- The property value to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with a long value.- Parameters:
name
- The property name to use.value
- The long value to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with a double value.- Parameters:
name
- The property name to use.value
- The double value to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with a boolean value.- Parameters:
name
- The property name to use.value
- The boolean value to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with a Color value.- Parameters:
name
- The property name to use.value
- The Color value to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with an int array value.- Parameters:
name
- The property name to use.value
- The int array to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with a Point array value.- Parameters:
name
- The property name to use.value
- The Point array to use.
-
RtfShapeProperty
Constructs a RtfShapeProperty with an Image value.- Parameters:
name
- The property name to use.value
- The Image to use.
-
-
Method Details
-
getName
Gets the name of this RtfShapeProperty.- Returns:
- The name of this RtfShapeProperty.
-
writeContent
Writes the property definition. How the property is written depends on the property type.- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfAddableElement
- Parameters:
result
- TheOutputStream
to write the content to- Throws:
IOException
-