public abstract class AbstractPaintingState
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
AbstractPaintingState.AbstractData
A base painting state data holding object
|
class |
AbstractPaintingState.StateStack
A stack implementation which holds state objects
|
Constructor and Description |
---|
AbstractPaintingState() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkTransform(java.awt.geom.AffineTransform tf)
Check the current transform.
|
void |
clear()
Clears the state stack
|
void |
clearTransform()
Clears the current AffineTransform to the Identity AffineTransform
|
java.lang.Object |
clone() |
void |
concatenate(java.awt.geom.AffineTransform at)
Concatenates the given AffineTransform to the current one.
|
java.awt.Color |
getBackColor()
Get the background color.
|
java.awt.geom.AffineTransform |
getBaseTransform()
Get a copy of the base transform for the page.
|
java.awt.Color |
getColor()
Get the color.
|
AbstractPaintingState.AbstractData |
getData()
Returns the currently valid state
|
java.lang.String |
getFontName()
Gets the current font name
|
int |
getFontSize()
Gets the current font size
|
float |
getLineWidth()
Returns the current line width
|
protected java.util.Stack |
getStateStack()
Return the state stack
|
java.awt.geom.AffineTransform |
getTransform()
Get the current transform.
|
protected abstract AbstractPaintingState |
instantiate()
Instantiates a new state object
|
protected abstract AbstractPaintingState.AbstractData |
instantiateData()
Instantiates a new state data object
|
void |
resetTransform()
Resets the current AffineTransform to the Base AffineTransform.
|
AbstractPaintingState.AbstractData |
restore()
Restore the current painting state.
|
java.util.List |
restoreAll()
Restore all painting state data.
|
void |
save()
Save the current painting state.
|
void |
saveAll(java.util.List dataList)
Save all painting state data.
|
boolean |
setBackColor(java.awt.Color col)
Set the current background color.
|
boolean |
setColor(java.awt.Color col)
Set the current color.
|
boolean |
setDashArray(float[] dash)
Sets the dash array (line type) for the current basic stroke
|
protected void |
setData(AbstractPaintingState.AbstractData data)
Sets the current state data
|
boolean |
setFontName(java.lang.String internalFontName)
Set the current font name
|
boolean |
setFontSize(int size)
Set the current font size.
|
boolean |
setLineWidth(float width)
Set the current line width.
|
java.lang.String |
toString() |
protected abstract AbstractPaintingState.AbstractData instantiateData()
protected abstract AbstractPaintingState instantiate()
public AbstractPaintingState.AbstractData getData()
public boolean setColor(java.awt.Color col)
col
- the color to setpublic java.awt.Color getColor()
public java.awt.Color getBackColor()
public boolean setBackColor(java.awt.Color col)
col
- the background color to setpublic boolean setFontName(java.lang.String internalFontName)
internalFontName
- the internal font namepublic java.lang.String getFontName()
public int getFontSize()
public boolean setFontSize(int size)
size
- the font size to setpublic boolean setLineWidth(float width)
width
- the line width in pointspublic float getLineWidth()
public boolean setDashArray(float[] dash)
dash
- the line dash arraypublic java.awt.geom.AffineTransform getTransform()
public boolean checkTransform(java.awt.geom.AffineTransform tf)
tf
- the transform the check againstpublic java.awt.geom.AffineTransform getBaseTransform()
public void concatenate(java.awt.geom.AffineTransform at)
at
- the transform to concatenate to the current level transformpublic void resetTransform()
public void clearTransform()
public void save()
public AbstractPaintingState.AbstractData restore()
public void saveAll(java.util.List dataList)
dataList
- a state data listpublic java.util.List restoreAll()
protected void setData(AbstractPaintingState.AbstractData data)
currentData
- state datapublic void clear()
protected java.util.Stack getStateStack()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.