|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
net.sf.freecol.client.gui.panel.FreeColImageBorder
public class FreeColImageBorder
A border created from a set of images.
| Field Summary | |
|---|---|
private java.awt.image.BufferedImage |
bottomImage
|
private java.awt.image.BufferedImage |
bottomLeftCornerImage
|
private java.awt.image.BufferedImage |
bottomRightCornerImage
|
static FreeColImageBorder |
imageBorder
|
private java.awt.image.BufferedImage |
leftImage
|
private java.awt.image.BufferedImage |
rightImage
|
private java.awt.image.BufferedImage |
topImage
|
private java.awt.image.BufferedImage |
topLeftCornerImage
|
private java.awt.image.BufferedImage |
topRightCornerImage
|
| Constructor Summary | |
|---|---|
FreeColImageBorder(java.awt.Image topImage,
java.awt.Image leftImage,
java.awt.Image bottomImage,
java.awt.Image rightImage,
java.awt.Image topLeftCornerImage,
java.awt.Image topRightCornerImage,
java.awt.Image bottomLeftCornerImage,
java.awt.Image bottomRightCornerImage)
Creates a border with the given set of images. Converts the Image objects to BufferedImage, because the images will
be used as Textures for the border. |
|
| Method Summary | |
|---|---|
private java.awt.image.BufferedImage |
createBufferedImage(java.awt.Image img)
Creates a buffered image out of a given Image object. |
void |
fillTexture(java.awt.Graphics2D g2,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height)
Fills a certain rectangle with the image texture. |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Gets the insets of this border around the given component. |
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
Gets the insets of this border around the given component. |
private int |
getHeight(java.awt.Image im)
Get the height of an image. |
private int |
getWidth(java.awt.Image im)
Get the width of an image. |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the border on the given component. |
| Methods inherited from class javax.swing.border.AbstractBorder |
|---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle, isBorderOpaque |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.awt.image.BufferedImage topImage
private java.awt.image.BufferedImage leftImage
private java.awt.image.BufferedImage bottomImage
private java.awt.image.BufferedImage rightImage
private java.awt.image.BufferedImage topLeftCornerImage
private java.awt.image.BufferedImage topRightCornerImage
private java.awt.image.BufferedImage bottomLeftCornerImage
private java.awt.image.BufferedImage bottomRightCornerImage
public static final FreeColImageBorder imageBorder
| Constructor Detail |
|---|
public FreeColImageBorder(java.awt.Image topImage,
java.awt.Image leftImage,
java.awt.Image bottomImage,
java.awt.Image rightImage,
java.awt.Image topLeftCornerImage,
java.awt.Image topRightCornerImage,
java.awt.Image bottomLeftCornerImage,
java.awt.Image bottomRightCornerImage)
Image objects to BufferedImage, because the images will
be used as Textures for the border.
| Method Detail |
|---|
private java.awt.image.BufferedImage createBufferedImage(java.awt.Image img)
Image object.
img - The Image object.
BufferedImage object.public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets in interface javax.swing.border.BordergetBorderInsets in class javax.swing.border.AbstractBorderc - The Component having the border.
Insets.
public java.awt.Insets getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
getBorderInsets in class javax.swing.border.AbstractBorderc - The Component having the border.insets - An instance of Insets to be updated.
Insets if not
null, or a new instance otherwise.private int getHeight(java.awt.Image im)
im - The image.
private int getWidth(java.awt.Image im)
im - The image.
public void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
paintBorder in interface javax.swing.border.BorderpaintBorder in class javax.swing.border.AbstractBorderc - The Component to draw the border on.g - The Graphics used for painting the border.x - The x-component of the offset.y - The y-component of the offset.width - The width of the border.height - The height of the border.
public void fillTexture(java.awt.Graphics2D g2,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height)
g2 - The Graphics used for painting the border.img - The BufferedImage to fill the texture.x - The x-component of the offset.y - The y-component of the offset.width - The width of the rectangle.height - The height of the rectangle.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||