public abstract class AbstractPaintingState extends Object implements Cloneable, Serializable
Modifier and Type | Class and Description |
---|---|
class |
AbstractPaintingState.AbstractData
A base painting state data holding object
|
class |
AbstractPaintingState.StateStack<E>
A stack implementation which holds state objects
|
Constructor and Description |
---|
AbstractPaintingState() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkTransform(AffineTransform tf)
Check the current transform.
|
void |
clear()
Clears the state stack
|
void |
clearTransform()
Clears the current AffineTransform to the Identity AffineTransform
|
Object |
clone() |
void |
concatenate(AffineTransform at)
Concatenates the given AffineTransform to the current one.
|
Color |
getBackColor()
Get the background color.
|
AffineTransform |
getBaseTransform()
Get a copy of the base transform for the page.
|
Color |
getColor()
Get the color.
|
AbstractPaintingState.AbstractData |
getData()
Returns the currently valid state
|
String |
getFontName()
Gets the current font name
|
int |
getFontSize()
Gets the current font size
|
float |
getLineWidth()
Returns the current line width
|
protected Stack<AbstractPaintingState.AbstractData> |
getStateStack()
Return the state stack
|
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.
|
List<AbstractPaintingState.AbstractData> |
restoreAll()
Restore all painting state data.
|
void |
save()
Save the current painting state.
|
void |
saveAll(List<AbstractPaintingState.AbstractData> dataList)
Save all painting state data.
|
boolean |
setBackColor(Color col)
Set the current background color.
|
boolean |
setColor(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(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.
|
String |
toString() |
protected abstract AbstractPaintingState.AbstractData instantiateData()
protected abstract AbstractPaintingState instantiate()
public AbstractPaintingState.AbstractData getData()
public boolean setColor(Color col)
col
- the color to setpublic Color getColor()
public Color getBackColor()
public boolean setBackColor(Color col)
col
- the background color to setpublic boolean setFontName(String internalFontName)
internalFontName
- the internal font namepublic 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 AffineTransform getTransform()
public boolean checkTransform(AffineTransform tf)
tf
- the transform the check againstpublic AffineTransform getBaseTransform()
public void concatenate(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(List<AbstractPaintingState.AbstractData> dataList)
dataList
- a state data listpublic List<AbstractPaintingState.AbstractData> restoreAll()
protected void setData(AbstractPaintingState.AbstractData data)
data
- the state datapublic void clear()
protected Stack<AbstractPaintingState.AbstractData> getStateStack()
Copyright © 2025 Apache Software Foundation. All rights reserved.