Class GUIBattleHex

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class GUIBattleHex extends GUIHex<BattleHex>
Class GUIBattleHex holds GUI info for one battle hex.
Author:
David Ripton, Romain Dolbeau
See Also:
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • map

      private Component map
    • highlightColor

      private static final Color highlightColor
    • neighbors

      private final GUIBattleHex[] neighbors
      Stores the neighboring views. This parallels the neighbors field in BattleHex, just on the view side. TODO check if we can avoid this
    • scale

      private int scale
    • cx

      private int cx
    • cy

      private int cy
    • imagePostfix

      private static String imagePostfix
  • Constructor Details

    • GUIBattleHex

      public GUIBattleHex(int cx, int cy, int scale, Component map, int xCoord, int yCoord)
    • GUIBattleHex

      public GUIBattleHex(int xCoord, int yCoord)
  • Method Details

    • setVertexZeroLocation

      public void setVertexZeroLocation(int cx, int cy)
    • setWidth

      public void setWidth(int width)
    • makeHexagon

      private void makeHexagon()
    • getInnerHexagon

      private GeneralPath getInnerHexagon()
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent
    • repaint

      public void repaint()
      Overrides:
      repaint in class Component
    • drawHexside

      void drawHexside(Graphics2D g2, double vx1, double vy1, double vx2, double vy2, char hexsideType)
    • innerContains

      public boolean innerContains(Point point)
    • loadOneOverlay

      private static Image loadOneOverlay(String name, int width, int height)
    • paintOverlay

      public boolean paintOverlay(Graphics2D g)
    • getNeighbor

      public GUIBattleHex getNeighbor(int i)
    • setNeighbor

      public void setNeighbor(int i, GUIBattleHex hex)