public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getPrefHeight(); return context == null ? 0 : context.getHeight(); } };
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getPrefHeight(); return context == null ? 0 : context.getHeight(); } };
@Override public float getPrefHeight () { float first = firstWidget == null ? 0 : (firstWidget instanceof Layout ? ((Layout)firstWidget).getPrefHeight() : firstWidget.getHeight()); float second = secondWidget == null ? 0 : (secondWidget instanceof Layout ? ((Layout)secondWidget).getPrefHeight() : secondWidget.getHeight()); if (!vertical) return Math.max(first, second); return first + style.handle.getMinHeight() + second; }
@Override public float getPrefHeight () { float first = firstWidget == null ? 0 : (firstWidget instanceof Layout ? ((Layout)firstWidget).getPrefHeight() : firstWidget.getHeight()); float second = secondWidget == null ? 0 : (secondWidget instanceof Layout ? ((Layout)secondWidget).getPrefHeight() : secondWidget.getHeight()); if (!vertical) return Math.max(first, second); return first + style.handle.getMinHeight() + second; }
public float getPrefHeight () { if (widget instanceof Layout) { float height = ((Layout)widget).getPrefHeight(); if (style.background != null) height += style.background.getTopHeight() + style.background.getBottomHeight(); if (forceScrollX) { float scrollbarHeight = 0; if (style.hScrollKnob != null) scrollbarHeight = style.hScrollKnob.getMinHeight(); if (style.hScroll != null) scrollbarHeight = Math.max(scrollbarHeight, style.hScroll.getMinHeight()); height += scrollbarHeight; } return height; } return 150; }
public float getPrefHeight () { if (widget instanceof Layout) { float height = ((Layout)widget).getPrefHeight(); if (style.background != null) height += style.background.getTopHeight() + style.background.getBottomHeight(); if (forceScrollX) { float scrollbarHeight = 0; if (style.hScrollKnob != null) scrollbarHeight = style.hScrollKnob.getMinHeight(); if (style.hScroll != null) scrollbarHeight = Math.max(scrollbarHeight, style.hScroll.getMinHeight()); height += scrollbarHeight; } return height; } return 150; }
Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight());
Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth()); minHeight = Math.max(minHeight, layout.getMinHeight());
private void computeSize (Array<Node> nodes, float indent, float plusMinusWidth) { float ySpacing = this.ySpacing; float spacing = iconSpacingLeft + iconSpacingRight; for (int i = 0, n = nodes.size; i < n; i++) { Node node = nodes.get(i); float rowWidth = indent + plusMinusWidth; Actor actor = node.actor; if (actor instanceof Layout) { Layout layout = (Layout)actor; rowWidth += layout.getPrefWidth(); node.height = layout.getPrefHeight(); } else { rowWidth += actor.getWidth(); node.height = actor.getHeight(); } if (node.icon != null) { rowWidth += spacing + node.icon.getMinWidth(); node.height = Math.max(node.height, node.icon.getMinHeight()); } prefWidth = Math.max(prefWidth, rowWidth); prefHeight -= node.height + ySpacing; if (node.expanded) computeSize(node.children, indent + indentSpacing, plusMinusWidth); } }
private void computeSize (Array<Node> nodes, float indent, float plusMinusWidth) { float ySpacing = this.ySpacing; float spacing = iconSpacingLeft + iconSpacingRight; for (int i = 0, n = nodes.size; i < n; i++) { Node node = nodes.get(i); float rowWidth = indent + plusMinusWidth; Actor actor = node.actor; if (actor instanceof Layout) { Layout layout = (Layout)actor; rowWidth += layout.getPrefWidth(); node.height = layout.getPrefHeight(); } else { rowWidth += actor.getWidth(); node.height = actor.getHeight(); } if (node.icon != null) { rowWidth += spacing + node.icon.getMinWidth(); node.height = Math.max(node.height, node.icon.getMinHeight()); } prefWidth = Math.max(prefWidth, rowWidth); prefHeight -= node.height + ySpacing; if (node.expanded) computeSize(node.children, indent + indentSpacing, plusMinusWidth); } }
width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else { width = child.getWidth(); Layout layout = (Layout)child; prefWidth += layout.getPrefWidth(); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); } else { prefWidth += child.getWidth();
Layout layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight += layout.getPrefHeight(); } else { prefWidth = Math.max(prefWidth, child.getWidth());
Layout layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight += layout.getPrefHeight(); } else { prefWidth = Math.max(prefWidth, child.getWidth());
layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else { width = child.getWidth();
width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else { width = child.getWidth();
layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else { width = child.getWidth();
layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else { width = child.getWidth();
layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); } else {
layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else { width = child.getWidth();
width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); } else { width = child.getWidth();