Class KeyBufferer.KBDeckVisitor

java.lang.Object
VASSAL.build.module.map.KeyBufferer.KBDeckVisitor
All Implemented Interfaces:
DeckVisitor, PieceVisitor
Enclosing class:
KeyBufferer

public class KeyBufferer.KBDeckVisitor extends Object implements DeckVisitor
This "Visitor" dispatcher receives a method call for EVERY piece on the map (one by one), and must filter the pieces based on their presence in the appropriate selection bounds and take the correct action vis-a-vis that piece's selection status.
  • Constructor Details

    • KBDeckVisitor

      public KBDeckVisitor(boolean b, boolean c, Rectangle ms)
  • Method Details

    • visitDeck

      public Object visitDeck(Deck d)
      Processes decks from the map. Decks themselves are never band-selected
      Specified by:
      visitDeck in interface DeckVisitor
      Parameters:
      d - a deck
      Returns:
      always null (tells map's accept to keep processing all pieces)
    • visitStack

      public Object visitStack(Stack s)
      Processes stacks from the map
      Specified by:
      visitStack in interface PieceVisitor
      Parameters:
      s - a stack
      Returns:
      always null (tells map's accept to keep processing all pieces)
    • visitDefault

      public Object visitDefault(GamePiece p)
      Handles non-stacked units, including Does Not Stack units. Does Not Stack units deselect normally once selected.
      Specified by:
      visitDefault in interface PieceVisitor
      Parameters:
      p - a piece
      Returns:
      always null (tells map's accept to keep processing all pieces)