megamek.client.ui.AWT.widget
Class PMSimplePolygonArea

java.lang.Object
  extended by megamek.client.ui.AWT.widget.PMSimplePolygonArea
All Implemented Interfaces:
PMElement, PMHotArea

public class PMSimplePolygonArea
extends java.lang.Object
implements PMHotArea


Field Summary
 java.awt.Color backColor
           
 java.awt.Color highlightBorderColor
           
 java.awt.Color normalBorderColor
           
 
Fields inherited from interface megamek.client.ui.AWT.widget.PMHotArea
MOUSE_CLICK_LEFT, MOUSE_CLICK_RIGHT, MOUSE_DOUBLE_CLICK, MOUSE_DOWN, MOUSE_EXIT, MOUSE_OVER, MOUSE_UP
 
Constructor Summary
PMSimplePolygonArea(java.awt.Polygon p)
           
PMSimplePolygonArea(java.awt.Polygon p, java.awt.Color backColor, java.awt.Color brdColor)
           
PMSimplePolygonArea(java.awt.Polygon p, java.awt.Color backColor, java.awt.Color brdColor, java.awt.Color hiBrdColor, boolean highlight)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
           
 void drawInto(java.awt.Graphics g)
          Draws element into specifyed Graphics.
 java.awt.Shape getAreaShape()
           
 java.awt.Rectangle getBounds()
          Return bounding box of element.
 java.awt.Cursor getCursor()
           
 void onMouseClick(java.awt.event.MouseEvent e)
           
 void onMouseDown(java.awt.event.MouseEvent e)
           
 void onMouseExit(java.awt.event.MouseEvent e)
           
 void onMouseOver(java.awt.event.MouseEvent e)
           
 void onMouseUp(java.awt.event.MouseEvent e)
           
 void removeActionListener(java.awt.event.ActionListener l)
           
 void setCursor(java.awt.Cursor c)
           
 void setVisible(boolean v)
          Sets visibility of element
 void translate(int x, int y)
          Translates element by x and y.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backColor

public java.awt.Color backColor

normalBorderColor

public java.awt.Color normalBorderColor

highlightBorderColor

public java.awt.Color highlightBorderColor
Constructor Detail

PMSimplePolygonArea

public PMSimplePolygonArea(java.awt.Polygon p,
                           java.awt.Color backColor,
                           java.awt.Color brdColor,
                           java.awt.Color hiBrdColor,
                           boolean highlight)

PMSimplePolygonArea

public PMSimplePolygonArea(java.awt.Polygon p,
                           java.awt.Color backColor,
                           java.awt.Color brdColor)

PMSimplePolygonArea

public PMSimplePolygonArea(java.awt.Polygon p)
Method Detail

translate

public void translate(int x,
                      int y)
Description copied from interface: PMElement
Translates element by x and y.

Specified by:
translate in interface PMElement

getBounds

public java.awt.Rectangle getBounds()
Description copied from interface: PMElement
Return bounding box of element.

Specified by:
getBounds in interface PMElement

drawInto

public void drawInto(java.awt.Graphics g)
Description copied from interface: PMElement
Draws element into specifyed Graphics.

Specified by:
drawInto in interface PMElement

setVisible

public void setVisible(boolean v)
Description copied from interface: PMElement
Sets visibility of element

Specified by:
setVisible in interface PMElement

addActionListener

public void addActionListener(java.awt.event.ActionListener l)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)

getAreaShape

public java.awt.Shape getAreaShape()
Specified by:
getAreaShape in interface PMHotArea

getCursor

public java.awt.Cursor getCursor()
Specified by:
getCursor in interface PMHotArea

setCursor

public void setCursor(java.awt.Cursor c)
Specified by:
setCursor in interface PMHotArea

onMouseClick

public void onMouseClick(java.awt.event.MouseEvent e)
Specified by:
onMouseClick in interface PMHotArea

onMouseOver

public void onMouseOver(java.awt.event.MouseEvent e)
Specified by:
onMouseOver in interface PMHotArea

onMouseExit

public void onMouseExit(java.awt.event.MouseEvent e)
Specified by:
onMouseExit in interface PMHotArea

onMouseDown

public void onMouseDown(java.awt.event.MouseEvent e)
Specified by:
onMouseDown in interface PMHotArea

onMouseUp

public void onMouseUp(java.awt.event.MouseEvent e)
Specified by:
onMouseUp in interface PMHotArea