Search in sources :

Example 1 with UnitValue

use of com.codename1.ui.layouts.mig.UnitValue in project CodenameOne by codenameone.

the class MigLayout method constrain.

private int constrain(ContainerWrapper parent, int winSize, int prefSize, BoundSize constrain) {
    if (constrain == null) {
        return winSize;
    }
    int retSize = winSize;
    UnitValue wUV = constrain.getPreferred();
    if (wUV != null) {
        retSize = wUV.getPixels(prefSize, parent, parent);
    }
    retSize = constrain.constrain(retSize, prefSize, parent);
    return constrain.getGapPush() ? Math.max(winSize, retSize) : retSize;
}
Also used : UnitValue(com.codename1.ui.layouts.mig.UnitValue)

Aggregations

UnitValue (com.codename1.ui.layouts.mig.UnitValue)1