megamek.client.ui.swing.widget
Class PMAreasGroup

java.lang.Object
  extended by megamek.client.ui.swing.widget.PMAreasGroup
All Implemented Interfaces:
PMElement

public class PMAreasGroup
extends java.lang.Object
implements PMElement

PMAreasGroup allows to group handle PicMap elements as single entity.


Constructor Summary
PMAreasGroup()
           
 
Method Summary
 void addArea(PMElement ha)
          Adds area to group
 void drawInto(java.awt.Graphics g)
          Draws all elements in group into specifyed Graphics
 PMElement elementAt(int i)
          Returns element at specific index.
 java.util.Enumeration<PMElement> elements()
          Returns enumeration of all elements in group.
 java.awt.Rectangle getBounds()
          Returns bounding box which includes all elements in group.
 void moveTo(int x, int y)
          Sets bounding box of all elements in group at (x, y)
 void removeAll()
          Removes all elements from group
 boolean removeArea(PMElement ag)
          Remoes area from group
 void setVisible(boolean v)
          Sets visibility of all elements in roup to true or false.
 void translate(int x, int y)
          Translates all elements in group by x, y.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMAreasGroup

public PMAreasGroup()
Method Detail

addArea

public void addArea(PMElement ha)
Adds area to group


removeArea

public boolean removeArea(PMElement ag)
Remoes 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 java.util.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 java.awt.Rectangle getBounds()
Returns bounding box which includes all elements in group.

Specified by:
getBounds in interface PMElement

drawInto

public void drawInto(java.awt.Graphics g)
Draws all elements in group into specifyed Graphics

Specified by:
drawInto in interface PMElement

setVisible

public void setVisible(boolean v)
Sets visibility of all elements in roup to true or false.

Specified by:
setVisible in interface PMElement