|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.sl.draw.DrawFactory
public class DrawFactory
Field Summary | |
---|---|
protected static java.lang.ThreadLocal<DrawFactory> |
defaultFactory
|
Constructor Summary | |
---|---|
DrawFactory()
|
Method Summary | |
---|---|
void |
drawShape(java.awt.Graphics2D graphics,
Shape<?,?> shape,
java.awt.geom.Rectangle2D bounds)
Convenience method for drawing single shapes. |
void |
fixFonts(java.awt.Graphics2D graphics)
Replace font families for Windows JVM 6, which contains a font rendering error. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.ThreadLocal<DrawFactory> defaultFactory
Constructor Detail |
---|
public DrawFactory()
Method Detail |
---|
public static void setDefaultFactory(DrawFactory factory)
Drawable.DRAW_FACTORY
to set the factory.
factory
- public static DrawFactory getInstance(java.awt.Graphics2D graphics)
graphics
- the current graphics context or null
public Drawable getDrawable(Shape<?,?> shape)
public DrawSlide getDrawable(Slide<?,?> sheet)
public DrawSheet getDrawable(Sheet<?,?> sheet)
public 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 void fixFonts(java.awt.Graphics2D graphics)
graphics
- the graphics context which will contain the font mappingpublic DrawFontManager getFontManager(java.awt.Graphics2D graphics)
graphics
- the graphics context holding potentially a font manager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |