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.list.GUICharacterList Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.gui.list.GUICharacterList:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.list.GUICharacterList:
Collaboration graph

Public Member Functions

CharacterInformation getCurrentCharacter ()
 
 GUICharacterList (@NotNull final TooltipManager tooltipManager, @NotNull final FacesManager facesManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int cellWidth, final int cellHeight, @NotNull final Font font, @NotNull final CharacterModel characterModel, @NotNull final GuiFactory guiFactory)
 
void notifyOpen ()
 
void setCharacter (@NotNull final String characterName)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.list.GUIList< GUICharacter >
boolean canMoveSelection (final int diffLines, final int diffElements)
 
boolean canScroll (final int distance)
 
void dispose ()
 
void execute ()
 
getElement (final int index)
 
Dimension getMaximumSize ()
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
TooltipText getTooltip ()
 
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 mouseWheelMoved (final int wheelRotation)
 
void moveSelection (final int diffLines, final int diffElements)
 
void resetScroll ()
 
void scroll (final int distance)
 
void setBounds (final int x, final int y, final int width, final int height)
 
void setChanged ()
 

Protected Member Functions

void activeChanged ()
 
String getTooltip (final int index)
 
void selectionChanged (final int selectedIndex)
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.list.GUIList< GUICharacter >
void addElement ( @NotNull final T element)
 
Object getSelectedObject ()
 
abstract String getTooltip (final int index)
 
 GUIList ( @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int cellWidth, final int cellHeight, @NotNull final GUIListCellRenderer< T > listCellRenderer, @Nullable final CommandList doubleClickCommandList, @NotNull final GuiFactory guiFactory)
 
int resizeElements (final int newSize)
 
void selectionChanged ()
 
abstract void selectionChanged (final int selectedIndex)
 
void setLayoutOrientation (final int layoutOrientation, final int visibleRowCount)
 
void setSelectedIndex (final int newIndex)
 

Private Member Functions

void rebuildList ()
 

Private Attributes

final CharacterInformationListener characterInformationListener = this::setChanged
 
final CharacterModel characterModel
 
final GUIElementListener elementListener
 
final FacesManager facesManager
 
final Font font
 
final GuiFactory guiFactory
 
final String name
 
int selectedIndex
 
final TooltipManager tooltipManager
 

Static Private Attributes

static final long serialVersionUID = 1
 

Detailed Description

A GUIList display characters of an account.

Author
Nicolas Weeger

Definition at line 41 of file GUICharacterList.java.

Constructor & Destructor Documentation

◆ GUICharacterList()

com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList ( @NotNull final TooltipManager  tooltipManager,
@NotNull final FacesManager  facesManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
final int  cellWidth,
final int  cellHeight,
@NotNull final Font  font,
@NotNull final CharacterModel  characterModel,
@NotNull final GuiFactory  guiFactory 
)

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
facesManagerthe faces to use to display
elementListenerthe element listener to notify
namethe name of this element
cellWidththe width of cells
cellHeightthe height of cells
fontfont to display with
characterModelwhat to list characters of
guiFactorythe global GUI factory instance

Definition at line 115 of file GUICharacterList.java.

References com.realtime.crossfire.jxclient.gui.list.GUIList< GUICharacter >.cellHeight, com.realtime.crossfire.jxclient.gui.list.GUICharacterList.characterModel, com.realtime.crossfire.jxclient.account.CharacterModel.displaysFace(), com.realtime.crossfire.jxclient.gui.list.GUICharacterList.elementListener, com.realtime.crossfire.jxclient.gui.list.GUICharacterList.facesManager, com.realtime.crossfire.jxclient.gui.list.GUICharacterList.font, com.realtime.crossfire.jxclient.gui.list.GUICharacterList.guiFactory, com.realtime.crossfire.jxclient.gui.list.GUICharacterList.name, and com.realtime.crossfire.jxclient.gui.list.GUICharacterList.tooltipManager.

Here is the call graph for this function:

Member Function Documentation

◆ activeChanged()

void com.realtime.crossfire.jxclient.gui.list.GUICharacterList.activeChanged ( )
protected

Definition at line 147 of file GUICharacterList.java.

◆ getCurrentCharacter()

CharacterInformation com.realtime.crossfire.jxclient.gui.list.GUICharacterList.getCurrentCharacter ( )

Returns the currently selected character in the list.

Returns
null
if invalid index, else the character information

Definition at line 177 of file GUICharacterList.java.

References com.realtime.crossfire.jxclient.account.CharacterModel.getEntry().

Referenced by com.realtime.crossfire.jxclient.gui.commands.AccountPlayCharacterCommand.execute().

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

◆ getTooltip()

String com.realtime.crossfire.jxclient.gui.list.GUICharacterList.getTooltip ( final int  index)
protected

Definition at line 142 of file GUICharacterList.java.

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.list.GUICharacterList.notifyOpen ( )

Definition at line 190 of file GUICharacterList.java.

◆ rebuildList()

void com.realtime.crossfire.jxclient.gui.list.GUICharacterList.rebuildList ( )
private

◆ selectionChanged()

void com.realtime.crossfire.jxclient.gui.list.GUICharacterList.selectionChanged ( final int  selectedIndex)
protected

Definition at line 136 of file GUICharacterList.java.

◆ setCharacter()

void com.realtime.crossfire.jxclient.gui.list.GUICharacterList.setCharacter ( @NotNull final String  characterName)

Selects an entry by character name.

Parameters
characterNamethe character name

Definition at line 185 of file GUICharacterList.java.

References com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterIndex().

Referenced by com.realtime.crossfire.jxclient.window.GuiManager.openDialog().

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

Member Data Documentation

◆ characterInformationListener

final CharacterInformationListener com.realtime.crossfire.jxclient.gui.list.GUICharacterList.characterInformationListener = this::setChanged
private

The CharacterInformationListener attached to all tracked character models. It detects changed contents and updates the list accordingly.

Definition at line 101 of file GUICharacterList.java.

◆ characterModel

final CharacterModel com.realtime.crossfire.jxclient.gui.list.GUICharacterList.characterModel
private

The model to display characters from.

Definition at line 52 of file GUICharacterList.java.

Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList().

◆ elementListener

final GUIElementListener com.realtime.crossfire.jxclient.gui.list.GUICharacterList.elementListener
private

◆ facesManager

final FacesManager com.realtime.crossfire.jxclient.gui.list.GUICharacterList.facesManager
private

The FacesManager to use to display faces.

Definition at line 64 of file GUICharacterList.java.

Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList().

◆ font

final Font com.realtime.crossfire.jxclient.gui.list.GUICharacterList.font
private

The font for drawing list entries.

Definition at line 88 of file GUICharacterList.java.

Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList().

◆ guiFactory

final GuiFactory com.realtime.crossfire.jxclient.gui.list.GUICharacterList.guiFactory
private

◆ name

final String com.realtime.crossfire.jxclient.gui.list.GUICharacterList.name
private

The name of this element.

Definition at line 82 of file GUICharacterList.java.

Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList().

◆ selectedIndex

int com.realtime.crossfire.jxclient.gui.list.GUICharacterList.selectedIndex
private

The currently selected list index.

Definition at line 93 of file GUICharacterList.java.

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.list.GUICharacterList.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 46 of file GUICharacterList.java.

◆ tooltipManager

final TooltipManager com.realtime.crossfire.jxclient.gui.list.GUICharacterList.tooltipManager
private

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