java.lang.Objectcom.realtime.crossfire.jxclient.gui.button.ButtonImages
public class ButtonImages
A set of images to form a button image. The button image consists of a left, a middle, and a right part. Left and right parts have fixed size, the middle part is clipped or repeated to the button's width.
| Field Summary | |
|---|---|
private int |
height
The button height. |
private java.awt.Image |
imageLeft
The left border of the button. |
private java.awt.Image |
imageMiddle
The background of the middle part of the button. |
private java.awt.Image |
imageRight
The right border of the button. |
private static int |
OFFSET
Half the minimum width available for the text. |
| Constructor Summary | |
|---|---|
ButtonImages(java.awt.Image imageLeft,
java.awt.Image imageMiddle,
java.awt.Image imageRight)
Creates a new instance. |
|
| Method Summary | |
|---|---|
int |
getHeight()
Returns the button's height. |
int |
getMinimumWidth()
Returns the minimal possible button's width. |
void |
render(java.awt.Graphics g,
int w)
Draws the button. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int height
@NotNull private final java.awt.Image imageLeft
@NotNull private final java.awt.Image imageMiddle
@NotNull private final java.awt.Image imageRight
private static final int OFFSET
| Constructor Detail |
|---|
public ButtonImages(@NotNull
java.awt.Image imageLeft,
@NotNull
java.awt.Image imageMiddle,
@NotNull
java.awt.Image imageRight)
imageLeft - the left imageimageMiddle - the middle imageimageRight - the right image| Method Detail |
|---|
public int getHeight()
public int getMinimumWidth()
public void render(@NotNull
java.awt.Graphics g,
int w)
g - the graphics to paint intow - the button width