viewport.add(this);
return viewport;
}
public Dimension getPreferredSize() {
Grid grid = editor.getGrid();
Dimension size = grid.getSize();
Dimension cell = editor.getCell();
if (vertical) {
return new Dimension(cell.width, (size.height + 1) * cell.height);
} else {
return new Dimension((size.width + 1) * cell.width + 1, cell.height);