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

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
 

Detailed Description

A GUIHTMLLabel that displays stat information in the character creation dialog.

Author
Andreas Kirschbaum

Definition at line 42 of file GUINewcharLabel.java.

Constructor & Destructor Documentation

◆ GUINewcharLabel()

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.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe gui element name
crossfireServerConnectionthe connection instance
fontthe font to use
fontErrorthe font for invalid values
statthe stat value to display
typethe stat type to display
newCharModelthe global new char model instance
colorthe default text color
colorErrorthe text color for invalid values
guiFactorythe 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().

Here is the call graph for this function:

Member Function Documentation

◆ dispose()

void com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.dispose ( )

◆ getTextColor()

Color com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextColor ( )
protected

◆ getTextFont()

Font com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.getTextFont ( )
protected

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.notifyOpen ( )

◆ updateContents()

void 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ colorError

final Color com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.colorError
private

◆ crossfireFailureListener

final CrossfireFailureListener com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireFailureListener
private

◆ crossfireServerConnection

final CrossfireServerConnection com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.crossfireServerConnection
private

◆ fontError

final Font com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.fontError
private

◆ listener

final NewCharModelListener com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.listener = this::updateContents
private

◆ newCharModel

final NewCharModel com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.newCharModel
private

◆ PATTERN_DIGITS

final Pattern com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.PATTERN_DIGITS = Pattern.compile("^([0-9]+ )?")
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().

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 47 of file GUINewcharLabel.java.

◆ stat

final NewcharStat com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.stat
private

◆ type

final NewcharType com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.type
private

◆ validValue

boolean com.realtime.crossfire.jxclient.gui.label.GUINewcharLabel.validValue = true
private

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