public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getPrefWidth(); return context == null ? 0 : context.getWidth(); } };
public float get (Actor context) { if (context instanceof Layout) return ((Layout)context).getPrefWidth(); return context == null ? 0 : context.getWidth(); } };
@Override public float getPrefWidth () { float first = firstWidget == null ? 0 : (firstWidget instanceof Layout ? ((Layout)firstWidget).getPrefWidth() : firstWidget.getWidth()); float second = secondWidget == null ? 0 : (secondWidget instanceof Layout ? ((Layout)secondWidget).getPrefWidth() : secondWidget.getWidth()); if (vertical) return Math.max(first, second); return first + style.handle.getMinWidth() + second; }
@Override public float getPrefWidth () { float first = firstWidget == null ? 0 : (firstWidget instanceof Layout ? ((Layout)firstWidget).getPrefWidth() : firstWidget.getWidth()); float second = secondWidget == null ? 0 : (secondWidget instanceof Layout ? ((Layout)secondWidget).getPrefWidth() : secondWidget.getWidth()); if (vertical) return Math.max(first, second); return first + style.handle.getMinWidth() + second; }
public float getPrefWidth () { if (widget instanceof Layout) { float width = ((Layout)widget).getPrefWidth(); if (style.background != null) width += style.background.getLeftWidth() + style.background.getRightWidth(); if (forceScrollY) { float scrollbarWidth = 0; if (style.vScrollKnob != null) scrollbarWidth = style.vScrollKnob.getMinWidth(); if (style.vScroll != null) scrollbarWidth = Math.max(scrollbarWidth, style.vScroll.getMinWidth()); width += scrollbarWidth; } return width; } return 150; }
public float getPrefWidth () { if (widget instanceof Layout) { float width = ((Layout)widget).getPrefWidth(); if (style.background != null) width += style.background.getLeftWidth() + style.background.getRightWidth(); if (forceScrollY) { float scrollbarWidth = 0; if (style.vScrollKnob != null) scrollbarWidth = style.vScrollKnob.getMinWidth(); if (style.vScroll != null) scrollbarWidth = Math.max(scrollbarWidth, style.vScroll.getMinWidth()); width += scrollbarWidth; } return width; } return 150; }
if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth());
if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); minWidth = Math.max(minWidth, layout.getMinWidth());
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); } }
if (child instanceof Layout) { Layout layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth += layout.getPrefWidth(); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); } else {
if (child instanceof Layout) { Layout layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight(); if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth += layout.getPrefWidth(); prefHeight = Math.max(prefHeight, layout.getPrefHeight()); } else {
if (child instanceof Layout) { Layout layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight += layout.getPrefHeight(); } else {
if (child instanceof Layout) { Layout layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight()); if (child instanceof Layout) { Layout layout = (Layout)child; prefWidth = Math.max(prefWidth, layout.getPrefWidth()); prefHeight += layout.getPrefHeight(); } else {
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); if (height > groupHeight) height = Math.max(groupHeight, layout.getMinHeight());
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else {
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); if (width > groupWidth) width = Math.max(groupWidth, layout.getMinWidth()); height = layout.getPrefHeight();
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else {
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else {
if (child instanceof Layout) { layout = (Layout)child; width = layout.getPrefWidth(); height = layout.getPrefHeight(); } else {