Class PaintPaperType
- All Implemented Interfaces:
PaperType
- Direct Known Subclasses:
PaintPaperType2D, SortedPaperType3D
- Since:
- 14 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPaintPaperType(String name, boolean upLayer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateDataIcon(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 GraphicsConfigurationcreateHeadlessGraphicsConfig(int imtype) Returns a graphics configuration that does not rely on a display.protected abstract PapercreatePaper(Graphics g, Rectangle bounds) Creates a paper instance for use with this PaperType.protected abstract voidflushPaper(Paper paper) Called when all the layers have been painted.booleanisBitmap()Returns false.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PaperType
placeDecal
-
Constructor Details
-
PaintPaperType
Constructor.- Parameters:
name- paper type nameupLayer- true to render layers in ascending order, false to do them in descending order
-
-
Method Details
-
isBitmap
-
createDataIcon
public Icon createDataIcon(Surface surface, Drawing[] drawings, Object[] plans, DataStore dataStore, boolean cached) Description copied from interface:PaperTypePaints 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.- Specified by:
createDataIconin interfacePaperType- Parameters:
surface- plot surfacedrawings- array of drawing objects to be painted in sequenceplans- array of plan objects corresponding to thedrawingsarray argumentdataStore- data storage objectcached- hint about whether to cache the calculation data- Returns:
- plotBounds-sized icon
-
createPaper
-
flushPaper
Called when all the layers have been painted.- Parameters:
paper- graphics destination
-
toString
-
createHeadlessGraphicsConfig
Returns a graphics configuration that does not rely on a display.- Parameters:
imtype- image type as used byBufferedImage- Returns:
- graphics config
-