Class JXCConnection

java.lang.Object
com.realtime.crossfire.jxclient.window.JXCConnection

public class JXCConnection extends Object
  • 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 update
      shortcuts - the shortcuts to update
      settings - the settings instance to use
      characterPickup - the character pickup instance to update
      server - the crossfire server connection instance used to connect
      guiStateManager - the gui state manager to watch
      logger - the logger to notify about changed server names
  • Method Details

    • setFrame

      public void setFrame(@Nullable @Nullable Frame frame)
      Sets the Frame for updating the title.
      Parameters:
      frame - the frame or null
    • getHostname

      @Nullable public @Nullable String getHostname()
      Returns the currently connected server.
      Returns:
      the server or null if unconnected
    • getPort

      public int getPort()
      Returns the currently connected port.
      Returns:
      the port or 0 if unconnected
    • setCharacter

      public void setCharacter(@Nullable @Nullable String character)
      Updates the active character name.
      Parameters:
      character - the active character; null if not logged in
    • setHost

      public void setHost(@Nullable @Nullable String serverInfo)
      Updates information about the connected host.
      Parameters:
      serverInfo - the hostname; null if not connected