org.apache.poi.hslf.model
Class Fill

java.lang.Object
  extended by org.apache.poi.hslf.model.Fill

public final class Fill
extends java.lang.Object

Represents functionality provided by the 'Fill Effects' dialog in PowerPoint.

Author:
Yegor Kozlov

Field Summary
static int FILL_BACKGROUND
          Use the background fill color/pattern
static int FILL_PATTERN
          Fill with a pattern (bitmap)
static int FILL_PICTURE
          Center a picture in the shape
static int FILL_SHADE
          Shade from start to end points
static int FILL_SHADE_CENTER
          Shade from bounding rectangle to end point
static int FILL_SHADE_SCALE
          Similar to FILL_SHADE, but the fill angle is additionally scaled by the aspect ratio of the shape.
static int FILL_SHADE_SHAPE
          Shade from shape outline to end point
static int FILL_SHADE_TITLE
          shade to title
static int FILL_SOLID
          Fill with a solid color
static int FILL_TEXTURE
          A texture (pattern with its own color map)
protected  POILogger logger
           
protected  Shape shape
          The shape this background applies to
 
Constructor Summary
Fill(Shape shape)
          Construct a Fill object for a shape.
 
Method Summary
protected  void afterInsert(Sheet sh)
           
 java.awt.Color getBackgroundColor()
          Background color
protected  EscherBSERecord getEscherBSERecord(int idx)
           
 int getFillType()
          Returns fill type.
 java.awt.Color getForegroundColor()
          Foreground color
 PictureData getPictureData()
          PictureData object used in a texture, pattern of picture fill.
 void setBackgroundColor(java.awt.Color color)
          Background color
 void setFillType(int type)
          Sets fill type.
 void setForegroundColor(java.awt.Color color)
          Foreground color
 void setPictureData(int idx)
          Assign picture used to fill the underlying shape.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected POILogger logger

FILL_SOLID

public static final int FILL_SOLID
Fill with a solid color

See Also:
Constant Field Values

FILL_PATTERN

public static final int FILL_PATTERN
Fill with a pattern (bitmap)

See Also:
Constant Field Values

FILL_TEXTURE

public static final int FILL_TEXTURE
A texture (pattern with its own color map)

See Also:
Constant Field Values

FILL_PICTURE

public static final int FILL_PICTURE
Center a picture in the shape

See Also:
Constant Field Values

FILL_SHADE

public static final int FILL_SHADE
Shade from start to end points

See Also:
Constant Field Values

FILL_SHADE_CENTER

public static final int FILL_SHADE_CENTER
Shade from bounding rectangle to end point

See Also:
Constant Field Values

FILL_SHADE_SHAPE

public static final int FILL_SHADE_SHAPE
Shade from shape outline to end point

See Also:
Constant Field Values

FILL_SHADE_SCALE

public static final int FILL_SHADE_SCALE
Similar to FILL_SHADE, but the fill angle is additionally scaled by the aspect ratio of the shape. If shape is square, it is the same as FILL_SHADE

See Also:
Constant Field Values

FILL_SHADE_TITLE

public static final int FILL_SHADE_TITLE
shade to title

See Also:
Constant Field Values

FILL_BACKGROUND

public static final int FILL_BACKGROUND
Use the background fill color/pattern

See Also:
Constant Field Values

shape

protected Shape shape
The shape this background applies to

Constructor Detail

Fill

public Fill(Shape shape)
Construct a Fill object for a shape. Fill information will be read from shape's escher properties.

Parameters:
shape - the shape this background applies to
Method Detail

getFillType

public int getFillType()
Returns fill type. Must be one of the FILL_* constants defined in this class.

Returns:
type of fill

afterInsert

protected void afterInsert(Sheet sh)

getEscherBSERecord

protected EscherBSERecord getEscherBSERecord(int idx)

setFillType

public void setFillType(int type)
Sets fill type. Must be one of the FILL_* constants defined in this class.

Parameters:
type - type of the fill

getForegroundColor

public java.awt.Color getForegroundColor()
Foreground color


setForegroundColor

public void setForegroundColor(java.awt.Color color)
Foreground color


getBackgroundColor

public java.awt.Color getBackgroundColor()
Background color


setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Background color


getPictureData

public PictureData getPictureData()
PictureData object used in a texture, pattern of picture fill.


setPictureData

public void setPictureData(int idx)
Assign picture used to fill the underlying shape.

Parameters:
idx - 0-based index of the picture added to this ppt by SlideShow.addPicture method.


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.