logger.debug("total fill size:" + fillSize);
logger.debug("parent height:" + parentHeight);
logger.debug("parent width:" + parentWidth);
if (horizontal) {//h
for (Node comp : components) {
SimpleLayoutData layoutData = componentMap.get(comp);
if (layoutData == null) {
curSize = comp.prefWidth(USE_PREF_SIZE);
logger.debug("preferred size:" + curSize);
} else if (layoutData.isFixedSize()) {
curSize = layoutData.fixedSize;
logger.debug("fixed size:" + curSize);
} else {
curSize = fillSize * layoutData.fixedPercent / 100;
logger.debug("fill size:" + curSize + ", percent:" + layoutData.fixedPercent);
}
comp.relocate(x, y);
comp.resize(curSize, parentHeight);
x += curSize;
}
} else {//v
for (Node comp : components) {
SimpleLayoutData layoutData = componentMap.get(comp);
if (layoutData == null) {
curSize = comp.prefHeight(USE_PREF_SIZE);
logger.debug("preferred size:" + curSize);
} else if (layoutData.isFixedSize()) {
curSize = layoutData.fixedSize;
logger.debug("fixed size:" + curSize);
} else {
curSize = fillSize * layoutData.fixedPercent / 100;
logger.debug("fill size:" + curSize + ", percent:" + layoutData.fixedPercent);