Class BoardEditorPanel

All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener, ListSelectionListener, IMapSettingsObserver

See Also:
  • Constructor Details

    • BoardEditorPanel

      public BoardEditorPanel(MegaMekController c)
      Creates and lays out a new Board Editor frame.
  • Method Details

    • retextureHex

      public void retextureHex(Coords c)
      Apply the current Hex to the Board at the specified location.
    • addToHex

      public void addToHex(Coords c)
      Apply the current Hex to the Board at the specified location.
    • addDeploymentZone

      public void addDeploymentZone(Coords c, int deploymentZoneToAdd)
      Apply the current Hex to the Board at the specified location.
    • removeDeploymentZone

      public void removeDeploymentZone(Coords c, int deploymentZoneToRemove)
      Removes the given deployment zone from the Hex at Coord c. Does nothing if c is not on the board or the hex does not have that deployment zone. Removes the deployment zone terrain entirely if no zones are left in that hex.
    • boardNew

      public void boardNew(boolean showDialog)
    • boardResize

      public void boardResize()
    • implantOldBoard

      public Board implantOldBoard(Game game, int west, int north, int east, int south)
    • updateMapSettings

      public void updateMapSettings(MapSettings newSettings)
      Specified by:
      updateMapSettings in interface IMapSettingsObserver
    • loadBoard

      public void loadBoard()
    • loadBoard

      public void loadBoard(File file)
    • itemStateChanged

      public void itemStateChanged(ItemEvent ie)
      Specified by:
      itemStateChanged in interface ItemListener
    • changedUpdate

      public void changedUpdate(DocumentEvent te)
      Specified by:
      changedUpdate in interface DocumentListener
    • insertUpdate

      public void insertUpdate(DocumentEvent event)
      Specified by:
      insertUpdate in interface DocumentListener
    • removeUpdate

      public void removeUpdate(DocumentEvent event)
      Specified by:
      removeUpdate in interface DocumentListener
    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      Specified by:
      actionPerformed in interface ActionListener
    • valueChanged

      public void valueChanged(ListSelectionEvent event)
      Specified by:
      valueChanged in interface ListSelectionListener
    • getFrame

      public JFrame getFrame()
      Returns:
      the frame this is displayed in
    • shouldIgnoreHotKeys

      public boolean shouldIgnoreHotKeys()
      Returns true if a dialog is visible on top of the ClientGUI. For example, the MegaMekController should ignore hotkeys if there is a dialog, like the CommonSettingsDialog, open.
      Returns:
      whether hot keys should be ignored or not