Class JXCConnection
- java.lang.Object
-
- com.realtime.crossfire.jxclient.window.JXCConnection
-
public class JXCConnection extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JXCConnection(@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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetHostname()Returns the currently connected server.intgetPort()Returns the currently connected port.voidsetCharacter(@Nullable java.lang.String character)Updates the active character name.voidsetFrame(@Nullable java.awt.Frame frame)Sets theFramefor updating the title.voidsetHost(@Nullable java.lang.String serverInfo)Updates information about the connected host.
-
-
-
Constructor Detail
-
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 Detail
-
setFrame
public void setFrame(@Nullable @Nullable java.awt.Frame frame)Sets theFramefor updating the title.- Parameters:
frame- the frame ornull
-
getHostname
@Nullable public @Nullable java.lang.String 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
public void setCharacter(@Nullable @Nullable java.lang.String character)Updates the active character name.- Parameters:
character- the active character;nullif not logged in
-
setHost
public void setHost(@Nullable @Nullable java.lang.String serverInfo)Updates information about the connected host.- Parameters:
serverInfo- the hostname;nullif not connected
-
-