Class PlayerTooltip


  • public class PlayerTooltip
    extends java.lang.Object
    Displays information about a player.

    This is to be shown when an entry in the PlayerList is hovered.

    Author:
    Luna Otte
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayerTooltip​(sag.SAGPanel panel, java.util.Collection<CableConfig> cableConfig)
      Creates a new PlayerTooltip
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void hide()
      Hides the tooltip
      void show​(java.lang.String name, java.util.List<Contract> contracts, java.util.HashMap<java.lang.String,​java.lang.Integer> cableAmounts)
      Shows the tooltip
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlayerTooltip

        public PlayerTooltip​(sag.SAGPanel panel,
                             java.util.Collection<CableConfig> cableConfig)
        Creates a new PlayerTooltip
        Parameters:
        panel - The panel to attach it to
        cableConfig - The cable config of the game
    • Method Detail

      • hide

        public void hide()
        Hides the tooltip
      • show

        public void show​(java.lang.String name,
                         java.util.List<Contract> contracts,
                         java.util.HashMap<java.lang.String,​java.lang.Integer> cableAmounts)
        Shows the tooltip
        Parameters:
        name - The name of the current player
        contracts - Their contracts
        cableAmounts - Their cable inventory