22 package com.realtime.crossfire.jxclient.main;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
60 public void itemAdded(@NotNull
final CfItem item) {
65 public void itemMoved(@NotNull
final CfItem item) {
70 public void itemChanged(@NotNull
final CfItem item) {
75 public void itemRemoved(@NotNull
final CfItem item) {
80 public void playerChanged(@Nullable
final CfItem player) {
81 connection.
setCharacter(player == null ? null : player.getName());
85 public void openContainerChanged(
final int tag) {
96 @SuppressWarnings(
"FieldCanBeLocal")
100 public void start() {
105 public void metaserver() {
110 public void preConnecting(@NotNull
final String serverInfo) {
111 connection.
setHost(serverInfo);
115 public void connecting(@NotNull
final String serverInfo) {
125 public void connected() {
130 public void connectFailed(@NotNull
final String reason) {
Interface for listeners interested gui state changes.
Maintains the current GuiState.
final JXCConnection connection
The JXCConnection to track.
void addItemSetListener(@NotNull final ItemSetListener listener)
Adds an ItemSetListener to be notified about changes.
void setCharacter(@Nullable final String character)
Updates the active character name.
void removeItemSetListener(@NotNull final ItemSetListener listener)
Removes an ItemSetListener to be notified about changes.
Tracks a GuiStateManager and updates a JXCConnection's character name.
Interface for listeners in ItemSet related events.
PlayerNameTracker(@NotNull final GuiStateManager guiStateManager, @NotNull final JXCConnection connection, @NotNull final ItemSet itemSet)
Creates a new instance.
final ItemSetListener itemSetListener
The listener to detect a changed player name.
void setHost(@Nullable final String serverInfo)
Updates information about the connected host.
final ItemSet itemSet
The ItemSet to track.
Model class maintaining the CfItems known to the player.
The representation of a Crossfire Item, client-side.
Connection progress states of the Crossfire server connection.
final GuiStateListener guiStateListener
The GuiStateListener for detecting established or dropped connections.