public float getMinWidth () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinWidth() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinWidth() : 0; if (vertical) return Math.max(first, second); return first + style.handle.getMinWidth() + second; }
public float getMinWidth () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinWidth() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinWidth() : 0; if (vertical) return Math.max(first, second); return first + style.handle.getMinWidth() + second; }
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinWidth(); return context == null ? 0 : context.getWidth(); } };
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinWidth(); return context == null ? 0 : context.getWidth(); } };
/** 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); }
prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth();
prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth();
Layout layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else {
Layout layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else {
width = Math.max(width, layout.getMinWidth()); float maxWidth = layout.getMaxWidth(); if (maxWidth > 0 && width > maxWidth) width = maxWidth;
width = Math.max(width, layout.getMinWidth()); float maxWidth = layout.getMaxWidth(); if (maxWidth > 0 && width > maxWidth) width = maxWidth;
width = Math.max(width, layout.getMinWidth()); float maxWidth = layout.getMaxWidth(); if (maxWidth > 0 && width > maxWidth) width = maxWidth;
layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else {
layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else {
width = Math.max(width, layout.getMinWidth()); float maxWidth = layout.getMaxWidth(); if (maxWidth > 0 && width > maxWidth) width = maxWidth;
public float getMinWidth () { float first = firstWidget instanceof Layout ? ((Layout)firstWidget).getMinWidth() : 0; float second = secondWidget instanceof Layout ? ((Layout)secondWidget).getMinWidth() : 0; if (vertical) return Math.max(first, second); return first + style.handle.getMinWidth() + second; }
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getMinWidth(); return context == null ? 0 : context.getWidth(); } };
/** 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); }
prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight()); childMaxWidth = layout.getMaxWidth();