Class ConfigPanelManager

java.lang.Object
org.rspeer.game.script.model.ConfigPanelManager

public class ConfigPanelManager extends Object
  • Constructor Details

    • ConfigPanelManager

      public ConfigPanelManager()
  • Method Details

    • setPanels

      public void setPanels(Map<String, ModelPanel> panels, List<org.rspeer.commons.Pair<FieldAnnotationMapping, ModelPanel>> mappings)
    • getPanels

      public Map<String, ModelPanel> getPanels()
    • registerPanel

      public void registerPanel(String fullKey, ModelPanel panel)
    • unregisterPanel

      public void unregisterPanel(String fullKey)
    • setOnAction

      public void setOnAction(String key, ActionListener listener)
    • setOnKey

      public void setOnKey(String key, KeyListener listener)
    • getComponent

      public JComponent getComponent(String key)
      Parameters:
      key - The key of the config
      Returns:
      The component for the given key. For Selector's, this is a JComboBox, for TextField's, this is a JTextField, and for CheckBox's this is a JCheckBox.
    • setVisible

      public void setVisible(String key, boolean visible)
      Parameters:
      key - The key of the config
      visible - true to set the component visible, false otherwise