Exemplo n.º 1
0
 private void onMouseClick(MouseEvent event) {
   Point point = event.getPoint();
   BoundableRenderable r = this.rblock.getRenderable(point);
   if (r != null) {
     Rectangle bounds = r.getBounds();
     r.onMouseClick(event, point.x - bounds.x, point.y - bounds.y);
   }
 }
Exemplo n.º 2
0
 /* (non-Javadoc)
  * @see org.xamjwg.html.renderer.BoundableRenderable#onMouseClick(java.awt.event.MouseEvent, int, int)
  */
 public void onMouseClick(MouseEvent event, int x, int y) {
   Iterator i = this.blocks.iterator();
   while (i.hasNext()) {
     Object r = i.next();
     if (r instanceof BoundableRenderable) {
       BoundableRenderable br = (BoundableRenderable) r;
       Rectangle bounds = br.getBounds();
       if (bounds.contains(x, y)) {
         br.onMouseClick(event, x - bounds.x, y - bounds.y);
       }
     }
   }
 }