org.apache.fop.render.rtf.rtflib.rtfdoc

Class RtfAttributes

Implemented Interfaces:
java.lang.Cloneable
Known Direct Subclasses:
FOPRtfAttributes

public class RtfAttributes
extends java.lang.Object
implements java.lang.Cloneable

Attributes for RtfText
Author:
Bertrand Delacretaz bdelacretaz@codeconsult.ch

Method Summary

void
addIntegerValue(int addValue, String name)
Add integer value addValue to attribute with name name.
Object
clone()
implement cloning
Object
getValue(String name)
Attributes
getXslAttributes()
Added by Normand Masse Used for attribute inheritance
boolean
isSet(String name)
Iterator
nameIterator()
RtfAttributes
set(String name)
set an attribute that has no value.
RtfAttributes
set(String name, String type)
Set an attribute that has a String value
RtfAttributes
set(String name, int value)
Set an attribute that has an integer value
RtfAttributes
set(String name, RtfAttributes value)
Set an attribute that has nested attributes as value
RtfAttributes
set(RtfAttributes attrs)
Set attributes from another attributes object
void
setXslAttributes(Attributes pAttribs)
Added by Normand Masse Used for attribute inheritance
String
toString()
debugging log
RtfAttributes
unset(String name)
unset an attribute that has no value

Method Details

addIntegerValue

public void addIntegerValue(int addValue,
                            String name)
Add integer value addValue to attribute with name name. If there is no such setted attribute, then value of this attribure is equal to addValue.
Parameters:
addValue - the increment of value
name - the name of attribute

clone

public Object clone()
implement cloning
Returns:
cloned Object

getValue

public Object getValue(String name)
Parameters:
name - String containing attribute name
Returns:
the value of an attribute, null if not found

getXslAttributes

public Attributes getXslAttributes()
Added by Normand Masse Used for attribute inheritance
Returns:
Attributes

isSet

public boolean isSet(String name)
Parameters:
name - String containing attribute name
Returns:
true if given attribute is set

nameIterator

public Iterator nameIterator()
Returns:
an Iterator on all names that are set

set

public RtfAttributes set(String name)
set an attribute that has no value.
Parameters:
name - name of attribute to set
Returns:
this object, for chaining calls

set

public RtfAttributes set(String name,
                         String type)
Set an attribute that has a String value
Parameters:
name - name of attribute
type - value of attribute
Returns:
this (which now contains the new entry)

set

public RtfAttributes set(String name,
                         int value)
Set an attribute that has an integer value
Parameters:
name - name of attribute
value - value of attribute
Returns:
this (which now contains the new entry), for chaining calls

set

public RtfAttributes set(String name,
                         RtfAttributes value)
Set an attribute that has nested attributes as value
Parameters:
name - name of attribute
value - value of the nested attributes
Returns:
this (which now contains the new entry)

set

public RtfAttributes set(RtfAttributes attrs)
Set attributes from another attributes object
Parameters:
attrs - RtfAttributes object whose elements will be copied into this instance
Returns:
this object, for chaining calls

setXslAttributes

public void setXslAttributes(Attributes pAttribs)
Added by Normand Masse Used for attribute inheritance
Parameters:
pAttribs - attributes

toString

public String toString()
debugging log
Returns:
String representation of object

unset

public RtfAttributes unset(String name)
unset an attribute that has no value
Parameters:
name - name of attribute to unset
Returns:
this object, for chaining calls

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.