TableRowHandle tableRowHandle = (TableRowHandle) target;
tableRowHandle.removeAll();
tableRowHandle.setupRows();
List children = target.getChildren();
ITableEditAdapter tableAdapter = TableEditHelper
.getTableEditAdapter(this._tablePart);
if (tableAdapter == null) {
return;
}
for (int i = 0, size = children.size(); i < size; i++) {
Rectangle rect = null;
IFigure child = (IFigure) children.get(i);
if (child instanceof RowHandle) {
RowHandle rowHandle = (RowHandle) child;
int rowIndex = rowHandle.getIndex();
rect = new Rectangle(0, tableAdapter.getRowStart(rowIndex),
TableEditConst.WIDTH, tableAdapter
.getRowHeight(rowIndex));
} else if (child instanceof RowResizeHandle) {
RowResizeHandle resizeHandle = (RowResizeHandle) child;
int rowIndex = resizeHandle.getRowIndex();
rect = new Rectangle(0, tableAdapter
.getRowResizeStart(rowIndex), TableEditConst.WIDTH,
tableAdapter.getRowResizeWidth());
} else {
// should not happen.
}
if (rect != null) {
child.setBounds(rect);