Crossfire JXClient, Trunk
|
Public Member Functions | |
void | dispose () |
GUINewcharLabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final Font font, @NotNull final Font fontError, @NotNull final NewcharStat stat, @NotNull final NewcharType type, @NotNull final NewCharModel newCharModel, @NotNull final Color color, @NotNull final Color colorError, @NotNull final GuiFactory guiFactory) | |
void | notifyOpen () |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.GUIOneLineLabel | |
Dimension | getMaximumSize () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
GUIOneLineLabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final BufferedImage picture, @NotNull final Font textFont, @NotNull final Color textColor, @NotNull final Color textHighlightColor, @Nullable final Color backgroundColor, @NotNull final Alignment alignment, @NotNull final String text, @NotNull final GuiFactory guiFactory) | |
void | paintComponent (@NotNull final Graphics g) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.AbstractLabel | |
void | setText (@NotNull final String text) |
void | setTextHighlight (final boolean textHighlight) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
int | getDialogBorderBottom () |
int | getDialogBorderLeft () |
int | getDialogBorderRight () |
int | getDialogBorderTop () |
String | getName () |
void | inhibitListeners () |
boolean | isDefault () |
boolean | isIgnore () |
void | mouseClicked (@NotNull final MouseEvent e) |
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 () |
Protected Member Functions | |
Color | getTextColor () |
Font | getTextFont () |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.GUILabel | |
void | drawLine (@NotNull final Graphics2D g, final int y0, final int h0, @NotNull final String text) |
GUILabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final BufferedImage picture, @NotNull final String text, @NotNull final Font textFont, @NotNull final Color textColor, @NotNull final Color textHighlightColor, @Nullable final Color backgroundColor, @NotNull final Alignment textAlignment, @NotNull final GuiFactory guiFactory) | |
void | textChanged () |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.AbstractLabel | |
AbstractLabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final String text, @NotNull final Font textFont, @NotNull final Color textColor, @NotNull final Color textHighlightColor, @Nullable final BufferedImage backgroundPicture, @Nullable final Color backgroundColor, @NotNull final GuiFactory guiFactory) | |
String | getText () |
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 () |
Private Member Functions | |
void | updateContents () |
Private Attributes | |
final Color | colorError |
final CrossfireFailureListener | crossfireFailureListener |
final CrossfireServerConnection | crossfireServerConnection |
final Font | fontError |
final NewCharModelListener | listener = this::updateContents |
final NewCharModel | newCharModel |
final NewcharStat | stat |
final NewcharType | type |
boolean | validValue = true |
Static Private Attributes | |
static final Pattern | PATTERN_DIGITS = Pattern.compile("^([0-9]+ )?") |
static final long | serialVersionUID = 1 |
A GUIHTMLLabel that displays stat information in the character creation dialog.
Definition at line 42 of file GUINewcharLabel.java.
com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel | ( | @NotNull final TooltipManager | tooltipManager, |
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@NotNull final CrossfireServerConnection | crossfireServerConnection, | ||
@NotNull final Font | font, | ||
@NotNull final Font | fontError, | ||
@NotNull final NewcharStat | stat, | ||
@NotNull final NewcharType | type, | ||
@NotNull final NewCharModel | newCharModel, | ||
@NotNull final Color | color, | ||
@NotNull final Color | colorError, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the gui element name |
crossfireServerConnection | the connection instance |
font | the font to use |
fontError | the font for invalid values |
stat | the stat value to display |
type | the stat type to display |
newCharModel | the global new char model instance |
color | the default text color |
colorError | the text color for invalid values |
guiFactory | the global GUI factory instance |
Definition at line 124 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.gui.label.NewCharModel.addListener(), com.realtime.crossfire.jxclient.gui.label.NewcharType.CHAR_OPTION, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.colorError, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireFailureListener, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireServerConnection, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.label.NewcharType.ERROR, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.fontError, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.label.Alignment.LEFT, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.listener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.newCharModel, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.PATTERN_DIGITS, com.realtime.crossfire.jxclient.gui.label.NewCharModel.PRIORITY_SERVER_FAILURE, com.realtime.crossfire.jxclient.gui.label.Alignment.RIGHT, com.realtime.crossfire.jxclient.gui.label.NewCharModel.setErrorText(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.stat, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.type, and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().
void com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 155 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireFailureListener, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireServerConnection, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.listener, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.newCharModel, com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.removeCrossfireFailureListener(), and com.realtime.crossfire.jxclient.gui.label.NewCharModel.removeListener().
|
protected |
Returns the text color.
Reimplemented from com.realtime.crossfire.jxclient.gui.label.AbstractLabel.
Definition at line 174 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.colorError, and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.validValue.
|
protected |
Returns the font.
Reimplemented from com.realtime.crossfire.jxclient.gui.label.AbstractLabel.
Definition at line 180 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.fontError, and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.validValue.
void com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Reimplemented from com.realtime.crossfire.jxclient.gui.label.GUIOneLineLabel.
Definition at line 164 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.gui.label.NewcharType.ERROR, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.newCharModel, com.realtime.crossfire.jxclient.gui.label.NewCharModel.PRIORITY_SERVER_FAILURE, com.realtime.crossfire.jxclient.gui.label.NewCharModel.setErrorText(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.type, and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().
|
private |
Updates the displayed information to show the current value.
Definition at line 187 of file GUINewcharLabel.java.
References com.realtime.crossfire.jxclient.character.Choice.getChoiceDescription(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getClassStatAdjustment(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getErrorText(), com.realtime.crossfire.jxclient.gui.label.NewcharStat.getName(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getOption(), com.realtime.crossfire.jxclient.gui.label.NewcharStat.getPriority(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getRaceStatAdjustment(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getTotal(), com.realtime.crossfire.jxclient.gui.label.NewCharModel.getUnusedPoints(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.newCharModel, com.realtime.crossfire.jxclient.gui.label.NewCharModel.PRIORITY_UNUSED_POINTS, com.realtime.crossfire.jxclient.gui.label.NewCharModel.setErrorText(), com.realtime.crossfire.jxclient.gui.label.AbstractLabel.setText(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.stat, com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.type, and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.validValue.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.notifyOpen().
|
private |
The color for invalid values.
Definition at line 83 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextColor(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
private |
The CrossfireFailureListener registered to receive failure messages.
Definition at line 102 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
private |
The CrossfireServerConnection to monitor.
Definition at line 89 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
private |
The font for invalid values.
Definition at line 77 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextFont(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
private |
The listener attached to newCharModel.
Definition at line 95 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
private |
The global NewCharModel instance.
Definition at line 71 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.notifyOpen(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().
|
staticprivate |
A Pattern that matches an optional digit prefix.
Definition at line 53 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel().
|
staticprivate |
The serial version UID.
Definition at line 47 of file GUINewcharLabel.java.
|
private |
The stat value to display.
Definition at line 59 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().
|
private |
The stat type to display.
Definition at line 65 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.GUINewcharLabel(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.notifyOpen(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().
|
private |
Whether a valid value is currently shown.
Definition at line 107 of file GUINewcharLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextColor(), com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextFont(), and com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.updateContents().