com.crystaldecisions.sdk.occa.report.definition
Class TextObject

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.definition.ReportObject
      extended by com.crystaldecisions.sdk.occa.report.definition.TextObject
All Implemented Interfaces:
IReportObject, ITextObject, IClone
Direct Known Subclasses:
FieldHeadingObject

public class TextObject
extends ReportObject
implements ITextObject

This object represents a text object that is found in a report. This object enables you to retrieve and set options for a text object in your report.When possible, use the ITextObject interface to manipulate this object.


Constructor Summary
TextObject()
           
TextObject(ITextObject src)
           
TextObject(java.lang.String text)
           
 
Method Summary
 java.lang.Object clone(boolean deepClone)
           
 void copyTo(java.lang.Object destObject, boolean deepCopy)
           
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
          For internal use only.
 void disconnect()
           
 void endElement(java.lang.String eleName, java.util.Map objState)
          For internal use only.
 void enumerateMembers(IMemberVisitor visitor)
          For internal use only.
 com.crystaldecisions.sdk.occa.report.definition.EmbeddedContentType getEmbeddedContentType()
          For internal use only.
 boolean getEnableSuppressIfDuplicated()
           
 IFontColor getFontColor()
          Returns the color of the font for the first element of the first paragraph.
 int getMaxNumberOfLines()
          Returns the maximum number of lines in the field as an int.
 Paragraphs getParagraphs()
          Returns the paragraph object of the text field.
 ReadingOrder getReadingOrder()
          Returns the reading order for the text field.
 boolean getSuppressEmbeddedFieldBlankLines()
           
 java.lang.String getText()
          Returns the text content of the text field.
 boolean hasContent(java.lang.Object srcTextObject)
           
 boolean isConnected()
           
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
          For internal use only.
 void refresh()
           
 void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt)
          For internal use only.
 void save(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void setEmbeddedContentType(com.crystaldecisions.sdk.occa.report.definition.EmbeddedContentType embeddedContentType)
          For internal use only.
 void setEnableSuppressIfDuplicated(boolean bEnableSuppressIfDuplicated)
           
 void setFontColor(IFontColor fontColor)
          Sets the color of the font for the first element of the first paragraph.
 void setMaxNumberOfLines(int maxNumberOfLines)
           Sets the maximum number of lines in the field.
 void setParagraphs(Paragraphs paragraphs)
          Sets the paragraph object of the text field.
 void setReadingOrder(ReadingOrder newReadingOrder)
          Sets the reading order for the text field.
 void setSuppressEmbeddedFieldBlankLines(boolean bSuppressEmbeddedFieldBlankLines)
           
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
          For internal use only.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.definition.ReportObject
doControllerModification, getBorder, getBorderMargins, getControllableMixin, getFormat, getHeight, getKind, getLeft, getLinkedURI, getName, getReplacementConditionFormulas, getReportPartBookmark, getSectionCode, getSectionName, getTop, getVersion, getWidth, isDirectlyControllable, setBorder, setFormat, setHeight, setKind, setLeft, setLinkedURI, setName, setReplacementConditionFormulas, setReportPartBookmark, setSectionCode, setSectionName, setTop, setVersion, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.crystaldecisions.sdk.occa.report.definition.IReportObject
getBorder, getBorderMargins, getFormat, getHeight, getKind, getLeft, getLinkedURI, getName, getReplacementConditionFormulas, getReportPartBookmark, getSectionCode, getSectionName, getTop, getWidth, setBorder, setFormat, setHeight, setLeft, setLinkedURI, setName, setReplacementConditionFormulas, setReportPartBookmark, setSectionCode, setSectionName, setTop, setWidth
 

Constructor Detail

TextObject

public TextObject(ITextObject src)

TextObject

public TextObject()

TextObject

public TextObject(java.lang.String text)
Method Detail

clone

public java.lang.Object clone(boolean deepClone)
Overrides:
clone in class ReportObject

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)
Overrides:
copyTo in class ReportObject

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)
For internal use only.

Overrides:
createMember in class ReportObject

endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)
Description copied from class: ReportObject

For internal use only.

Overrides:
endElement in class ReportObject

getReadingOrder

public ReadingOrder getReadingOrder()
Description copied from interface: ITextObject

Returns the reading order for the text field. Reading order can be either left to right, or right to left.

Specified by:
getReadingOrder in interface ITextObject
Returns:
The reading order as ReadingOrder.

getFontColor

public IFontColor getFontColor()
Description copied from interface: ITextObject

Returns the color of the font for the first element of the first paragraph.

Specified by:
getFontColor in interface ITextObject
Returns:
The font color as IFontColor.
See Also:
ITextObject.setFontColor(com.crystaldecisions.sdk.occa.report.definition.IFontColor)

getMaxNumberOfLines

public int getMaxNumberOfLines()
Description copied from interface: ITextObject

Returns the maximum number of lines in the field as an int.

Specified by:
getMaxNumberOfLines in interface ITextObject
Returns:
The maximum number of lines in the field as an int.

getParagraphs

public Paragraphs getParagraphs()
Description copied from interface: ITextObject

Returns the paragraph object of the text field.

Specified by:
getParagraphs in interface ITextObject
Returns:
The paragraph object of the text field as Paragraphs.

getText

public java.lang.String getText()
Description copied from interface: ITextObject

Returns the text content of the text field.

Specified by:
getText in interface ITextObject
Returns:
The text content of the text field as a String.

getEnableSuppressIfDuplicated

public boolean getEnableSuppressIfDuplicated()
Specified by:
getEnableSuppressIfDuplicated in interface ITextObject

getSuppressEmbeddedFieldBlankLines

public boolean getSuppressEmbeddedFieldBlankLines()
Specified by:
getSuppressEmbeddedFieldBlankLines in interface ITextObject

getEmbeddedContentType

public com.crystaldecisions.sdk.occa.report.definition.EmbeddedContentType getEmbeddedContentType()
For internal use only.


hasContent

public boolean hasContent(java.lang.Object srcTextObject)
Overrides:
hasContent in class ReportObject

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)
For internal use only.

Overrides:
readElement in class ReportObject

save

public void save(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException
For internal use only.

Overrides:
save in class ReportObject
Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 XMLSerializationContext ctxt)
          throws java.io.IOException
For internal use only.

Overrides:
save in class ReportObject
Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException
For internal use only.

Overrides:
saveContents in class ReportObject
Throws:
java.io.IOException

setFontColor

public void setFontColor(IFontColor fontColor)
Description copied from interface: ITextObject

Sets the color of the font for the first element of the first paragraph. For this change to be persistent, use IParagraphElement.setFontColor(IFontColor fontColor).

In order to set the font color, you will need to use syntax like:

  ITextObject newText = (ITextObject) oldText.clone(true);
        IFontColor fc = newText.getFontColor();
        fc.setColor(java.awt.Color.red);
        newText.setFontColor(fc);
        objectController.modify(oldText, newText);
  

Specified by:
setFontColor in interface ITextObject
Parameters:
fontColor - The color of the font for the first element of the first paragraph as IFontColor.

setMaxNumberOfLines

public void setMaxNumberOfLines(int maxNumberOfLines)
Description copied from interface: ITextObject

Sets the maximum number of lines in the field.

Specified by:
setMaxNumberOfLines in interface ITextObject
Parameters:
maxNumberOfLines - The maximum number of lines in the field as an int.

setReadingOrder

public void setReadingOrder(ReadingOrder newReadingOrder)
Description copied from interface: ITextObject

Sets the reading order for the text field. Reading order can be either left to right, or right to left.

Specified by:
setReadingOrder in interface ITextObject
Parameters:
newReadingOrder - The reading order as ReadingOrder.

setParagraphs

public void setParagraphs(Paragraphs paragraphs)
Description copied from interface: ITextObject

Sets the paragraph object of the text field.

Specified by:
setParagraphs in interface ITextObject
Parameters:
paragraphs - The paragraph object of the text field as Paragraphs.

setEnableSuppressIfDuplicated

public void setEnableSuppressIfDuplicated(boolean bEnableSuppressIfDuplicated)
Specified by:
setEnableSuppressIfDuplicated in interface ITextObject

setSuppressEmbeddedFieldBlankLines

public void setSuppressEmbeddedFieldBlankLines(boolean bSuppressEmbeddedFieldBlankLines)
Specified by:
setSuppressEmbeddedFieldBlankLines in interface ITextObject

setEmbeddedContentType

public void setEmbeddedContentType(com.crystaldecisions.sdk.occa.report.definition.EmbeddedContentType embeddedContentType)
For internal use only.


startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)
For internal use only.

Overrides:
startElement in class ReportObject

isConnected

public boolean isConnected()

disconnect

public void disconnect()

refresh

public void refresh()

enumerateMembers

public void enumerateMembers(IMemberVisitor visitor)
For internal use only.

Overrides:
enumerateMembers in class ReportObject