Exemplo n.º 1
0
 public boolean mousewheel(Coord c, int amount) {
   for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
     if (!wdg.visible) continue;
     Coord cc = xlate(wdg.c, true);
     if (c.isect(cc, wdg.sz)) {
       if (wdg.mousewheel(c.add(cc.inv()), amount)) {
         return (true);
       }
     }
   }
   return (false);
 }
Exemplo n.º 2
0
  public Resource getcurs(Coord c) {
    Resource ret;

    for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
      if (!wdg.visible) continue;
      Coord cc = xlate(wdg.c, true);
      if (c.isect(cc, wdg.sz)) {
        if ((ret = wdg.getcurs(c.add(cc.inv()))) != null) return (ret);
      }
    }
    try {
      return ((cursor == null) ? null : cursor.get());
    } catch (Loading l) {
      return (null);
    }
  }
Exemplo n.º 3
0
 public Object tooltip(Coord c, Widget prev) {
   if (prev != this) prevtt = null;
   if (tooltip != null) {
     prevtt = null;
     return (tooltip);
   }
   for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
     if (!wdg.visible) continue;
     Coord cc = xlate(wdg.c, true);
     if (c.isect(cc, wdg.sz)) {
       Object ret = wdg.tooltip(c.add(cc.inv()), prevtt);
       if (ret != null) {
         prevtt = wdg;
         return (ret);
       }
     }
   }
   prevtt = null;
   return (tooltip(c, prev == this));
 }