public abstract class PaintPaperType extends Object implements PaperType
Modifier | Constructor and Description |
---|---|
protected |
PaintPaperType(String name,
boolean upLayer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Icon |
createDataIcon(Surface surface,
Drawing[] drawings,
Object[] plans,
DataStore dataStore,
boolean cached)
Paints the content of a list of drawing objects onto a given
plot surface, and returns the result as an Icon.
|
static GraphicsConfiguration |
createHeadlessGraphicsConfig(int imtype)
Returns a graphics configuration that does not rely on a display.
|
protected abstract Paper |
createPaper(Graphics g,
Rectangle bounds)
Creates a paper instance for use with this PaperType.
|
protected abstract void |
flushPaper(Paper paper)
Called when all the layers have been painted.
|
boolean |
isBitmap()
Returns false.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
placeDecal
protected PaintPaperType(String name, boolean upLayer)
name
- paper type nameupLayer
- true to render layers in ascending order,
false to do them in descending orderpublic boolean isBitmap()
public Icon createDataIcon(Surface surface, Drawing[] drawings, Object[] plans, DataStore dataStore, boolean cached)
PaperType
The requireCached
argument provides a hint about
whether the output icon will cache computations.
Set this true if you might want to paint the returned icon
multiple times, false if it is one-shot only, or if keeping
the memory footprint small is more important than speed.
In general it's OK to call the paintIcon
method of
the returned object with a null Component
.
The returned icon is the size of the plotBounds
rectangle,
and will be painted at plotBounds.x, plotBounds.y.
It contains everything in that region except perhaps for decorations,
and it is opaque. It does not (cannot) contain external axis labels,
but must contain any internal markings which appear underneath the
data points.
An implementation will usually create a Paper object and pass it
in turn to the supplied drawings
so that the returned
icon can be based on the drawn-on paper.
createDataIcon
in interface PaperType
surface
- plot surfacedrawings
- array of drawing objects to be painted in sequenceplans
- array of plan objects corresponding to the
drawings
array argumentdataStore
- data storage objectcached
- hint about whether to cache the calculation dataprotected abstract Paper createPaper(Graphics g, Rectangle bounds)
g
- graphics context to which paper should outputbounds
- plot boundsprotected abstract void flushPaper(Paper paper)
paper
- graphics destinationpublic static GraphicsConfiguration createHeadlessGraphicsConfig(int imtype)
imtype
- image type as used by
BufferedImage
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.