Crossfire JXClient, Trunk
|
Public Member Functions | |
void | draw (@NotNull final Graphics g) |
GaugeState (@Nullable final Image fullImage, @Nullable final Image lowImage, @Nullable final Image negativeImage, final int dx, final int dy) | |
Dimension | getPreferredSize () |
void | setDy (final int dy) |
boolean | setValues (@NotNull final Orientation orientation) |
Private Attributes | |
final int | dx |
int | dy |
int | filledH |
Image | filledPicture |
int | filledW |
int | filledX |
int | filledY |
final Image | fullImage |
final Image | lowImage |
final Image | negativeImage |
final Dimension | preferredSize |
The state of a gauge.
Definition at line 35 of file GaugeState.java.
com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState | ( | @Nullable final Image | fullImage, |
@Nullable final Image | lowImage, | ||
@Nullable final Image | negativeImage, | ||
final int | dx, | ||
final int | dy | ||
) |
Creates a new instance.
fullImage | the image representing a full gauge |
lowImage | the image representing a low gaueg (<30%) |
negativeImage | the image representing a more-than-empty gauge; if set to null
|
dx | the x-offset for drawing |
dy | the y-offset for drawing |
Definition at line 106 of file GaugeState.java.
References com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dx, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dy, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.fullImage, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.lowImage, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.negativeImage, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.preferredSize.
void com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw | ( | @NotNull final Graphics | g | ) |
Draws the gauge image into the given graphics context.
g | the graphics context |
Definition at line 162 of file GaugeState.java.
References com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dx, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dy, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledH, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledPicture, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledW, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledX, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledY.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent(), and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.paintComponent().
Dimension com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize | ( | ) |
Returns the preferred size.
Definition at line 173 of file GaugeState.java.
References com.realtime.crossfire.jxclient.gui.gauge.GaugeState.preferredSize.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getGaugeStateSize(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMaximumSize(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getPreferredSize().
void com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setDy | ( | final int | dy | ) |
Sets the y-offset for drawing.
dy | the y-offset for drawing |
Definition at line 121 of file GaugeState.java.
References com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dy.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.setBounds().
boolean com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues | ( | @NotNull final Orientation | orientation | ) |
Updates the values from a Orientation state.
orientation | the state |
Definition at line 130 of file GaugeState.java.
References com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledH, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledPicture, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledW, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledX, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledY, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.fullImage, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.lowImage, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.negativeImage.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.GUIDupGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setBounds(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setValues(), and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.setValues().
|
private |
The x-offset for drawing.
Definition at line 64 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState().
|
private |
The y-offset for drawing.
Definition at line 69 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setDy().
|
private |
The height of the "filled" area.
Definition at line 79 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The image for painting the "filled" area.
Definition at line 95 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The width of the "filled" area.
Definition at line 74 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The x-coordinate of the "filled" area.
Definition at line 84 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The y-coordinate of the "filled" area.
Definition at line 89 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The image representing a full gauge.
Definition at line 41 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The image representing a low gauge (<30%).
Definition at line 47 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The image representing a more-than-empty gauge.
Definition at line 53 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
|
private |
The preferred size of this component.
Definition at line 59 of file GaugeState.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GaugeState.GaugeState(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize().