Package megamek.client.ui.widget.picmap
Class PMAreasGroup
java.lang.Object
megamek.client.ui.widget.picmap.PMAreasGroup
- All Implemented Interfaces:
PMElement
PMAreasGroup allows to group handle PicMap elements as single entity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds area to groupvoidDraws all elements in group into specified GraphicselementAt(int i) Returns element at specific index.elements()Returns enumeration of all elements in group.Returns bounding box which includes all elements in group.voidmoveTo(int x, int y) Sets bounding box of all elements in group at (x, y)voidRemoves all elements from groupbooleanremoveArea(PMElement ag) Removes area from groupvoidsetVisible(boolean v) Sets visibility of all elements in the group to true or false.voidtranslate(int x, int y) Translates all elements in group by x, y.
-
Constructor Details
-
PMAreasGroup
public PMAreasGroup()
-
-
Method Details
-
addArea
Adds area to group -
removeArea
Removes area from group -
removeAll
public void removeAll()Removes all elements from group -
elementAt
Returns element at specific index. -
elements
Returns enumeration of all elements in group. -
translate
public void translate(int x, int y) Translates all elements in group by x, y. -
moveTo
public void moveTo(int x, int y) Sets bounding box of all elements in group at (x, y) -
getBounds
Returns bounding box which includes all elements in group. -
drawInto
Draws all elements in group into specified Graphics -
setVisible
public void setVisible(boolean v) Sets visibility of all elements in the group to true or false.- Specified by:
setVisiblein interfacePMElement
-