|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.afp.modca.AbstractAFPObject
org.apache.fop.afp.modca.AbstractStructuredObject
org.apache.fop.afp.modca.AbstractTripletStructuredObject
org.apache.fop.afp.modca.AbstractNamedAFPObject
org.apache.fop.afp.modca.AbstractDataObject
org.apache.fop.afp.modca.GraphicsObject
public class GraphicsObject
Top-level GOCA graphics object. Acts as container and factory of all other graphic objects
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject |
|---|
AbstractAFPObject.Category, AbstractAFPObject.Type |
| Field Summary | |
|---|---|
protected java.util.List<GraphicsData> |
objects
list of objects contained within this container |
| Fields inherited from class org.apache.fop.afp.modca.AbstractDataObject |
|---|
factory, objectEnvironmentGroup |
| Fields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject |
|---|
name |
| Fields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject |
|---|
triplets |
| Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject |
|---|
LOG, SF_CLASS, SF_HEADER_LENGTH |
| Constructor Summary | |
|---|---|
GraphicsObject(Factory factory,
java.lang.String name)
Default constructor |
|
| Method Summary | |
|---|---|
void |
addBox(int[] coords)
Adds a box at the given coordinates |
void |
addFillet(int[] coords)
Adds a fillet (curve) at the given coordinates |
void |
addFillet(int[] coords,
boolean relative)
Adds a fillet (curve) at the given coordinates |
void |
addFullArc(int x,
int y,
int mh,
int mhr)
Adds a full arc |
void |
addImage(int x,
int y,
int width,
int height,
byte[] imgData)
Adds an image |
void |
addLine(int[] coords)
Adds a line at the given x/y coordinates |
void |
addLine(int[] coords,
boolean relative)
Adds a line at the given x/y coordinates |
void |
addObject(StructuredData object)
|
void |
addString(java.lang.String str,
int x,
int y,
CharacterSet charSet)
Adds a string |
void |
beginArea()
Begins a graphics area (start of fill) |
void |
endArea()
Ends a graphics area (end of fill) |
void |
endProlog()
Ends the prolog. |
void |
newSegment()
Creates a new graphics segment |
void |
setArcParams(int xmaj,
int ymin,
int xmin,
int ymaj)
Sets the arc parameters |
void |
setCharacterSet(int characterSet)
Sets the character set to use |
void |
setColor(java.awt.Color color)
Sets the current color |
void |
setColorConverter(org.apache.xmlgraphics.java2d.color.ColorConverter colorConverter)
Sets the color converter |
void |
setComplete(boolean complete)
Sets whether or not this object is complete or not |
void |
setCurrentPosition(int[] coords)
Sets the current position |
void |
setFill(boolean fill)
Sets whether the following shape is to be filled. |
void |
setLineType(byte lineType)
Sets the line type |
void |
setLineWidth(float lineWidth)
Sets the line width |
void |
setLineWidth(int lineWidth)
Sets the line width |
void |
setPatternSymbol(byte patternSymbol)
Sets the fill pattern of the next shape. |
void |
setViewport(AFPDataObjectInfo dataObjectInfo)
Sets the object view port (area position and size). |
java.lang.String |
toString()
|
protected void |
writeContent(java.io.OutputStream os)
Helper method to write the contents of the Object. |
protected void |
writeEnd(java.io.OutputStream os)
Helper method to write the end of the Object. |
protected void |
writeStart(java.io.OutputStream os)
Helper method to write the start of the Object. |
| Methods inherited from class org.apache.fop.afp.modca.AbstractDataObject |
|---|
getObjectEnvironmentGroup, isComplete, isStarted, setStarted |
| Methods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject |
|---|
copySF, getName, getNameBytes, getNameLength, setName |
| Methods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject |
|---|
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setObjectClassification, writeTriplets |
| Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject |
|---|
writeToStream |
| Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject |
|---|
copySF, truncate, writeChunksToStream, writeObjects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<GraphicsData> objects
| Constructor Detail |
|---|
public GraphicsObject(Factory factory,
java.lang.String name)
factory - the object factoryname - the name of graphics object| Method Detail |
|---|
public void setViewport(AFPDataObjectInfo dataObjectInfo)
setViewport in class AbstractDataObjectdataObjectInfo - the object area infopublic void addObject(StructuredData object)
object - the structured datapublic void setColor(java.awt.Color color)
color - the active color to usepublic void setColorConverter(org.apache.xmlgraphics.java2d.color.ColorConverter colorConverter)
colorConverter - ColorConverter to filter the color
when creating a GraphicsSetProcessColor.public void setCurrentPosition(int[] coords)
coords - the x and y coordinates of the current positionpublic void setLineWidth(int lineWidth)
lineWidth - the line width multiplierpublic void setLineWidth(float lineWidth)
lineWidth - the line width multiplierpublic void setLineType(byte lineType)
lineType - the line typepublic void setFill(boolean fill)
fill - true if the following shape is to be filledpublic void setPatternSymbol(byte patternSymbol)
patternSymbol - the fill pattern of the next shapepublic void setCharacterSet(int characterSet)
characterSet - the character set (font) referencepublic void addLine(int[] coords)
coords - the x/y coordinates (can be a series)
public void addLine(int[] coords,
boolean relative)
coords - the x/y coordinates (can be a series)relative - relative true for a line at current position (relative to)public void addBox(int[] coords)
coords - the x/y coordinatespublic void addFillet(int[] coords)
coords - the x/y coordinates
public void addFillet(int[] coords,
boolean relative)
coords - the x/y coordinatesrelative - relative true for a fillet (curve) at current position (relative to)
public void setArcParams(int xmaj,
int ymin,
int xmin,
int ymaj)
xmaj - the maximum value of the x coordinateymin - the minimum value of the y coordinatexmin - the minimum value of the x coordinateymaj - the maximum value of the y coordinate
public void addFullArc(int x,
int y,
int mh,
int mhr)
x - the x coordinatey - the y coordinatemh - the integer portion of the multipliermhr - the fractional portion of the multiplier
public void addImage(int x,
int y,
int width,
int height,
byte[] imgData)
x - the x coordinatey - the y coordinatewidth - the image widthheight - the image heightimgData - the image data
public void addString(java.lang.String str,
int x,
int y,
CharacterSet charSet)
str - the stringx - the x coordinatey - the y coordinatecharSet - the character set associated with the stringpublic void beginArea()
public void endArea()
public void endProlog()
public java.lang.String toString()
toString in class AbstractNamedAFPObjectpublic void newSegment()
public void setComplete(boolean complete)
setComplete in interface CompletablesetComplete in class AbstractDataObjectcomplete - true if this object is complete
protected void writeStart(java.io.OutputStream os)
throws java.io.IOException
writeStart in class AbstractDataObjectos - The stream to write to
java.io.IOException - throws an I/O exception if one occurred
protected void writeContent(java.io.OutputStream os)
throws java.io.IOException
writeContent in class AbstractDataObjectos - The stream to write to
java.io.IOException - throws an I/O exception if one occurred
protected void writeEnd(java.io.OutputStream os)
throws java.io.IOException
writeEnd in class AbstractStructuredObjectos - The stream to write to
java.io.IOException - an I/O exception if one occurred
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||