Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.gauge.GaugeState Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.gui.gauge.GaugeState:
Collaboration graph

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
 

Detailed Description

The state of a gauge.

Author
Andreas Kirschbaum

Definition at line 35 of file GaugeState.java.

Constructor & Destructor Documentation

◆ GaugeState()

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.

Parameters
fullImagethe image representing a full gauge
lowImagethe image representing a low gaueg (<30%)
negativeImagethe image representing a more-than-empty gauge; if set to
null
the gauge remains in empty state
dxthe x-offset for drawing
dythe 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.

Member Function Documentation

◆ draw()

void com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw ( @NotNull final Graphics  g)

◆ getPreferredSize()

Dimension com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize ( )

◆ setDy()

void com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setDy ( final int  dy)

Sets the y-offset for drawing.

Parameters
dythe 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().

Here is the caller graph for this function:

◆ setValues()

boolean com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues ( @NotNull final Orientation  orientation)

Member Data Documentation

◆ dx

final int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dx
private

◆ dy

int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.dy
private

◆ filledH

int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledH
private

◆ filledPicture

Image com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledPicture
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().

◆ filledW

int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledW
private

◆ filledX

int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledX
private

◆ filledY

int com.realtime.crossfire.jxclient.gui.gauge.GaugeState.filledY
private

◆ fullImage

final Image com.realtime.crossfire.jxclient.gui.gauge.GaugeState.fullImage
private

◆ lowImage

final Image com.realtime.crossfire.jxclient.gui.gauge.GaugeState.lowImage
private

◆ negativeImage

final Image com.realtime.crossfire.jxclient.gui.gauge.GaugeState.negativeImage
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().

◆ preferredSize

final Dimension com.realtime.crossfire.jxclient.gui.gauge.GaugeState.preferredSize
private

The documentation for this class was generated from the following file: