megamek.client.ui.AWT.widget
Class PMPicArea

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

public class PMPicArea
extends java.lang.Object
implements PMHotArea

Simple rectangle hot are for PicMap component. Show single image when idle and "hoghlite" image when mouse is over this area.


Field Summary
 
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
PMPicArea(java.awt.Image im)
           
PMPicArea(java.awt.Image idle, java.awt.Image active)
           
 
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
 

Constructor Detail

PMPicArea

public PMPicArea(java.awt.Image idle,
                 java.awt.Image active)

PMPicArea

public PMPicArea(java.awt.Image im)
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