Class PreferencesWindow

All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

class PreferencesWindow extends KFrame implements ItemListener, ActionListener
  • Field Details

    • FILL_CONSTRAINTS

      private static final GridBagConstraints FILL_CONSTRAINTS
      Gridbag constraints for a vertical filling (use with empty JPanel).
    • SPACER_CONSTRAINTS

      private static final GridBagConstraints SPACER_CONSTRAINTS
      Gridbag constraints for a vertical spacer (use with empty JPanel).
    • CONTROL_CONSTRAINTS

      private static final GridBagConstraints CONTROL_CONSTRAINTS
      Gridbag constraints for the controls itself.
    • SUBPANEL_CONSTRAINTS

      private static final GridBagConstraints SUBPANEL_CONSTRAINTS
      Gridbag constraints for nested panels.
    • options

      private Options options
    • gui

      private final ClientGUI gui
    • prefCheckboxes

      private final Map<String,JCheckBox> prefCheckboxes
    • prefRadioButtons

      private final Map<String,JRadioButton> prefRadioButtons
    • closeButton

      private JButton closeButton
    • lfBox

      private Box lfBox
    • rcModes

      private Box rcModes
    • mcModes

      private Box mcModes
    • nextSplitModes

      private Box nextSplitModes
    • favColorPane

      private JPanel favColorPane
    • activePaneIndex

      private int activePaneIndex
    • favoriteColors

      private List<PlayerColor> favoriteColors
    • colorsLeft

      private List<PlayerColor> colorsLeft
  • Constructor Details

  • Method Details

    • addCheckBox

      private void addCheckBox(Container pane, String name)
    • addCheckBox

      private void addCheckBox(Container pane, String name, boolean enabled, boolean defVal)
    • addRadioButton

      private void addRadioButton(Container cont, ButtonGroup group, String text, String cmd, String current)
    • addButton

      private void addButton(Container cont, String name, ActionListener al)
    • setupGUI

      private void setupGUI()
    • restoreWhichTabActive

      private void restoreWhichTabActive(JTabbedPane tabbedPane)
    • getColorPane

      private JPanel getColorPane()
    • dispose

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

      public void setVisible(boolean val)
      Overrides:
      setVisible in class KFrame
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Specified by:
      itemStateChanged in interface ItemListener
    • saveFavColor

      private void saveFavColor()
    • clearColor

      private void clearColor()
    • unselectColor

      private void unselectColor(JButton button)
    • addColor

      private void addColor(PlayerColor color)
    • selectColor

      private void selectColor()
    • doSomethingWithPickedColor

      public void doSomethingWithPickedColor(PlayerColor color)
    • setCheckBoxValue

      public void setCheckBoxValue(String name, boolean value)
    • setRadioButtonValue

      public void setRadioButtonValue(String name, boolean value)