Crossfire JXClient, Trunk
|
Public Member Functions | |
void | add (@NotNull final CharacterInformation characterInformation) |
void | addCharacterInformationListener (final int index, @NotNull final CharacterInformationListener listener) |
void | addCharacterListener (@NotNull final CharacterListener listener) |
void | begin () |
void | commit () |
boolean | displaysFace (final int faceNum) |
int | getCharacterIndex (@NotNull final String characterName) |
CharacterInformation | getEntry (final int index) |
void | removeCharacterInformationListener (final int index, @NotNull final CharacterInformationListener listener) |
void | removeCharacterListener (@NotNull final CharacterListener listener) |
int | size () |
Private Member Functions | |
EventListenerList2< CharacterInformationListener > | getCharacterInformationListeners (final int index) |
Private Attributes | |
final Map< Integer, EventListenerList2< CharacterInformationListener > > | characterInformationListeners = new HashMap<>() |
final EventListenerList2< CharacterListener > | characterListeners = new EventListenerList2<>() |
final List< CharacterInformation > | characters = new ArrayList<>() |
final Collection< CharacterInformation > | charactersPending = new ArrayList<>() |
final Object | sync = new Object() |
Maintains the character list for an account. Only meaningful if the server supports the new "loginmethod".
Definition at line 40 of file CharacterModel.java.
void com.realtime.crossfire.jxclient.account.CharacterModel.add | ( | @NotNull final CharacterInformation | characterInformation | ) |
Adds an entry.
characterInformation | the entry to add |
Definition at line 124 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.charactersPending, and com.realtime.crossfire.jxclient.account.CharacterModel.sync.
void com.realtime.crossfire.jxclient.account.CharacterModel.addCharacterInformationListener | ( | final int | index, |
@NotNull final CharacterInformationListener | listener | ||
) |
Adds a character entry listener for one entry.
index | the entry index to monitor |
listener | the listener to add |
Definition at line 184 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterInformationListeners().
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.rebuildList(), and com.realtime.crossfire.jxclient.gui.list.GUICharacter.setIndex().
void com.realtime.crossfire.jxclient.account.CharacterModel.addCharacterListener | ( | @NotNull final CharacterListener | listener | ) |
Adds a character listener.
listener | the listener to add |
Definition at line 167 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characterListeners.
void com.realtime.crossfire.jxclient.account.CharacterModel.begin | ( | ) |
Starts an update transaction.
Definition at line 133 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.charactersPending.
void com.realtime.crossfire.jxclient.account.CharacterModel.commit | ( | ) |
Finishes an update transaction.
Definition at line 140 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characterListeners, com.realtime.crossfire.jxclient.account.CharacterModel.characters, com.realtime.crossfire.jxclient.account.CharacterModel.charactersPending, com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterInformationListeners(), and com.realtime.crossfire.jxclient.account.CharacterModel.sync.
boolean com.realtime.crossfire.jxclient.account.CharacterModel.displaysFace | ( | final int | faceNum | ) |
Returns whether any character has the given face.
faceNum | the face |
Definition at line 221 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characters.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.GUICharacterList().
int com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterIndex | ( | @NotNull final String | characterName | ) |
Returns the index of an entry by character name.
characterName | the character name |
Definition at line 95 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characters, and com.realtime.crossfire.jxclient.account.CharacterModel.sync.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.setCharacter().
|
private |
Returns the character entry listeners for one entry index.
index | the entry index |
Definition at line 203 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characterInformationListeners.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.addCharacterInformationListener(), com.realtime.crossfire.jxclient.account.CharacterModel.commit(), and com.realtime.crossfire.jxclient.account.CharacterModel.removeCharacterInformationListener().
CharacterInformation com.realtime.crossfire.jxclient.account.CharacterModel.getEntry | ( | final int | index | ) |
Returns a character entry by index.
index | the index |
Definition at line 80 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characters, and com.realtime.crossfire.jxclient.account.CharacterModel.sync.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.getCurrentCharacter(), com.realtime.crossfire.jxclient.gui.list.GUICharacter.getMinimumSizeInt(), com.realtime.crossfire.jxclient.gui.list.GUICharacter.getTooltip(), and com.realtime.crossfire.jxclient.gui.list.GUICharacter.paintComponent().
void com.realtime.crossfire.jxclient.account.CharacterModel.removeCharacterInformationListener | ( | final int | index, |
@NotNull final CharacterInformationListener | listener | ||
) |
Removes a character entry listener for one entry.
index | the entry index to monitor |
listener | the listener to remove |
Definition at line 193 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterInformationListeners().
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.rebuildList(), and com.realtime.crossfire.jxclient.gui.list.GUICharacter.setIndex().
void com.realtime.crossfire.jxclient.account.CharacterModel.removeCharacterListener | ( | @NotNull final CharacterListener | listener | ) |
Removes a character listener.
listener | the listener to remove |
Definition at line 175 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characterListeners.
int com.realtime.crossfire.jxclient.account.CharacterModel.size | ( | ) |
Returns the number of character entries.
Definition at line 114 of file CharacterModel.java.
References com.realtime.crossfire.jxclient.account.CharacterModel.characters, and com.realtime.crossfire.jxclient.account.CharacterModel.sync.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUICharacterList.rebuildList().
|
private |
All registered character entry listeners. Maps entry index to list of listeners.
Definition at line 72 of file CharacterModel.java.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterInformationListeners().
|
private |
All registered character listeners.
Definition at line 65 of file CharacterModel.java.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.addCharacterListener(), com.realtime.crossfire.jxclient.account.CharacterModel.commit(), and com.realtime.crossfire.jxclient.account.CharacterModel.removeCharacterListener().
|
private |
The current entries.
Definition at line 46 of file CharacterModel.java.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.commit(), com.realtime.crossfire.jxclient.account.CharacterModel.displaysFace(), com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterIndex(), com.realtime.crossfire.jxclient.account.CharacterModel.getEntry(), and com.realtime.crossfire.jxclient.account.CharacterModel.size().
|
private |
The pending entries. Only valid between begin() and commit().
Definition at line 53 of file CharacterModel.java.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.add(), com.realtime.crossfire.jxclient.account.CharacterModel.begin(), and com.realtime.crossfire.jxclient.account.CharacterModel.commit().
|
private |
Object used for synchronization.
Definition at line 59 of file CharacterModel.java.
Referenced by com.realtime.crossfire.jxclient.account.CharacterModel.add(), com.realtime.crossfire.jxclient.account.CharacterModel.commit(), com.realtime.crossfire.jxclient.account.CharacterModel.getCharacterIndex(), com.realtime.crossfire.jxclient.account.CharacterModel.getEntry(), and com.realtime.crossfire.jxclient.account.CharacterModel.size().