railo.runtime.img.filter
Class BorderFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.BorderFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class BorderFilter
extends AbstractBufferedImageOp
implements DynFiltering

A filter to add a border around an image using the supplied Paint, which may be null for no painting.


Constructor Summary
BorderFilter()
          Construct a BorderFilter which does nothing.
BorderFilter(int leftBorder, int topBorder, int rightBorder, int bottomBorder, Paint borderPaint)
          Construct a BorderFilter.
 
Method Summary
 BufferedImage filter(BufferedImage src, BufferedImage dst)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 Paint getBorderPaint()
          Get the border paint.
 int getBottomBorder()
          Returns the border border value.
 int getLeftBorder()
          Returns the left border value.
 int getRightBorder()
          Returns the right border value.
 int getTopBorder()
          Returns the top border value.
 void setBottom(int bottomBorder)
          Set the border size on the bottom edge.
 void setColor(Color borderColor)
          Set the border color.
 void setLeft(int leftBorder)
          Set the border size on the left edge.
 void setRight(int rightBorder)
          Set the border size on the right edge.
 void setTop(int topBorder)
          Set the border size on the top edge.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BorderFilter

public BorderFilter()
Construct a BorderFilter which does nothing.


BorderFilter

public BorderFilter(int leftBorder,
                    int topBorder,
                    int rightBorder,
                    int bottomBorder,
                    Paint borderPaint)
Construct a BorderFilter.

Parameters:
leftBorder - the left border value
topBorder - the top border value
rightBorder - the right border value
bottomBorder - the bottom border value
borderPaint - the paint with which to fill the border
Method Detail

setLeft

public void setLeft(int leftBorder)
Set the border size on the left edge.

Parameters:
leftBorder - the number of pixels of border to add to the edge
See Also:
getLeftBorder()

getLeftBorder

public int getLeftBorder()
Returns the left border value.

Returns:
the left border value.
See Also:
#setLeftBorder

setRight

public void setRight(int rightBorder)
Set the border size on the right edge.

Parameters:
rightBorder - the number of pixels of border to add to the edge
See Also:
getRightBorder()

getRightBorder

public int getRightBorder()
Returns the right border value.

Returns:
the right border value.
See Also:
#setRightBorder

setTop

public void setTop(int topBorder)
Set the border size on the top edge.

Parameters:
topBorder - the number of pixels of border to add to the edge
See Also:
getTopBorder()

getTopBorder

public int getTopBorder()
Returns the top border value.

Returns:
the top border value.
See Also:
#setTopBorder

setBottom

public void setBottom(int bottomBorder)
Set the border size on the bottom edge.

Parameters:
bottomBorder - the number of pixels of border to add to the edge
See Also:
getBottomBorder()

getBottomBorder

public int getBottomBorder()
Returns the border border value.

Returns:
the border border value.
See Also:
#setBottomBorder

setColor

public void setColor(Color borderColor)
Set the border color.

Parameters:
borderColor - the color with which to fill the border

getBorderPaint

public Paint getBorderPaint()
Get the border paint.

Returns:
the paint with which to fill the border
See Also:
#setBorderPaint

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Specified by:
filter in interface BufferedImageOp

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Throws:
PageException


Copyright © 2012 Railo