java.lang.Object
snap.geom.Shape
snap.geom.RectBase
snap.geom.Rect
snap.view.ViewProxy<T>
snap.view.ParentViewProxy<T>
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
BoxViewProxy
,ColViewProxy
,RowViewProxy
A ViewProxy that can layout content in the manner of BoxView for any View.
-
Field Summary
Fields inherited from class snap.geom.Shape
_bounds, WIND_EVEN_ODD, WIND_NON_ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getBestHeight
(double aW) Returns the best height for view - accounting for pref/min/max.double
getBestWidth
(double aH) Returns the best width for view - accounting for pref/min/max.double
Returns the MaxX of children with insets.double
Returns the MaxX of last child with insets.double
Returns the MaxY of children with insets.double
Returns the MaxY of last child with insets.int
Returns the number of children that grow height.int
Returns the number of children that grow width.double
getPrefHeight
(double aW) Returns preferred height of layout.protected abstract double
getPrefHeightImpl
(double aW) Returns preferred height of layout.double
getPrefWidth
(double aH) Returns preferred width of layout.protected abstract double
getPrefWidthImpl
(double aH) Returns preferred width of layout.abstract void
Performs Box layout for given parent, child and fill width/height.void
Performs BoxView layout.Methods inherited from class snap.view.ViewProxy
getAlign, getAlignXAsDouble, getAlignYAsDouble, getBorder, getBorderInsets, getChildCount, getChildForClass, getChildren, getChildrenForClass, getContent, getHeight, getInsetsAll, getLeanX, getLeanXAsDouble, getLeanY, getLeanYAsDouble, getMargin, getMaxX, getMaxY, getPadding, getProxies, getProxy, getSpacing, getView, getWidth, isFillHeight, isFillWidth, isGrowHeight, isGrowWidth, isVisible, setAlign, setBorder, setBounds, setBounds, setBoundsInClient, setChildren, setContent, setFillHeight, setFillWidth, setGrowHeight, setGrowWidth, setMargin, setPadding, setSpacing, toString
Methods inherited from class snap.geom.Rect
add, add, addX, addY, clone, contains, contains, contains, contains, containsRect, equals, get, get, getAddRect, getBoundsImpl, getInsetRect, getInsetRect, getInsetRect, getIntersectRect, getOffsetRect, getPathIter, getPerimeterPointForRadial, getPoint, getPointForPosition, getPointForPositionAndSize, getPointForPositionAndSize, getPoints, getRectCenteredInside, getRectForPoints, getRectForString, getScaledRect, getUnionRect, hashCode, intersect, intersectsRect, intersectsRectAndNotEmpty, intersectsShape, intersectsShape, scale, snap, union, union, unionEvenIfEmpty
Methods inherited from class snap.geom.RectBase
copyFor, copyFor, equals, getMidX, getMidY, getMinX, getMinY, getSize, getSvgString, getX, getXY, getY, inset, inset, inset, isEmpty, offset, setCenteredXY, setHeight, setRect, setRect, setSize, setWidth, setX, setXY, setY
Methods inherited from class snap.geom.Shape
addShapes, contains, containsSeg, copyForBounds, crossesSeg, getArcLength, getBounds, getCrossings, getDistance, getFlattenedShape, getFlattenedShape, getNotSelfIntersectingShape, intersectShapes, intersectsSeg, intersectsXY, isClosed, isFlat, isMultiCycle, isSelfIntersecting, isSingleCycle, shapeChanged, subtractShapes
-
Field Details
-
_growWidthCount
protected int _growWidthCount -
_growHeightCount
protected int _growHeightCount
-
-
Constructor Details
-
ParentViewProxy
Constructor for given parent view.
-
-
Method Details
-
getGrowWidthCount
public int getGrowWidthCount()Returns the number of children that grow width. -
getGrowHeightCount
public int getGrowHeightCount()Returns the number of children that grow height. -
getChildrenMaxXLastWithInsets
public double getChildrenMaxXLastWithInsets()Returns the MaxX of last child with insets. -
getChildrenMaxXAllWithInsets
public double getChildrenMaxXAllWithInsets()Returns the MaxX of children with insets. -
getChildrenMaxYLastWithInsets
public double getChildrenMaxYLastWithInsets()Returns the MaxY of last child with insets. -
getChildrenMaxYAllWithInsets
public double getChildrenMaxYAllWithInsets()Returns the MaxY of children with insets. -
getBestWidth
public double getBestWidth(double aH) Returns the best width for view - accounting for pref/min/max.- Overrides:
getBestWidth
in classViewProxy<T extends View>
-
getBestHeight
public double getBestHeight(double aW) Returns the best height for view - accounting for pref/min/max.- Overrides:
getBestHeight
in classViewProxy<T extends View>
-
getPrefWidth
public double getPrefWidth(double aH) Returns preferred width of layout. -
getPrefHeight
public double getPrefHeight(double aW) Returns preferred height of layout. -
layoutView
public void layoutView()Performs BoxView layout. -
getPrefWidthImpl
protected abstract double getPrefWidthImpl(double aH) Returns preferred width of layout. -
getPrefHeightImpl
protected abstract double getPrefHeightImpl(double aW) Returns preferred height of layout. -
layoutProxy
public abstract void layoutProxy()Performs Box layout for given parent, child and fill width/height.
-