Class GetPlayers

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public final class GetPlayers extends KFrame
Class GetPlayers is a dialog used to enter players' names, types, variant, etc.
Author:
David Ripton, Romain Dolbeau
See Also:
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • loadVariant

      private static final String loadVariant
      See Also:
    • mutex

      private final Object mutex
    • mutexNotified

      private boolean mutexNotified
    • runningOnLabel

      private final JLabel runningOnLabel
    • serveAtPortBox

      private final JComboBox serveAtPortBox
    • sPortChoices

      private final TreeSet<String> sPortChoices
    • typeChoices

      private final Vector<String> typeChoices
    • playerTypes

      private final JComboBox[] playerTypes
    • playerNames

      private final JComboBox[] playerNames
    • readme

      private JEditorPane readme
    • readmeScrollPane

      private JScrollPane readmeScrollPane
    • tabbedPane

      private final JTabbedPane tabbedPane
    • variantBox

      private final JComboBox variantBox
    • variantVector

      private final Vector<String> variantVector
    • viewModeBox

      private final JComboBox viewModeBox
    • eventExpiringBox

      private final JComboBox eventExpiringBox
    • serveAtPort

      private int serveAtPort
    • options

      private final Options options
      This is Game's options, which we will modify directly.
    • stOptions

      private final Options stOptions
    • whatNextManager

      private final WhatNextManager whatNextManager
    • byWebClient

      private final boolean byWebClient
    • oldDelay

      private int oldDelay
    • delayLabel

      private final JLabel delayLabel
    • oldLimit

      private int oldLimit
    • timeLimitLabel

      private final JLabel timeLimitLabel
    • saveWindow

      private final SaveWindow saveWindow
    • quitAlreadyTried

      private boolean quitAlreadyTried
  • Constructor Details

  • Method Details

    • actOnVariantChange

      private void actOnVariantChange(int oldMaxPlayers, String newVarName)
    • setRunningOnLabel

      private void setRunningOnLabel(int port)
    • setDelayLabel

      private void setDelayLabel(int delay)
    • setTimeLimitLabel

      private void setTimeLimitLabel(int limit)
    • setupTypeChoices

      private void setupTypeChoices()
    • doOnePlayer

      private void doOnePlayer(int i, Container allPlayersPane)
    • enablePlayers

      private void enablePlayers()
    • addCheckbox

      private void addCheckbox(String optname, Container pane)
    • validateInputs

      private boolean validateInputs()
      Check if values are legal; if yes, caller can start the game.
    • doLoadGame

      private void doLoadGame()
    • doClientDialog

      private void doClientDialog()
    • doRunWebClient

      private void doRunWebClient()
    • doQuit

      private void doQuit()
    • doNewGame

      void doNewGame()
      package privat for unit test case
    • doLoadVariant

      private void doLoadVariant()
    • makeUniqueName

      private String makeUniqueName(String baseName, int i)
    • addVariantToBoxIfNeeded

      private void addVariantToBoxIfNeeded(String varName)
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class Container
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class Container
    • dispose

      public void dispose()
      Overrides:
      dispose in class KFrame
    • setPlayerType

      void setPlayerType(int i, String type)
      Only meant for unit tests
    • getMutexNotified

      public boolean getMutexNotified()