|
||||||||||
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 | |
---|---|
static FreeColImageBorder |
imageBorder
|
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 | |
---|---|
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. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 |
---|
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
getBorderInsets
in class javax.swing.border.AbstractBorder
c
- 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.AbstractBorder
c
- The Component
having the border.insets
- An instance of Insets
to be updated.
Insets
if not
null
, or a new instance otherwise.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.Border
paintBorder
in class javax.swing.border.AbstractBorder
c
- 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 |