Package megamek.client.ui.widget.picmap
Class PMSimplePolygonArea
java.lang.Object
megamek.client.ui.widget.picmap.PMSimplePolygonArea
Class for drawing a simple polygon, used to display the polygon areas for different locations on an Entity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface megamek.client.ui.widget.picmap.PMHotArea
MOUSE_CLICK_LEFT, MOUSE_CLICK_RIGHT, MOUSE_DOUBLE_CLICK, MOUSE_DOWN, MOUSE_EXIT, MOUSE_OVER, MOUSE_UP -
Constructor Summary
ConstructorsConstructorDescriptionPMSimplePolygonArea(Polygon p, Color backColor, Color brdColor, Color hiBrdColor, boolean highlight, LocationSelectListener locationSelectListener, int loc) PMSimplePolygonArea(Polygon p, Color backColor, Color brdColor, LocationSelectListener locationSelectListener, int loc) PMSimplePolygonArea(Polygon p, LocationSelectListener locationSelectListener, int loc) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidDraws element into specified Graphics.voidvoidvoidvoidvoidvoidvoidsetCriticalHatch(boolean criticalHatch) Marks the area as having taken a critical hit, drawn as stripes over its fill.voidvoidsetVisible(boolean v) Sets visibility of elementvoidtranslate(int x, int y) Translates element by x and y.
-
Field Details
-
backColor
-
normalBorderColor
-
highlightBorderColor
-
-
Constructor Details
-
PMSimplePolygonArea
-
PMSimplePolygonArea
public PMSimplePolygonArea(Polygon p, Color backColor, Color brdColor, @Nullable LocationSelectListener locationSelectListener, int loc) -
PMSimplePolygonArea
public PMSimplePolygonArea(Polygon p, @Nullable LocationSelectListener locationSelectListener, int loc)
-
-
Method Details
-
translate
public void translate(int x, int y) Description copied from interface:PMElementTranslates element by x and y. -
getBounds
-
drawInto
Description copied from interface:PMElementDraws element into specified Graphics. -
setCriticalHatch
public void setCriticalHatch(boolean criticalHatch) Marks the area as having taken a critical hit, drawn as stripes over its fill. -
setVisible
public void setVisible(boolean v) Description copied from interface:PMElementSets visibility of element- Specified by:
setVisiblein interfacePMElement
-
addActionListener
-
removeActionListener
-
getAreaShape
- Specified by:
getAreaShapein interfacePMHotArea
-
getCursor
-
setCursor
-
onMouseClick
- Specified by:
onMouseClickin interfacePMHotArea
-
onMouseOver
- Specified by:
onMouseOverin interfacePMHotArea
-
onMouseExit
- Specified by:
onMouseExitin interfacePMHotArea
-
onMouseDown
- Specified by:
onMouseDownin interfacePMHotArea
-
onMouseUp
-