NextApp Echo2
v2.1.0

nextapp.echo2.app
Class FillImageBorder

java.lang.Object
  extended by nextapp.echo2.app.FillImageBorder
All Implemented Interfaces:
java.io.Serializable

public class FillImageBorder
extends java.lang.Object
implements java.io.Serializable

A representation of a graphical border drawn using a series of eight FillImages. The eight images are used to describe the four corners and four sides of the border. The BorderInsets property is used to describe the width and height of the border images, i.e. the inset to which the border images extend inward from the outer edges of the box. The ContentInsets property is used to describe the inset of the content displayed within the border. If the content inset is less than the border inset, the content will be drawn above the border. The Color property may be used in addition to or in lieu of setting FillImages. The color will be drawn behind the FillImages in the case where both are used.

See Also:
Serialized Form

Field Summary
static int BOTTOM
           
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
static int LEFT
           
static int RIGHT
           
static int TOP
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
 
Constructor Summary
FillImageBorder()
          Creates a new FillImageBorder.
FillImageBorder(Color color, Insets borderInsets, Insets contentInsets)
          Creates a new FillImageBorder with the specified color, border inset, and content inset.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Insets getBorderInsets()
          Returns the content inset.
 Color getColor()
          Returns the solid color background of the border.
 Insets getContentInsets()
          Sets the content inset.
 FillImage getFillImage(int position)
          Retrieves the FillImage at the specified position.
 void setBorderInsets(Insets borderInsets)
          Sets the inset of the border images, thus defining the width and height of the border images.
 void setColor(Color color)
          Sets the solid color background of the border.
 void setContentInsets(Insets contentInsets)
          Sets the inset of the content that is contained within the border relative to the outside of the border.
 void setFillImage(int position, FillImage fillImage)
          Sets the FillImage at the specified position.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
See Also:
Constant Field Values
Constructor Detail

FillImageBorder

public FillImageBorder()
Creates a new FillImageBorder.


FillImageBorder

public FillImageBorder(Color color,
                       Insets borderInsets,
                       Insets contentInsets)
Creates a new FillImageBorder with the specified color, border inset, and content inset.

Parameters:
color - the solid color background of the border
borderInsets - the border inset
contentInsets - the content inset
See Also:
setBorderInsets(nextapp.echo2.app.Insets), setContentInsets(nextapp.echo2.app.Insets), setColor(nextapp.echo2.app.Color)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getBorderInsets

public Insets getBorderInsets()
Returns the content inset.

Returns:
the border inset
See Also:
setBorderInsets(nextapp.echo2.app.Insets)

getColor

public Color getColor()
Returns the solid color background of the border.

Returns:
the color
See Also:
setColor(nextapp.echo2.app.Color)

getContentInsets

public Insets getContentInsets()
Sets the content inset.

Returns:
the content inset
See Also:
setContentInsets(nextapp.echo2.app.Insets)

getFillImage

public FillImage getFillImage(int position)
Retrieves the FillImage at the specified position.

Parameters:
position - the position, one of the following values:
  • TOP_LEFT the top left corner image
  • TOP the top side image
  • TOP_RIGHT the top right corner image
  • LEFT the left side image
  • RIGHT the right side image
  • BOTTOM_LFET the bottom left corner image
  • BOTTOM the bottom side image
  • BOTTOM_RIGHT the bottom right corner image
Returns:
the FillImage

setBorderInsets

public void setBorderInsets(Insets borderInsets)
Sets the inset of the border images, thus defining the width and height of the border images. The provided Insets value must only contain margins defined in pixel units.

Parameters:
borderInsets - the new border inset

setColor

public void setColor(Color color)
Sets the solid color background of the border. Note that setting a solid background color for the border will cause the alpha channel of any FillImages to be rendered against this color.

Parameters:
color - the color

setContentInsets

public void setContentInsets(Insets contentInsets)
Sets the inset of the content that is contained within the border relative to the outside of the border. If this inset value is smaller than the the border inset, the content will be rendered partially on top of the border. A null value for this property specifies that the content should be drawn at the border inset. The provided Insets value must only contain margins defined in pixel units.

Parameters:
contentInsets - the new content inset

setFillImage

public void setFillImage(int position,
                         FillImage fillImage)
Sets the FillImage at the specified position.

Parameters:
position - the position, one of the following values:
  • TOP_LEFT the top left corner image
  • TOP the top side image
  • TOP_RIGHT the top right corner image
  • LEFT the left side image
  • RIGHT the right side image
  • BOTTOM_LFET the bottom left corner image
  • BOTTOM the bottom side image
  • BOTTOM_RIGHT the bottom right corner image
fillImage - the new FillIamge

NextApp Echo2
v2.1.0