Crossfire JXClient, Trunk
|
Public Member Functions | |
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 | 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 | |
String | formatTooltip () |
Private Attributes | |
final float | alpha |
final CommandList | commandList |
final Image | emptyImage |
final GaugeState | gaugeState |
boolean | hidden |
final Orientation | orientation |
final Stats | stats |
final String | tooltipFormat |
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 () |
Displays a value as a graphical gauge that's filling state depends on the value.
Definition at line 47 of file GUIGauge.java.
com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.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 | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
fullImage | the image representing a full gauge |
lowImage | the image representing a low gauge (<30%) |
negativeImage | the image representing a more-than-empty gauge; if set to null
|
emptyImage | the image representing an empty gauge; if set to null
|
orientation | the gauge's orientation |
tooltipFormat | the format for displaying tooltips; if set to null
|
alpha | alpha value of the gauge to use |
commandList | the command list that is executed on button 2 |
guiFactory | the global GUI factory instance |
stats | the stats instance to use |
Definition at line 126 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.alpha, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.commandList, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.emptyImage, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, 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.Orientation.setExtends(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setHasNegativeImage(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setValues(), com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues(), 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.
|
private |
Returns a formatted string using the given format.
Supported format strings:
Definition at line 261 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.stats.Stats.getActiveSkill(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.stats, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.tooltipFormat, and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.tooltipText.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getTooltip().
Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMaximumSize | ( | ) |
Definition at line 208 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMinimumSize | ( | ) |
Definition at line 201 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getPreferredSize | ( | ) |
Definition at line 194 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.getPreferredSize().
TooltipText com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 242 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.formatTooltip(), and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.newTooltipText().
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.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).
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 218 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.commandList, and com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute().
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 247 of file GUIGauge.java.
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent | ( | @NotNull final Graphics | g | ) |
Reimplemented in com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.
Definition at line 152 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.alpha, com.realtime.crossfire.jxclient.gui.gauge.GaugeState.draw(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.emptyImage, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.hidden.
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setBounds | ( | final int | x, |
final int | y, | ||
final int | width, | ||
final int | height | ||
) |
Definition at line 142 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.orientation, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setExtends(), and com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues().
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setHidden | ( | final boolean | hidden | ) |
Specify whether this item should hide itself, independent of the "visibility" state.
hidden | whether the gauge is hidden |
Implements com.realtime.crossfire.jxclient.gui.gauge.GUIGaugeListener.
Definition at line 213 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.hidden.
void com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setValues | ( | final int | curValue, |
final int | minValue, | ||
final int | maxValue, | ||
@NotNull final String | labelText, | ||
@NotNull final String | tooltipText | ||
) |
Sets the values to display.
curValue | the values to display |
minValue | the minimum possible value |
maxValue | the maximum possible value |
labelText | the label text |
tooltipText | the tooltip suffix |
Implements com.realtime.crossfire.jxclient.gui.gauge.GUIGaugeListener.
Reimplemented in com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.
Definition at line 177 of file GUIGauge.java.
References com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.gaugeState, com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.orientation, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setValues(), com.realtime.crossfire.jxclient.gui.gauge.GaugeState.setValues(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipChanged(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.tooltipText.
|
private |
The gauge alpha value, 1 is opaque and 0 full transparent.
Definition at line 100 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent().
|
private |
The CommandList that is executed on button 2.
Definition at line 65 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.mouseClicked().
|
private |
The image representing an empty gauge.
Definition at line 83 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent().
|
private |
The gauge state.
Definition at line 95 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMaximumSize(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getMinimumSize(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.getPreferredSize(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setBounds(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setValues().
|
private |
If true, the gauge will not paint itself, whatever its visibility.
Definition at line 105 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.paintComponent(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setHidden().
|
private |
The gauge's orientation.
Definition at line 89 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setBounds(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setValues().
|
staticprivate |
The serial version UID.
Definition at line 52 of file GUIGauge.java.
|
private |
The Stats instance to use.
Definition at line 71 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.formatTooltip(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), and com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge().
|
private |
The tooltip format. If supports the parameters describes in formatTooltip().
Definition at line 59 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.formatTooltip(), com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.GUIGauge(), and com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.GUITextGauge().
|
private |
The default tooltip text.
Definition at line 77 of file GUIGauge.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.formatTooltip(), com.realtime.crossfire.jxclient.gui.gauge.GUITextGauge.setValues(), and com.realtime.crossfire.jxclient.gui.gauge.GUIGauge.setValues().