/** @return Position rectangle with the max layer size */ private Rectangle getMaximumLayerSize() { final int width = gridLayer.getWidth(); final int height = gridLayer.getHeight(); int lastRowPosition = gridLayer.getColumnPositionByX(width - 1); int lastColPosition = gridLayer.getRowPositionByY(height - 1); return new Rectangle(0, 0, lastRowPosition, lastColPosition); }
private void setClientAreaToMaximum() { final Rectangle maxClientArea = new Rectangle(0, 0, gridLayer.getWidth(), gridLayer.getHeight()); gridLayer.setClientAreaProvider( new IClientAreaProvider() { public Rectangle getClientArea() { return maxClientArea; } }); gridLayer.doCommand(new PrintEntireGridCommand()); }