Top Inners
org.apache.poi.sl.usermodel

public Interface PaintStyle

Known Direct Subinterfaces
org.apache.poi.sl.usermodel.PaintStyle.SolidPaint, org.apache.poi.sl.usermodel.PaintStyle.GradientPaint, org.apache.poi.sl.usermodel.PaintStyle.TexturePaint
Imports
java.awt.geom.Dimension2D, .Point2D, java.io.InputStream, java.util.List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
public static interface
public static enum
PaintStyle.PaintModifier

The PaintStyle can be modified by secondary sources, e.g. the attributes in the preset shapes.

public static interface
public static enum
public static interface
org.apache.poi.sl.usermodel back to summary

public final Enum PaintStyle.FlipMode

extends Enum<PaintStyle.FlipMode>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final PaintStyle.FlipMode
NONE

not flipped/mirrored

public static final PaintStyle.FlipMode
X

flipped/mirrored/duplicated along the x axis

public static final PaintStyle.FlipMode
XY

flipped/mirrored/duplicated along the x and y axis

public static final PaintStyle.FlipMode
Y

flipped/mirrored/duplicated along the y axis

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PaintStyle.FlipMode
public static PaintStyle.FlipMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NONEback to summary
public static final PaintStyle.FlipMode NONE

not flipped/mirrored

Xback to summary
public static final PaintStyle.FlipMode X

flipped/mirrored/duplicated along the x axis

XYback to summary
public static final PaintStyle.FlipMode XY

flipped/mirrored/duplicated along the x and y axis

Yback to summary
public static final PaintStyle.FlipMode Y

flipped/mirrored/duplicated along the y axis

Constructor Detail

FlipModeback to summary
private FlipMode()

Method Detail

valueOfback to summary
public static PaintStyle.FlipMode valueOf(String name)
valuesback to summary
public static PaintStyle.FlipMode[] values()
org.apache.poi.sl.usermodel back to summary

public Interface PaintStyle.GradientPaint

extends PaintStyle

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public default Insets2D
public double

Returns:

the angle of the gradient
getGradientAngle
()

public ColorStyle[]
public float[]
public PaintStyle.GradientPaint.GradientType
public boolean

Method Detail

getFillToInsetsback to summary
public default Insets2D getFillToInsets()
getGradientAngleback to summary
public double getGradientAngle()
Returns:double

the angle of the gradient

getGradientColorsback to summary
public ColorStyle[] getGradientColors()
getGradientFractionsback to summary
public float[] getGradientFractions()
getGradientTypeback to summary
public PaintStyle.GradientPaint.GradientType getGradientType()
isRotatedWithShapeback to summary
public boolean isRotatedWithShape()
org.apache.poi.sl.usermodel back to summary

public final Enum PaintStyle.GradientPaint.GradientType

extends Enum<PaintStyle.GradientPaint.GradientType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final PaintStyle.GradientPaint.GradientType
public static final PaintStyle.GradientPaint.GradientType
public static final PaintStyle.GradientPaint.GradientType
public static final PaintStyle.GradientPaint.GradientType

Constructor Summary

AccessConstructor and Description
private

Field Detail

circularback to summary
public static final PaintStyle.GradientPaint.GradientType circular
linearback to summary
public static final PaintStyle.GradientPaint.GradientType linear
rectangularback to summary
public static final PaintStyle.GradientPaint.GradientType rectangular
shapeback to summary
public static final PaintStyle.GradientPaint.GradientType shape

Constructor Detail

GradientTypeback to summary
private GradientType()

Method Detail

valueOfback to summary
public static PaintStyle.GradientPaint.GradientType valueOf(String name)
valuesback to summary
public static PaintStyle.GradientPaint.GradientType[] values()
org.apache.poi.sl.usermodel back to summary

public final Enum PaintStyle.PaintModifier

extends Enum<PaintStyle.PaintModifier>
Class Inheritance

The PaintStyle can be modified by secondary sources, e.g. the attributes in the preset shapes. These modifications need to be taken into account when the final color is determined.

Field Summary

Modifier and TypeField and Description
public static final PaintStyle.PaintModifier
DARKEN

darken the paint/filling

public static final PaintStyle.PaintModifier
DARKEN_LESS

darken (...

public static final PaintStyle.PaintModifier
LIGHTEN

lighten the paint/filling

public static final PaintStyle.PaintModifier
LIGHTEN_LESS

lighten (...

public static final PaintStyle.PaintModifier
NONE

don't use any paint/fill

public static final PaintStyle.PaintModifier
NORM

use the paint/filling as-is

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PaintStyle.PaintModifier
public static PaintStyle.PaintModifier[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DARKENback to summary
public static final PaintStyle.PaintModifier DARKEN

darken the paint/filling

DARKEN_LESSback to summary
public static final PaintStyle.PaintModifier DARKEN_LESS

darken (... a bit less) the paint/filling

LIGHTENback to summary
public static final PaintStyle.PaintModifier LIGHTEN

lighten the paint/filling

LIGHTEN_LESSback to summary
public static final PaintStyle.PaintModifier LIGHTEN_LESS

lighten (... a bit less) the paint/filling

NONEback to summary
public static final PaintStyle.PaintModifier NONE

don't use any paint/fill

NORMback to summary
public static final PaintStyle.PaintModifier NORM

use the paint/filling as-is

Constructor Detail

PaintModifierback to summary
private PaintModifier()

Method Detail

valueOfback to summary
public static PaintStyle.PaintModifier valueOf(String name)
valuesback to summary
public static PaintStyle.PaintModifier[] values()
org.apache.poi.sl.usermodel back to summary

public Interface PaintStyle.SolidPaint

extends PaintStyle
Known Direct Implementers
org.apache.poi.sl.draw.DrawPaint.SimpleSolidPaint

Method Summary

Modifier and TypeMethod and Description
public ColorStyle

Method Detail

getSolidColorback to summary
public ColorStyle getSolidColor()
org.apache.poi.sl.usermodel back to summary

public final Enum PaintStyle.TextureAlignment

extends Enum<PaintStyle.TextureAlignment>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
private final String
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment
public static final PaintStyle.TextureAlignment

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PaintStyle.TextureAlignment
public static PaintStyle.TextureAlignment
public static PaintStyle.TextureAlignment[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BOTTOMback to summary
public static final PaintStyle.TextureAlignment BOTTOM
BOTTOM_LEFTback to summary
public static final PaintStyle.TextureAlignment BOTTOM_LEFT
BOTTOM_RIGHTback to summary
public static final PaintStyle.TextureAlignment BOTTOM_RIGHT
CENTERback to summary
public static final PaintStyle.TextureAlignment CENTER
LEFTback to summary
public static final PaintStyle.TextureAlignment LEFT
ooxmlIdback to summary
private final String ooxmlId
RIGHTback to summary
public static final PaintStyle.TextureAlignment RIGHT
TOPback to summary
public static final PaintStyle.TextureAlignment TOP
TOP_LEFTback to summary
public static final PaintStyle.TextureAlignment TOP_LEFT
TOP_RIGHTback to summary
public static final PaintStyle.TextureAlignment TOP_RIGHT

Constructor Detail

TextureAlignmentback to summary
private TextureAlignment(String ooxmlId)

Method Detail

fromOoxmlIdback to summary
public static PaintStyle.TextureAlignment fromOoxmlId(String ooxmlId)
valueOfback to summary
public static PaintStyle.TextureAlignment valueOf(String name)
valuesback to summary
public static PaintStyle.TextureAlignment[] values()
org.apache.poi.sl.usermodel back to summary

public Interface PaintStyle.TexturePaint

extends PaintStyle

Method Summary

Modifier and TypeMethod and Description
public default PaintStyle.TextureAlignment
public int

Returns:

the alpha mask in percents [0..100000]
getAlpha
()

public String

Returns:

the content type of the image data
getContentType
()

public default List<ColorStyle>
getDuoTone()

For pattern images, the duo tone defines the black/white pixel color replacement

public default PaintStyle.FlipMode

Returns:

the flip/mirroring/duplication mode
getFlipMode
()

public InputStream

Returns:

the raw image stream
getImageData
()

public default Insets2D

Returns:

the cropping insets of the source image
getInsets
()

Specifies the portion of the blip or image that is used for the fill.

public default Point2D

Returns:

the offset of the tiles in points or null if there's no offset
getOffset
()

public default Dimension2D

Returns:

the dimensions of the tiles in percent of the shape dimensions or null if no scaling is applied
getScale
()

public Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

Returns:

the shape this texture paint is applied to
getShape
()

public default Insets2D

Returns:

the stretching in the destination image
getStretch
()

The stretch specifies the edges of a fill rectangle.

public default boolean

Returns:

true, if the rotation of the shape is also applied to the texture paint
isRotatedWithShape
()

Method Detail

getAlignmentback to summary
public default PaintStyle.TextureAlignment getAlignment()
getAlphaback to summary
public int getAlpha()
Returns:int

the alpha mask in percents [0..100000]

getContentTypeback to summary
public String getContentType()
Returns:String

the content type of the image data

getDuoToneback to summary
public default List<ColorStyle> getDuoTone()

For pattern images, the duo tone defines the black/white pixel color replacement

getFlipModeback to summary
public default PaintStyle.FlipMode getFlipMode()
Returns:PaintStyle.FlipMode

the flip/mirroring/duplication mode

getImageDataback to summary
public InputStream getImageData()
Returns:InputStream

the raw image stream

getInsetsback to summary
public default Insets2D getInsets()

Specifies the portion of the blip or image that is used for the fill.

Each edge of the image is defined by a percentage offset from the edge of the bounding box. A positive percentage specifies an inset and a negative percentage specifies an outset.

The percentage are ints based on 100000, so 100% = 100000.

So, for example, a left offset of 25% specifies that the left edge of the image is located to the right of the bounding box's left edge by 25% of the bounding box's width.

Returns:Insets2D

the cropping insets of the source image

getOffsetback to summary
public default Point2D getOffset()
Returns:Point2D

the offset of the tiles in points or null if there's no offset

getScaleback to summary
public default Dimension2D getScale()
Returns:Dimension2D

the dimensions of the tiles in percent of the shape dimensions or null if no scaling is applied

getShapeback to summary
public Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>> getShape()
Returns:Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

the shape this texture paint is applied to

getStretchback to summary
public default Insets2D getStretch()

The stretch specifies the edges of a fill rectangle.

Each edge of the fill rectangle is defined by a percentage offset from the corresponding edge of the picture's bounding box. A positive percentage specifies an inset and a negative percentage specifies an outset.

The percentage are ints based on 100000, so 100% = 100000.

Returns:Insets2D

the stretching in the destination image

isRotatedWithShapeback to summary
public default boolean isRotatedWithShape()
Returns:boolean

true, if the rotation of the shape is also applied to the texture paint