Package snap.view
Class ViewList
java.lang.Object
snap.view.ViewList
A class to manage a list of views.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds the given view to end of this list.protected void
Adds the given view to this list at given index.get
(int anIndex) Returns the view at the given index.View[]
getAll()
Returns the contained views as an array.getFirst()
Returns the last view of this list.<T extends View>
TgetHitView
(View aView, Class<T> aClass, double anInset) Returns the first view of given class (optional) intersecting given view.getLast()
Returns the last view of this list.View[]
Returns the managed children.Returns the child with given name.getViewAt
(double aX, double aY) Returns the view at given point.Returns the view at given point.<T extends View>
TReturns the first view of given class (optional) hit by given shape, excluding given view (optional).<T extends View>
T[]getViewsIntersectingShape
(Shape aShape, Class<T> aClass) Returns the views of given class (optional) hit by given shape.int
Returns the index of the given child in this node's children list.protected View
remove
(int anIndex) Remove's the view at the given index from this list.protected int
Removes the given view from this list.protected void
Removes all children from this node (in reverse order).protected void
Sets views to given list.int
size()
Returns the number of views in this list.
-
Field Details
-
_managed
-
-
Constructor Details
-
ViewList
public ViewList()
-
-
Method Details
-
size
public int size()Returns the number of views in this list. -
get
Returns the view at the given index. -
getAll
Returns the contained views as an array. -
add
Adds the given view to end of this list. -
add
Adds the given view to this list at given index. -
remove
Remove's the view at the given index from this list. -
remove
Removes the given view from this list. -
removeAll
protected void removeAll()Removes all children from this node (in reverse order). -
setAll
Sets views to given list. -
getView
Returns the child with given name. -
indexOf
Returns the index of the given child in this node's children list. -
getFirst
Returns the last view of this list. -
getLast
Returns the last view of this list. -
getViewAt
Returns the view at given point. -
getViewAt
Returns the view at given point. -
getViewAt
Returns the first view of given class (optional) hit by given shape, excluding given view (optional). -
getViewsIntersectingShape
Returns the views of given class (optional) hit by given shape. -
getHitView
Returns the first view of given class (optional) intersecting given view. -
getManaged
Returns the managed children.
-