return Status.FORCE_COLUMN_BREAK;
default:
return Status.OK;
}
}
final NormalFlowRefArea colArea = (NormalFlowRefArea) area;
switch (breakableNode.traitBreakBefore(area)) {
case PAGE: {
// if first ColumnArea, and empty, return OK
if (colArea.getChildCount() == 0
&& (colArea.siblingIndex() == 0)) {
return Status.OK;
}
return Status.FORCE_PAGE_BREAK;
}
case ODD_PAGE: {
// if first ColumnArea, empty, _and_ in odd page,
// return OK
if (colArea.getChildCount() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 != 0)) {
return Status.OK;
}
return Status.FORCE_PAGE_BREAK_ODD;
}
case EVEN_PAGE: {
// if first ColumnArea, empty, _and_ in even page,
// return OK
if (colArea.getChildCount() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 == 0)) {
return Status.OK;
}
return Status.FORCE_PAGE_BREAK_EVEN;
}
case COLUMN: {
// if ColumnArea is empty return OK
if (colArea.getChildCount() == 0) {
return Status.OK;
}
return Status.FORCE_COLUMN_BREAK;
}
default: {