Class JXCConnection
java.lang.Object
com.realtime.crossfire.jxclient.window.JXCConnection
-
Constructor Summary
ConstructorsConstructorDescriptionJXCConnection(@NotNull KeybindingsManager keybindingsManager, @NotNull Shortcuts shortcuts, @NotNull Settings settings, @NotNull Pickup characterPickup, @NotNull CrossfireServerConnection server, @NotNull GuiStateManager guiStateManager, @NotNull Logger logger) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the currently connected server.intgetPort()Returns the currently connected port.voidsetCharacter(@Nullable String character) Updates the active character name.voidSets theFramefor updating the title.voidUpdates information about the connected host.
-
Constructor Details
-
JXCConnection
public JXCConnection(@NotNull @NotNull KeybindingsManager keybindingsManager, @NotNull @NotNull Shortcuts shortcuts, @NotNull @NotNull Settings settings, @NotNull @NotNull Pickup characterPickup, @NotNull @NotNull CrossfireServerConnection server, @NotNull @NotNull GuiStateManager guiStateManager, @NotNull @NotNull Logger logger) Creates a new instance.- Parameters:
keybindingsManager- the keybindings manager to updateshortcuts- the shortcuts to updatesettings- the settings instance to usecharacterPickup- the character pickup instance to updateserver- the crossfire server connection instance used to connectguiStateManager- the gui state manager to watchlogger- the logger to notify about changed server names
-
-
Method Details
-
setFrame
Sets theFramefor updating the title.- Parameters:
frame- the frame ornull
-
getHostname
Returns the currently connected server.- Returns:
- the server or
nullif unconnected
-
getPort
public int getPort()Returns the currently connected port.- Returns:
- the port or
0if unconnected
-
setCharacter
Updates the active character name.- Parameters:
character- the active character;nullif not logged in
-
setHost
Updates information about the connected host.- Parameters:
serverInfo- the hostname;nullif not connected
-