Пример #1
0
  protected void adjustAnaStatusWindow(
      GuiSubitemTestObject table, GuiSubitemTestObject gsto, int xoffset, int yoffset) {
    int offx = 1, offy = 1;
    Rectangle trec = table.getScreenRectangle();
    Rectangle tree = gsto.getScreenRectangle();
    int x, y;

    x = tree.width + offx;
    if (xoffset >= 0 && trec.width != xoffset) {
      xoffset = xoffset - trec.width;
      y = (int) (tree.height / 2);
      gsto.hover(atPoint(x, y));
      gsto.dragToScreenPoint(atPoint(x, y), atPoint(tree.x + x + xoffset, tree.y + y));
      logTAFInfo("Window size ajusted with x offset '" + xoffset + "'");
    }
    //		if(yoffset!=0&&(Math.abs(trec.height-Math.abs(yoffset))>5)){
    if (yoffset >= 0 && trec.height != yoffset) {
      yoffset = yoffset - trec.height;
      y = tree.height + offy;
      logTAFDebug(
          "Point to adjust win from : ("
              + (tree.x + x)
              + ","
              + (tree.y + y)
              + ") to : ("
              + (tree.x + x)
              + ","
              + (tree.y + y - yoffset)
              + ")");
      gsto.hover(atPoint(x, y));
      gsto.dragToScreenPoint(atPoint(x, y), atPoint(tree.x + x, tree.y + y - yoffset));
      logTAFInfo("Window size ajusted with y offset '" + yoffset + "'");
    }
  }