Class EventViewer

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

final class EventViewer extends KDialog
Event Revealing dialog. It collects all revealed events and displays all or only the recent ones of them.
Author:
Clemens Katzer
  • Field Details

  • Constructor Details

    • EventViewer

      EventViewer(JFrame frame, IOptions options, Client client)
      Inits the dialog, not necessarily displays it.
      Parameters:
      frame - is the parent window frame (MasterBoard)
      options - IOptions reference to the client
      client - The client, needed to ask all kind of info
  • Method Details

    • initExpireTurnsFromOptions

      private void initExpireTurnsFromOptions()
    • getBoolOption

      private boolean getBoolOption(String name, boolean defaultVal)
    • addCheckbox

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

      private void setupGUI()
    • isEventTooOld

      private boolean isEventTooOld(RevealEvent e)
    • isEventRelevant

      private boolean isEventRelevant(RevealEvent e)
    • queueForDisplaying

      private void queueForDisplaying(JPanel eventPanel)
    • queueSignalRemoveAllForDisplaying

      private void queueSignalRemoveAllForDisplaying()
      Remove all pending events, and queue a null event to signal the displayer to remove all from panel first before adding again.
    • displayFromQueue

      private void displayFromQueue()
    • postAddEventActions

      private void postAddEventActions()
    • addEventToEventPane

      private void addEventToEventPane(RevealEvent e)
    • addEventToList

      private void addEventToList(RevealEvent e)
    • triggerDisplaying

      private void triggerDisplaying()
    • addEvent

      public void addEvent(RevealEvent e)
    • updatePanels

      private void updatePanels(boolean forceAll)
    • getActivePlayer

      private Player getActivePlayer()
    • newRollEvent

      private void newRollEvent(int eventType, int roll1, int roll2)
    • newEvent

      private void newEvent(int eventType, Legion legion1, ArrayList<RevealedCreature> rcList, Legion legion2)
    • turnOrPlayerChange

      public void turnOrPlayerChange(int turnNr, Player player)
    • setMulliganOldRoll

      public void setMulliganOldRoll(int roll)
    • tellMovementRoll

      public void tellMovementRoll(int roll)
    • tellEngagement

      public void tellEngagement(Legion attacker, Legion defender, int turnNumber)
    • tellEngagementResults

      public void tellEngagementResults(Legion winner, String method, int turns)
    • newCreatureRevealEvent

      public void newCreatureRevealEvent(int eventType, Legion legion1, CreatureType creature, Legion legion2)
    • newSplitEvent

      public void newSplitEvent(int turnNr, Legion legion1, ArrayList<RevealedCreature> rcList, Legion legion2)
    • revealCreatures

      public void revealCreatures(Legion legion, List<CreatureType> creatureTypes, String reason)
    • revealEngagedCreatures

      public void revealEngagedCreatures(List<CreatureType> creatures, boolean isAttacker, String reason)
    • addCreature

      public void addCreature(Legion legion, CreatureType type, String reason)
    • cancelReinforcement

      public void cancelReinforcement(CreatureType creature, int turn)
    • removeCreature

      public void removeCreature(Legion legion, CreatureType type, String reason)
    • recruitEvent

      public void recruitEvent(Legion legion, CreatureType recruit, List<CreatureType> recruiters, String reason)
    • setCreatureDead

      public void setCreatureDead(BattleUnit battleUnit)
    • undoEvent

      public void undoEvent(int type, Legion parent, Legion child, int turn)
    • purgeOldEvents

      public void purgeOldEvents()
    • cleanup

      public void cleanup()
    • dispose

      public void dispose()
      Overrides:
      dispose in class KDialog
    • setVisibleMaybe

      public void setVisibleMaybe()
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class KDialog