com.lowagie.text.rtf.graphic

Class RtfShapeProperty

public class RtfShapeProperty extends RtfAddableElement

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:

Version: $Revision: 1.3 $

Author: Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
Stringname
The RtfShapeProperty name.
static StringPROPERTY_ADJUST_VALUE
Property for defining the first adjust handle for shapes.
static StringPROPERTY_FILL_COLOR
Property for defining the fill color of the shape.
static StringPROPERTY_FLIP_H
Property for signalling a horizontal flip of the shape.
static StringPROPERTY_FLIP_V
Property for signalling a vertical flip of the shape.
static StringPROPERTY_GEO_BOTTOM
Property for defining the maximum vertical coordinate that is visible.
static StringPROPERTY_GEO_LEFT
Property for defining the minimum horizontal coordinate that is visible.
static StringPROPERTY_GEO_RIGHT
Property for defining the maximum horizontal coordinate that is visible.
static StringPROPERTY_GEO_TOP
Property for defining the minimum vertical coordinate that is visible.
static StringPROPERTY_LAYOUT_IN_CELL
Property for defining that the shape is in a table cell.
static StringPROPERTY_LINE_COLOR
Property for defining the line color of the shape.
static intPROPERTY_TYPE_ARRAY
The stored value is either an int or a Point array.
static intPROPERTY_TYPE_BOOLEAN
The stored value is boolean.
static intPROPERTY_TYPE_COLOR
The stored value is a Color.
static intPROPERTY_TYPE_DOUBLE
The stored value is a double.
static intPROPERTY_TYPE_LONG
The stored value is a long.
static StringPROPERTY_VERTICIES
Property for defining vertices in freeform shapes.
inttype
The value type.
Objectvalue
The RtfShapeProperty value.
Constructor Summary
RtfShapeProperty(String name, Object value)
Internaly used to create the RtfShape.
RtfShapeProperty(String name, long value)
Constructs a RtfShapeProperty with a long value.
RtfShapeProperty(String name, double value)
Constructs a RtfShapeProperty with a double value.
RtfShapeProperty(String name, boolean value)
Constructs a RtfShapeProperty with a boolean value.
RtfShapeProperty(String name, Color value)
Constructs a RtfShapeProperty with a Color value.
RtfShapeProperty(String name, int[] value)
Constructs a RtfShapeProperty with an int array value.
RtfShapeProperty(String name, Point[] value)
Constructs a RtfShapeProperty with a Point array value.
Method Summary
StringgetName()
Gets the name of this RtfShapeProperty.
byte[]write()
Writes the property definition.

Field Detail

name

private String name
The RtfShapeProperty name.

PROPERTY_ADJUST_VALUE

public static final String PROPERTY_ADJUST_VALUE
Property for defining the first adjust handle for shapes. Used with the rounded rectangle. Requires a long value.

PROPERTY_FILL_COLOR

public static final String PROPERTY_FILL_COLOR
Property for defining the fill color of the shape. Requires a Color value.

PROPERTY_FLIP_H

public static final String PROPERTY_FLIP_H
Property for signalling a horizontal flip of the shape. Requires a boolean value.

PROPERTY_FLIP_V

public static final String PROPERTY_FLIP_V
Property for signalling a vertical flip of the shape. Requires a boolean value.

PROPERTY_GEO_BOTTOM

public static final String PROPERTY_GEO_BOTTOM
Property for defining the maximum vertical coordinate that is visible. Requires a long value.

PROPERTY_GEO_LEFT

public static final String PROPERTY_GEO_LEFT
Property for defining the minimum horizontal coordinate that is visible. Requires a long value.

PROPERTY_GEO_RIGHT

public static final String PROPERTY_GEO_RIGHT
Property for defining the maximum horizontal coordinate that is visible. Requires a long value.

PROPERTY_GEO_TOP

public static final String PROPERTY_GEO_TOP
Property for defining the minimum vertical coordinate that is visible. Requires a long value.

PROPERTY_LAYOUT_IN_CELL

public static final String PROPERTY_LAYOUT_IN_CELL
Property for defining that the shape is in a table cell. Requires a boolean value.

PROPERTY_LINE_COLOR

public static final String PROPERTY_LINE_COLOR
Property for defining the line color of the shape. Requires a Color value.

PROPERTY_TYPE_ARRAY

private static final int PROPERTY_TYPE_ARRAY
The stored value is either an int or a Point array.

PROPERTY_TYPE_BOOLEAN

private static final int PROPERTY_TYPE_BOOLEAN
The stored value is boolean.

PROPERTY_TYPE_COLOR

private static final int PROPERTY_TYPE_COLOR
The stored value is a Color.

PROPERTY_TYPE_DOUBLE

private static final int PROPERTY_TYPE_DOUBLE
The stored value is a double.

PROPERTY_TYPE_LONG

private static final int PROPERTY_TYPE_LONG
The stored value is a long.

PROPERTY_VERTICIES

public static final String PROPERTY_VERTICIES
Property for defining vertices in freeform shapes. Requires a Point array as the value.

type

private int type
The value type.

value

private Object value
The RtfShapeProperty value.

Constructor Detail

RtfShapeProperty

private RtfShapeProperty(String name, Object value)
Internaly used to create the RtfShape.

Parameters: name The property name to use. value The property value to use.

RtfShapeProperty

public RtfShapeProperty(String name, long value)
Constructs a RtfShapeProperty with a long value.

Parameters: name The property name to use. value The long value to use.

RtfShapeProperty

public RtfShapeProperty(String name, double value)
Constructs a RtfShapeProperty with a double value.

Parameters: name The property name to use. value The double value to use.

RtfShapeProperty

public RtfShapeProperty(String name, boolean value)
Constructs a RtfShapeProperty with a boolean value.

Parameters: name The property name to use. value The boolean value to use.

RtfShapeProperty

public RtfShapeProperty(String name, Color value)
Constructs a RtfShapeProperty with a Color value.

Parameters: name The property name to use. value The Color value to use.

RtfShapeProperty

public RtfShapeProperty(String name, int[] value)
Constructs a RtfShapeProperty with an int array value.

Parameters: name The property name to use. value The int array to use.

RtfShapeProperty

public RtfShapeProperty(String name, Point[] value)
Constructs a RtfShapeProperty with a Point array value.

Parameters: name The property name to use. value The Point array to use.

Method Detail

getName

public String getName()
Gets the name of this RtfShapeProperty.

Returns: The name of this RtfShapeProperty.

write

public byte[] write()
Writes the property definition. How the property is written depends on the property type.