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

Public Member Functions

Dimension getMaximumSize ()
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
TooltipText getTooltip ()
 
 GUIDupGauge (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final Image fullImageDiv, @NotNull final Image fullImageMod, @Nullable final Image emptyImage, @NotNull final Orientation orientationDiv, @NotNull final Orientation orientationMod, @Nullable final String tooltipPrefix, @NotNull final Color color, @NotNull final Font font, @Nullable final CommandList commandList, @NotNull final GuiFactory guiFactory)
 
void mouseClicked (@NotNull final MouseEvent e)
 
void notifyOpen ()
 
void paintComponent (@NotNull final Graphics g)
 
void setBounds (final int x, final int y, final int width, final int height)
 
void setHidden (final boolean hidden)
 
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.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 Member Functions

Dimension getGaugeStateSize ()
 

Private Attributes

final Color color
 
final CommandList commandList
 
final Image emptyImage
 
final Font font
 
final GaugeState gaugeStateDiv
 
final GaugeState gaugeStateMod
 
String labelText = ""
 
final Orientation orientationDiv
 
final Orientation orientationMod
 
final String tooltipPrefix
 
String tooltipText = ""
 

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

Displays a value as a graphical gauge that's filling state depends on the value.

Author
Andreas Kirschbaum

Definition at line 47 of file GUIDupGauge.java.

Constructor & Destructor Documentation

◆ GUIDupGauge()

com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.GUIDupGauge ( @NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
@NotNull final Image  fullImageDiv,
@NotNull final Image  fullImageMod,
@Nullable final Image  emptyImage,
@NotNull final Orientation  orientationDiv,
@NotNull final Orientation  orientationMod,
@Nullable final String  tooltipPrefix,
@NotNull final Color  color,
@NotNull final Font  font,
@Nullable final CommandList  commandList,
@NotNull final GuiFactory  guiFactory 
)

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
fullImageDivthe top image
fullImageModthe bottom image
emptyImagethe image representing an empty gauge; if set to
null
an empty background is used instead
orientationDivthe gauge's orientation
orientationModthe gauge's orientation
tooltipPrefixthe prefix for displaying tooltips; if set to
null
no tooltips are shown
colorthe text color
fontthe text font
commandListthe command list that is executed on button 2
guiFactorythe global GUI factory instance

Definition at line 140 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.color, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.commandList, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.emptyImage, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.font, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.gaugeStateDiv, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.gaugeStateMod, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.orientationDiv, com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.orientationMod, com.realtime.crossfire.jxclient.gui.gauge.Orientation.setExtends(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setValues(), com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.tooltipPrefix.

Here is the call graph for this function:

Member Function Documentation

◆ getGaugeStateSize()

Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getGaugeStateSize ( )
private

◆ getMaximumSize()

Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getMaximumSize ( )

Definition at line 198 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getGaugeStateSize().

Here is the call graph for this function:

◆ getMinimumSize()

Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getMinimumSize ( )

Definition at line 191 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getGaugeStateSize().

Here is the call graph for this function:

◆ getPreferredSize()

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

Definition at line 184 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getGaugeStateSize().

Here is the call graph for this function:

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getTooltip ( )

Returns the current tooltip text.

Returns
the tooltip text or
null
to not show a tooltip

Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.

Definition at line 280 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.newTooltipText(), com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.tooltipPrefix, and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.tooltipText.

Here is the call graph for this function:

◆ mouseClicked()

void com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.mouseClicked ( @NotNull final MouseEvent  e)

Will be called when the user has clicked (pressed+released) this element. This event will be delivered after mouseReleased(MouseEvent).

Parameters
ethe mouse event relative to this element

Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.

Definition at line 256 of file GUIDupGauge.java.

References com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.commandList, and com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute().

Here is the call graph for this function:

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.notifyOpen ( )

Called each time the enclosing dialog is opened (or raised).

Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.

Definition at line 293 of file GUIDupGauge.java.

◆ paintComponent()

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

◆ setBounds()

void com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.setBounds ( final int  x,
final int  y,
final int  width,
final int  height 
)

◆ setHidden()

void com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.setHidden ( final boolean  hidden)

Specify whether this item should hide itself, independent of the "visibility" state.

Parameters
hiddenwhether the gauge is hidden

Implements com.realtime.crossfire.jxclient.gui.gauge.GUIGaugeListener.

Definition at line 251 of file GUIDupGauge.java.

◆ setValues()

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

Member Data Documentation

◆ color

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

◆ commandList

final CommandList com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.commandList
private

◆ emptyImage

final Image com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.emptyImage
private

◆ font

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

◆ gaugeStateDiv

final GaugeState com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.gaugeStateDiv
private

◆ gaugeStateMod

final GaugeState com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.gaugeStateMod
private

◆ labelText

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

◆ orientationDiv

final Orientation com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.orientationDiv
private

◆ orientationMod

final Orientation com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.orientationMod
private

◆ serialVersionUID

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

The serial version UID.

Definition at line 52 of file GUIDupGauge.java.

◆ tooltipPrefix

final String com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.tooltipPrefix
private

The tooltip prefix. It is prepended to tooltipText to form the tooltip.

Definition at line 65 of file GUIDupGauge.java.

Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getTooltip(), and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.GUIDupGauge().

◆ tooltipText

String com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.tooltipText = ""
private

The tooltip suffix. It is appended to tooltipPrefix to form the tooltip.

Definition at line 78 of file GUIDupGauge.java.

Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.getTooltip(), and com.realtime.crossfire.jxclient.gui.gauge.GUIDupGauge.setValues().


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