Interface PaperType
-
- All Known Subinterfaces:
GlyphPaper.GlyphPaperType,PaperType2D,PaperType3D
- All Known Implementing Classes:
CompositePaperType2D,MonoPaperType,OverPaperType2D,PaintPaperType,PaintPaperType2D,PixelStackPaperType3D,RgbPaperType,RgbPaperType2D,RgbPaperType3D,SortedPaperType3D,ZBufferPaperType3D
public interface PaperTypeAbstracts the graphic substrate that datasets can be plotted on. Painting operations are performed on a suppliedPaperobject that must be of the type appropriate to this PaperType. Geometry-specific sub-interfaces provide more specific painting operations.- Since:
- 14 Feb 2013
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.IconcreateDataIcon(Surface surface, Drawing[] drawings, java.lang.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.booleanisBitmap()Indicates whether this represents a bitmap or vector type of graphics context.voidplaceDecal(Paper paper, Decal decal)Paints a Decal onto a given paper object.
-
-
-
Method Detail
-
isBitmap
boolean isBitmap()
Indicates whether this represents a bitmap or vector type of graphics context.- Returns:
- true for pixellated surface, false for vector
-
createDataIcon
@Slow javax.swing.Icon createDataIcon(Surface surface, Drawing[] drawings, java.lang.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.The
requireCachedargument 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
paintIconmethod of the returned object with a nullComponent. The returned icon is the size of theplotBoundsrectangle, 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
drawingsso that the returned icon can be based on the drawn-on paper.- Parameters:
surface- plot surfacedrawings- array of drawing objects to be painted in sequenceplans- array of plan objects corresponding to thedrawingsarray argumentdataStore- data storage objectrequireCached- hint about whether to cache the calculation data- Returns:
- plotBounds-sized icon
-
-