Example #1
0
 protected void todoAddControls(Container parent, Cell thisCell) {
   Table tb = thisCell.split(2, 1);
   KDSplitPane sep = new KDSplitPane(1);
   sep.setLeftComponent(_tree.getTreeUI());
   sep.setRightComponent(_rightPanel);
   sep.setDividerLocation(220);
   parent.add(sep, tb.cell(0));
   if (_isShowSaveAsDefault) {
     _chkSaveAsDefault =
         new KDCheckBox(
             MultiLanguageUtil.getMLS(
                 "ui.NoteFileDialogEx.saveAsDefault", "将本次选中保存为缺省模板(可在“系统平台-套打-套打配置”中更改)"));
     //   parent.add(_chkSaveAsDefault, tb.cell(1));
   }
 }
  protected ContainingCell findContainingCell(Cell cell, float x, float y) {
    if (!cell.intersects(x, y)) return null;

    if (cell.m1 - cell.m0 <= this.cellSize && cell.n1 - cell.n0 <= this.cellSize)
      return this.checkContainment(x, y, cell);

    Cell[] kids = cell.children != null ? cell.children : (Cell[]) this.kidCache.getObject(cell);
    if (kids == null) {
      kids = cell.split(cell.m0, cell.m1, cell.n0, cell.n1);
      for (Cell child : kids) {
        child.computeExtremesFromLocations(this.gridSize, this.xs, this.ys);
      }
      if (cell.children == null) this.kidCache.add(cell, kids, 4 * kids[0].getSizeInBytes());
    }

    for (Cell t : kids) {
      ContainingCell cellFound = this.findContainingCell(t, x, y);
      if (cellFound != null) return cellFound;
    }

    return null;
  }