public float getMinHeight () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinHeight() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinHeight() : 0; if (!vertical) return Math.max(first, second); return first + style.handle.getMinHeight() + second; }
public float getMinHeight () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinHeight() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinHeight() : 0; if (!vertical) return Math.max(first, second); return first + style.handle.getMinHeight() + second; }
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinHeight(); return context == null ? 0 : context.getHeight(); } };
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinHeight(); return context == null ? 0 : context.getHeight(); } };
/** Called during layout to clamp the {@link #splitAmount} within the set limits. By default it imposes the limits of the * {@linkplain #getMinSplitAmount() min amount}, {@linkplain #getMaxSplitAmount() max amount}, and min sizes of the children. This * method is internally called in response to layout, so it should not call {@link #invalidate()}. */ protected void clampSplitAmount () { float effectiveMinAmount = minAmount, effectiveMaxAmount = maxAmount; if (vertical){ float availableHeight = getHeight() - style.handle.getMinHeight(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinHeight() / availableHeight, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinHeight() / availableHeight, 1)); } else { float availableWidth = getWidth() - style.handle.getMinWidth(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinWidth() / availableWidth, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinWidth() / availableWidth, 1)); } if (effectiveMinAmount > effectiveMaxAmount) // Locked handle. Average the position. splitAmount = 0.5f * (effectiveMinAmount + effectiveMaxAmount); else splitAmount = Math.max(Math.min(splitAmount, effectiveMaxAmount), effectiveMinAmount); }
/** Called during layout to clamp the {@link #splitAmount} within the set limits. By default it imposes the limits of the * {@linkplain #getMinSplitAmount() min amount}, {@linkplain #getMaxSplitAmount() max amount}, and min sizes of the children. This * method is internally called in response to layout, so it should not call {@link #invalidate()}. */ protected void clampSplitAmount () { float effectiveMinAmount = minAmount, effectiveMaxAmount = maxAmount; if (vertical){ float availableHeight = getHeight() - style.handle.getMinHeight(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinHeight() / availableHeight, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinHeight() / availableHeight, 1)); } else { float availableWidth = getWidth() - style.handle.getMinWidth(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinWidth() / availableWidth, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinWidth() / availableWidth, 1)); } if (effectiveMinAmount > effectiveMaxAmount) // Locked handle. Average the position. splitAmount = 0.5f * (effectiveMinAmount + effectiveMaxAmount); else splitAmount = Math.max(Math.min(splitAmount, effectiveMaxAmount), effectiveMinAmount); }
prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth(); childMaxHeight = layout.getMaxHeight();
prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth(); childMaxHeight = layout.getMaxHeight();
width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { width = child.getWidth();
width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { width = child.getWidth();
height = Math.max(height, layout.getMinHeight()); float maxHeight = layout.getMaxHeight(); if (maxHeight > 0 && height > maxHeight) height = maxHeight;
height = Math.max(height, layout.getMinHeight()); float maxHeight = layout.getMaxHeight(); if (maxHeight > 0 && height > maxHeight) height = maxHeight;
width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { width = child.getWidth();
height = Math.max(height, layout.getMinHeight()); float maxHeight = layout.getMaxHeight(); if (maxHeight > 0 && height > maxHeight) height = maxHeight;
height = Math.max(height, layout.getMinHeight()); float maxHeight = layout.getMaxHeight(); if (maxHeight > 0 && height > maxHeight) height = maxHeight;
width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { width = child.getWidth();
public float getMinHeight () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinHeight() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinHeight() : 0; if (!vertical) return Math.max(first, second); return first + style.handle.getMinHeight() + second; }
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinHeight(); return context == null ? 0 : context.getHeight(); } };
/** Called during layout to clamp the {@link #splitAmount} within the set limits. By default it imposes the limits of the * {@linkplain #getMinSplitAmount() min amount}, {@linkplain #getMaxSplitAmount() max amount}, and min sizes of the children. This * method is internally called in response to layout, so it should not call {@link #invalidate()}. */ protected void clampSplitAmount () { float effectiveMinAmount = minAmount, effectiveMaxAmount = maxAmount; if (vertical){ float availableHeight = getHeight() - style.handle.getMinHeight(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinHeight() / availableHeight, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinHeight() / availableHeight, 1)); } else { float availableWidth = getWidth() - style.handle.getMinWidth(); if (firstWidget instanceof Layout) effectiveMinAmount = Math.max(effectiveMinAmount, Math.min(((Layout)firstWidget).getMinWidth() / availableWidth, 1)); if (secondWidget instanceof Layout) effectiveMaxAmount = Math.min(effectiveMaxAmount, 1 - Math.min(((Layout)secondWidget).getMinWidth() / availableWidth, 1)); } if (effectiveMinAmount > effectiveMaxAmount) // Locked handle. Average the position. splitAmount = 0.5f * (effectiveMinAmount + effectiveMaxAmount); else splitAmount = Math.max(Math.min(splitAmount, effectiveMaxAmount), effectiveMinAmount); }
prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth(); childMaxHeight = layout.getMaxHeight();