public class DrawFactory
extends java.lang.Object
Constructor and Description |
---|
DrawFactory() |
Modifier and Type | Method and Description |
---|---|
void |
drawShape(java.awt.Graphics2D graphics,
Shape<?,?> shape,
java.awt.geom.Rectangle2D bounds)
Convenience method for drawing single shapes.
|
DrawBackground |
getDrawable(Background<?,?> shape) |
DrawConnectorShape |
getDrawable(ConnectorShape<?,?> shape) |
DrawFreeformShape |
getDrawable(FreeformShape<?,?> shape) |
DrawGraphicalFrame |
getDrawable(GraphicalFrame<?,?> shape) |
DrawGroupShape |
getDrawable(GroupShape<?,?> shape) |
DrawMasterSheet |
getDrawable(MasterSheet<?,?> sheet) |
DrawPictureShape |
getDrawable(PictureShape<?,?> shape) |
Drawable |
getDrawable(Shape<?,?> shape) |
DrawSheet |
getDrawable(Sheet<?,?> sheet) |
DrawSlide |
getDrawable(Slide<?,?> sheet) |
DrawTableShape |
getDrawable(TableShape<?,?> shape) |
DrawTextBox |
getDrawable(TextBox<?,?> shape) |
DrawTextParagraph |
getDrawable(TextParagraph<?,?,?> paragraph) |
DrawTextShape |
getDrawable(TextShape<?,?> shape) |
DrawFontManager |
getFontManager(java.awt.Graphics2D graphics)
Return a FontManager, either registered beforehand or a default implementation
|
static DrawFactory |
getInstance(java.awt.Graphics2D graphics)
Returns the DrawFactory, preferably via a graphics instance.
|
DrawPaint |
getPaint(PlaceableShape<?,?> shape) |
DrawTextFragment |
getTextFragment(java.awt.font.TextLayout layout,
java.text.AttributedString str) |
static void |
setDefaultFactory(DrawFactory factory)
Set a custom draw factory for the current thread.
|
public static void setDefaultFactory(DrawFactory factory)
Drawable.DRAW_FACTORY
to set the factory.factory
- the custom factory or null
to reset/remove the default factorypublic static DrawFactory getInstance(java.awt.Graphics2D graphics)
graphics
- the current graphics context or nullpublic DrawMasterSheet getDrawable(MasterSheet<?,?> sheet)
public DrawTextBox getDrawable(TextBox<?,?> shape)
public DrawFreeformShape getDrawable(FreeformShape<?,?> shape)
public DrawConnectorShape getDrawable(ConnectorShape<?,?> shape)
public DrawTableShape getDrawable(TableShape<?,?> shape)
public DrawTextShape getDrawable(TextShape<?,?> shape)
public DrawGroupShape getDrawable(GroupShape<?,?> shape)
public DrawPictureShape getDrawable(PictureShape<?,?> shape)
public DrawGraphicalFrame getDrawable(GraphicalFrame<?,?> shape)
public DrawTextParagraph getDrawable(TextParagraph<?,?,?> paragraph)
public DrawBackground getDrawable(Background<?,?> shape)
public DrawTextFragment getTextFragment(java.awt.font.TextLayout layout, java.text.AttributedString str)
public DrawPaint getPaint(PlaceableShape<?,?> shape)
public void drawShape(java.awt.Graphics2D graphics, Shape<?,?> shape, java.awt.geom.Rectangle2D bounds)
Sheet.draw(Graphics2D)
graphics
- the graphics context to draw toshape
- the shapebounds
- the bounds within the graphics context to draw topublic DrawFontManager getFontManager(java.awt.Graphics2D graphics)
graphics
- the graphics context holding potentially a font managerCopyright 2020 The Apache Software Foundation or its licensors, as applicable.