java.lang.Object
snap.geom.Shape
snap.geom.RectBase
snap.geom.Rect
snap.view.ViewProxy<T>
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ParentViewProxy
This class represents a view for the purpose of layout.
-
Field Summary
Fields inherited from class snap.geom.Shape
_bounds, WIND_EVEN_ODD, WIND_NON_ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
Returns the alignment.double
Returns the align x factor.double
Returns the align y factor.double
getBestHeight
(double aW) Returns the best height.double
getBestWidth
(double aH) Returns the best width.Returns the border.Returns the border insets.int
Returns the number of children.getChildForClass
(Class<E> aClass) Returns the child for given component class.ViewProxy<?>[]
Returns the children.getChildrenForClass
(Class<E> aClass) Returns the children for given component class.ViewProxy<?>
Returns the content.double
Returns the height.Returns the insets.getLeanX()
Returns the LeanX.double
Returns the lean x factor.getLeanY()
Returns the LeanY.double
Returns the lean y factor.Returns the margin.double
getMaxX()
Returns the Max X.double
getMaxY()
Returns the Max Y.Returns the padding.static ViewProxy<?>[]
getProxies
(View... theViews) Returns an array of proxies for given array of views.static ViewProxy<?>
Returns a proxy for given view.double
Returns spacing.getView()
Returns the view.double
getWidth()
Returns the width.boolean
Returns whether view fills height.boolean
Returns whether view fills width.boolean
Returns whether view grows height.boolean
Returns whether view grows width.boolean
Returns whether proxy is visible.void
Sets the alignment.void
Sets the border.void
setBounds
(double aX, double aY, double aW, double aH) Sets the bounds.void
Sets the bounds.void
Sets the bounds back in the client.void
setChildren
(ViewProxy<?>[] theProxies) Returns the children.void
setContent
(ViewProxy<?> aViewProxy) Sets the content.void
setFillHeight
(boolean aValue) Sets whether view fills height.void
setFillWidth
(boolean aValue) Sets whether view fills width.void
setGrowHeight
(boolean aValue) Sets whether view grows height.void
setGrowWidth
(boolean aValue) Sets whether view grows width.void
Sets the margin.void
setPadding
(Insets theIns) Sets the padding.void
setSpacing
(double aValue) Sets spacing.toString()
Standard toString implementation.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
-
Constructor Details
-
ViewProxy
Creates a new ViewProxy for given View.
-
-
Method Details
-
getView
Returns the view. -
getWidth
public double getWidth()Returns the width. -
getHeight
public double getHeight()Returns the height. -
setBounds
Sets the bounds. -
setBounds
public void setBounds(double aX, double aY, double aW, double aH) Sets the bounds. -
getMaxX
public double getMaxX()Returns the Max X. -
getMaxY
public double getMaxY()Returns the Max Y. -
setBoundsInClient
public void setBoundsInClient()Sets the bounds back in the client. -
getContent
Returns the content. -
setContent
Sets the content. -
getChildCount
public int getChildCount()Returns the number of children. -
getChildren
Returns the children. -
setChildren
Returns the children. -
getChildForClass
Returns the child for given component class. -
getChildrenForClass
Returns the children for given component class. -
getBorder
Returns the border. -
setBorder
Sets the border. -
getBorderInsets
Returns the border insets. -
getMargin
Returns the margin. -
setMargin
Sets the margin. -
getPadding
Returns the padding. -
setPadding
Sets the padding. -
getInsetsAll
Returns the insets. -
isVisible
public boolean isVisible()Returns whether proxy is visible. -
getAlign
Returns the alignment. -
setAlign
Sets the alignment. -
getLeanX
Returns the LeanX. -
getLeanY
Returns the LeanY. -
isGrowWidth
public boolean isGrowWidth()Returns whether view grows width. -
setGrowWidth
public void setGrowWidth(boolean aValue) Sets whether view grows width. -
isGrowHeight
public boolean isGrowHeight()Returns whether view grows height. -
setGrowHeight
public void setGrowHeight(boolean aValue) Sets whether view grows height. -
getSpacing
public double getSpacing()Returns spacing. -
setSpacing
public void setSpacing(double aValue) Sets spacing. -
isFillWidth
public boolean isFillWidth()Returns whether view fills width. -
setFillWidth
public void setFillWidth(boolean aValue) Sets whether view fills width. -
isFillHeight
public boolean isFillHeight()Returns whether view fills height. -
setFillHeight
public void setFillHeight(boolean aValue) Sets whether view fills height. -
getBestWidth
public double getBestWidth(double aH) Returns the best width. -
getBestHeight
public double getBestHeight(double aW) Returns the best height. -
getAlignXAsDouble
public double getAlignXAsDouble()Returns the align x factor. -
getAlignYAsDouble
public double getAlignYAsDouble()Returns the align y factor. -
getLeanXAsDouble
public double getLeanXAsDouble()Returns the lean x factor. -
getLeanYAsDouble
public double getLeanYAsDouble()Returns the lean y factor. -
toString
Description copied from class:RectBase
Standard toString implementation. -
getProxy
Returns a proxy for given view. -
getProxies
Returns an array of proxies for given array of views.
-