public class JXCConnection
extends java.lang.Object
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
@Nullable java.lang.String |
getHostname()
Returns the currently connected server.
|
int |
getPort()
Returns the currently connected port.
|
void |
setCharacter(@Nullable java.lang.String character)
Updates the active character name.
|
void |
setFrame(@Nullable java.awt.Frame frame)
Sets the
Frame for updating the title. |
void |
setHost(@Nullable java.lang.String serverInfo)
Updates information about the connected host.
|
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)
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 namespublic void setFrame(@Nullable @Nullable java.awt.Frame frame)
Frame
for updating the title.frame
- the frame or null
@Nullable public @Nullable java.lang.String getHostname()
null
if unconnectedpublic int getPort()
0
if unconnectedpublic void setCharacter(@Nullable @Nullable java.lang.String character)
character
- the active character; null
if not logged inpublic void setHost(@Nullable @Nullable java.lang.String serverInfo)
serverInfo
- the hostname; null
if not connected