|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.gui.plaf.BevelRenderer
public class BevelRenderer
Takes an image and insets. The image must show a bevel and a fill area. The insets and the size of the image are used do determine which parts of the image shall be used to draw the corners and edges of the bevel as well the fill area.
For example, if you provide an image of size 10,10 and a insets of size 2, 2, 4, 4, then the corners of the border are made up of top left: 2,2, top right: 2,4, bottom left: 2,4, bottom right: 4,4 rectangle of the image. The inner area of the image is used to fill the inner area.
| Constructor Summary | |
|---|---|
BevelRenderer()
Creates a new BevelRenderer without an image and without zero insets. |
|
BevelRenderer(java.awt.Image img,
java.awt.Insets insets)
Creates a new BevelRenderer without the given image and insets. |
|
| Method Summary | |
|---|---|
java.awt.Image |
getImage()
Gets the image to be used for border painting. |
int |
getImageHeight()
|
java.awt.Insets |
getImageInsets()
Gets the insets of the image. |
int |
getImageWidth()
|
void |
paintBevel(java.awt.Component c,
java.awt.Graphics gr,
int x,
int y,
int width,
int height)
Paints the bevel image for the specified component with the specified position and size. |
void |
setImage(java.awt.Image img)
Sets the image to be used for border painting. |
void |
setImageInsets(java.awt.Insets insets)
Sets the insets of the image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BevelRenderer()
public BevelRenderer(java.awt.Image img,
java.awt.Insets insets)
| Method Detail |
|---|
public void setImage(java.awt.Image img)
public java.awt.Image getImage()
public int getImageHeight()
public int getImageWidth()
public void setImageInsets(java.awt.Insets insets)
public java.awt.Insets getImageInsets()
public void paintBevel(java.awt.Component c,
java.awt.Graphics gr,
int x,
int y,
int width,
int height)
c - the component for which this border is being paintedgr - the paint graphicsx - the x position of the painted bordery - the y position of the painted borderwidth - the width of the painted borderheight - the height of the painted border
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||