Class PMAreasGroup

java.lang.Object
megamek.client.ui.widget.picmap.PMAreasGroup
All Implemented Interfaces:
PMElement

public class PMAreasGroup extends Object implements PMElement
PMAreasGroup allows to group handle PicMap elements as single entity.
  • Constructor Details

    • PMAreasGroup

      public PMAreasGroup()
  • Method Details

    • addArea

      public void addArea(PMElement ha)
      Adds area to group
    • removeArea

      public boolean removeArea(PMElement ag)
      Removes area from group
    • removeAll

      public void removeAll()
      Removes all elements from group
    • elementAt

      public PMElement elementAt(int i)
      Returns element at specific index.
    • elements

      public Enumeration<PMElement> elements()
      Returns enumeration of all elements in group.
    • translate

      public void translate(int x, int y)
      Translates all elements in group by x, y.
      Specified by:
      translate in interface PMElement
    • moveTo

      public void moveTo(int x, int y)
      Sets bounding box of all elements in group at (x, y)
    • getBounds

      public Rectangle getBounds()
      Returns bounding box which includes all elements in group.
      Specified by:
      getBounds in interface PMElement
      Returns:
      bounding box of element.
    • drawInto

      public void drawInto(Graphics g)
      Draws all elements in group into specified Graphics
      Specified by:
      drawInto in interface PMElement
    • setVisible

      public void setVisible(boolean v)
      Sets visibility of all elements in the group to true or false.
      Specified by:
      setVisible in interface PMElement