|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.paper.RgbPaperType
public abstract class RgbPaperType
Abstract bitmapped PaperType which uses an RgbImage to store graphics. Abstract subclasses are provided for different geometries, and concrete implementations have to provide their own compositing which operates on the supplied RgbImage, using either the BufferedImage or the backing buffer.
Nested Class Summary | |
---|---|
protected static class |
RgbPaperType.RgbPaper
Paper for use by this type. |
Constructor Summary | |
---|---|
protected |
RgbPaperType(String name,
boolean upLayer)
Constructor. |
Method Summary | |
---|---|
Icon |
createDataIcon(Surface surface,
Drawing[] drawings,
Object[] plans,
DataStore dataStore,
boolean requireCached)
Paints the content of a list of drawing objects onto a given plot surface, and returns the result as an Icon. |
protected abstract RgbPaperType.RgbPaper |
createPaper(Rectangle bounds)
Creates a paper object for given bounds. |
boolean |
isBitmap()
Returns true. |
void |
placeDecal(Paper paper,
Decal decal)
Simply calls the RgbPaperType.RgbPaper.placeDecal(uk.ac.starlink.ttools.plot2.Decal) method. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected RgbPaperType(String name, boolean upLayer)
name
- paper type nameupLayer
- true to render layers in ascending order,
false to do them in descending orderMethod Detail |
---|
public boolean isBitmap()
isBitmap
in interface PaperType
public void placeDecal(Paper paper, Decal decal)
RgbPaperType.RgbPaper.placeDecal(uk.ac.starlink.ttools.plot2.Decal)
method.
placeDecal
in interface PaperType
paper
- graphics destination, of appropriate type for this objectdecal
- graphic to paintpublic Icon createDataIcon(Surface surface, Drawing[] drawings, Object[] plans, DataStore dataStore, boolean requireCached)
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 objectrequireCached
- hint about whether to cache the calculation data
public String toString()
toString
in class Object
protected abstract RgbPaperType.RgbPaper createPaper(Rectangle bounds)
bounds
- plot bounds
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |