java.lang.Objectcom.realtime.crossfire.jxclient.gui.gauge.GaugeState
public class GaugeState
The state of a gauge.
| Field Summary | |
|---|---|
private  int | 
dx
The x-offset for drawing.  | 
private  int | 
dy
The y-offset for drawing.  | 
private  int | 
filledH
The height of the "filled" area.  | 
private  java.awt.Image | 
filledPicture
The image for painting the "filled" area.  | 
private  int | 
filledW
The width of the "filled" area.  | 
private  int | 
filledX
The x-coordinate of the "filled" area.  | 
private  int | 
filledY
The y-coordinate of the "filled" area.  | 
private  java.awt.image.BufferedImage | 
fullImage
The image representing a full gauge.  | 
private  java.awt.image.BufferedImage | 
negativeImage
The image representing a more-than-empty gauge.  | 
| Constructor Summary | |
|---|---|
GaugeState(java.awt.image.BufferedImage fullImage,
           java.awt.image.BufferedImage negativeImage,
           int dx,
           int dy)
Creates a new instance.  | 
|
| Method Summary | |
|---|---|
 void | 
draw(java.awt.Graphics g)
Draws the gauge image into the given graphics context.  | 
 boolean | 
setValues(Orientation orientation)
Updates the values from a Orientation state. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private final int dx
private final int dy
private int filledH
@Nullable private java.awt.Image filledPicture
private int filledW
private int filledX
private int filledY
@Nullable private final java.awt.image.BufferedImage fullImage
@Nullable private final java.awt.image.BufferedImage negativeImage
| Constructor Detail | 
|---|
public GaugeState(@Nullable
                  java.awt.image.BufferedImage fullImage,
                  @Nullable
                  java.awt.image.BufferedImage negativeImage,
                  int dx,
                  int dy)
fullImage - the image representing a full gaugenegativeImage - the image representing a more-than-empty gauge; if
 set to null the gauge remains in empty statedx - the x-offset for drawingdy - the y-offset for drawing| Method Detail | 
|---|
public void draw(@NotNull
                 java.awt.Graphics g)
g - the graphics context
public boolean setValues(@NotNull
                         Orientation orientation)
Orientation state.
orientation - the state