(int x, int y)
| 90 | } |
| 91 | |
| 92 | public boolean contains(int x, int y) |
| 93 | { |
| 94 | //System.out.println(x+" "+y); |
| 95 | |
| 96 | if( (0 <= x) && (maskImg.getWidth() > x) && |
| 97 | (0 <= y) && (maskImg.getHeight() > y)) |
| 98 | { |
| 99 | if( maskImg.getRGB(x, y) != -1) |
| 100 | { |
| 101 | return true; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // Hack to keep buttons from appearead hovered when changing screens |
| 106 | if(this.mouseOver==true) |
| 107 | { |
| 108 | this.mouseOver = false; |
| 109 | this.repaint(); |
| 110 | } |
| 111 | |
| 112 | return false; |
| 113 | } |
| 114 | |
| 115 | |
| 116 | public void mouseDragged(MouseEvent arg0) |