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

Public Member Functions

 GUITextGauge (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final Image pictureFull, @NotNull final Image pictureLow, @Nullable final Image pictureNegative, @NotNull final Image pictureEmpty, @NotNull final Orientation orientation, @Nullable final String tooltipFormat, @NotNull final Color color, @NotNull final Font font, final float alpha, @Nullable final CommandList commandList, @NotNull final GuiFactory guiFactory, @NotNull final Stats stats)
 
void paintComponent (@NotNull final Graphics g)
 
void setValues (final int curValue, final int minValue, final int maxValue, @NotNull final String labelText, @NotNull final String tooltipText)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gauge.GUIGauge
Dimension getMaximumSize ()
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
TooltipText getTooltip ()
 
 GUIGauge (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final Image fullImage, @Nullable final Image lowImage, @Nullable final Image negativeImage, @Nullable final Image emptyImage, @NotNull final Orientation orientation, @Nullable final String tooltipFormat, final float alpha, @Nullable final CommandList commandList, @NotNull final GuiFactory guiFactory, @NotNull final Stats stats)
 
void mouseClicked (@NotNull final MouseEvent e)
 
void notifyOpen ()
 
void setBounds (final int x, final int y, final int width, final int height)
 
void setHidden (final boolean hidden)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
void dispose ()
 
int getDialogBorderBottom ()
 
int getDialogBorderLeft ()
 
int getDialogBorderRight ()
 
int getDialogBorderTop ()
 
String getName ()
 
void inhibitListeners ()
 
boolean isDefault ()
 
boolean isIgnore ()
 
void mouseDragged (@NotNull final MouseEvent e)
 
void mouseEntered (@NotNull final MouseEvent e)
 
void mouseExited (@NotNull final MouseEvent e)
 
void mouseMoved (@NotNull final MouseEvent e)
 
void mousePressed (@NotNull final MouseEvent e)
 
void mouseReleased (@NotNull final MouseEvent e)
 
void mouseWheelMoved (final int wheelRotation)
 
void setChanged ()
 
void setChangedListener (@Nullable final GUIElementChangedListener changedListener)
 
void setDefault (final boolean isDefault)
 
void setIgnore ()
 
String toString ()
 

Private Attributes

final Color color
 
final Font font
 
String labelText = ""
 

Static Private Attributes

static final long serialVersionUID = 1
 

Additional Inherited Members

- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
 AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory)
 
TooltipText newTooltipText (@Nullable final String tooltipText)
 
void tooltipChanged ()
 

Detailed Description

A GUIGauge which displays the current value as a text string on top of the gauge.

Author
Andreas Kirschbaum

Definition at line 44 of file GUITextGauge.java.

Constructor & Destructor Documentation

◆ GUITextGauge()

com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge ( @NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
@NotNull final Image  pictureFull,
@NotNull final Image  pictureLow,
@Nullable final Image  pictureNegative,
@NotNull final Image  pictureEmpty,
@NotNull final Orientation  orientation,
@Nullable final String  tooltipFormat,
@NotNull final Color  color,
@NotNull final Font  font,
final float  alpha,
@Nullable final CommandList  commandList,
@NotNull final GuiFactory  guiFactory,
@NotNull final Stats  stats 
)

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
pictureFullthe image for positive values
pictureLowthe image for low (<30%) values
pictureNegativethe image for negative values
pictureEmptythe image for an empty gauge
orientationthe gauge's orientation
tooltipFormatthe format for displaying tooltips; if set to
null
no tooltips are shown
colorthe text color
fontthe text font
alphatransparency to draw with
commandListthe command list that is executed on button 2
guiFactorythe global GUI factory instance
statsthe stats instance to use

Definition at line 88 of file GUITextGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.alpha, com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.color, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.commandList, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.font, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.orientation, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.stats, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.tooltipFormat, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.

Member Function Documentation

◆ paintComponent()

void com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.paintComponent ( @NotNull final Graphics  g)

◆ setValues()

void com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.setValues ( final int  curValue,
final int  minValue,
final int  maxValue,
@NotNull final String  labelText,
@NotNull final String  tooltipText 
)

Sets the values to display.

Parameters
curValuethe values to display
minValuethe minimum possible value
maxValuethe maximum possible value
labelTextthe label text
tooltipTextthe tooltip suffix

Reimplemented from com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.

Definition at line 109 of file GUITextGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.labelText, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.tooltipText.

Here is the call graph for this function:

Member Data Documentation

◆ color

final Color com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.color
private

◆ font

final Font com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.font
private

◆ labelText

String com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.labelText = ""
private

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 49 of file GUITextGauge.java.


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