int availableBandHeight = c.getHeight();
int availableWidth = c.getWidth();
if (selectedTask.getBandCount() > 0) {
RibbonBandResizeSequencingPolicy resizeSequencingPolicy = selectedTask
.getResizeSequencingPolicy();
resizeSequencingPolicy.reset();
AbstractRibbonBand<?> currToTakeFrom = resizeSequencingPolicy
.next();
while (true) {
// check whether all bands have the current resize
// policy as their last (most restrictive) registered policy