Package com.inductiveautomation.snap.ui
Class FlowLayout<T>
java.lang.Object
com.inductiveautomation.snap.ui.FlowLayout<T>
- All Implemented Interfaces:
Cloneable
A layout that puts children one after another, wrapping when needed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a layout child.clone()
Standard clone implementation.abstract T
Returns the individual child in this line.abstract int
getChildCount
(T aParent) Returns the child count of given parent.abstract double
Returns child height.abstract SPInsets
Returns the insets of the parent.abstract Object
getLayoutInfo
(T aChild) Returns layout info (descriptor) for child.double
getMinHeight
(double aWidth) The min height for layout.double
getMinWidth
(double aHeight) The min width for layout.abstract double
getParentHeight
(T aParent) Returns parent height.abstract double
getParentWidth
(T aParent) Returns parent width.double
getPrefHeight
(double aWidth) The preferred height for layout.abstract double
getPrefHeight
(T aChild, double aValue) Returns child preferred height.double
getPrefWidth
(double aHeight) The preferred width for layout.abstract double
getPrefWidth
(T aChild, double aValue) Returns child preferred width.double
Returns the spacing x.double
Returns the spacing y.abstract double
Returns child width.boolean
getWraps()
Returns whether layout wraps.abstract double
Returns child x.abstract double
Returns child y.void
layoutChildren
(T aParent) Layout children.void
removeChild
(T aChild) Removes a child.abstract void
Set child bounds.abstract void
setLayoutInfo
(T aChild, Object aLI) Sets layout info (descriptor) for child.void
setSpacingX
(double aValue) Sets the spacing x.void
setSpacingY
(double aValue) Sets the spacing y.void
setWraps
(boolean aValue) Sets whether layout wraps.
-
Constructor Details
-
FlowLayout
public FlowLayout()
-
-
Method Details
-
getSpacingX
public double getSpacingX()Returns the spacing x. -
setSpacingX
public void setSpacingX(double aValue) Sets the spacing x. -
getSpacingY
public double getSpacingY()Returns the spacing y. -
setSpacingY
public void setSpacingY(double aValue) Sets the spacing y. -
getWraps
public boolean getWraps()Returns whether layout wraps. -
setWraps
public void setWraps(boolean aValue) Sets whether layout wraps. -
layoutChildren
Layout children. -
getPrefWidth
public double getPrefWidth(double aHeight) The preferred width for layout. -
getPrefHeight
public double getPrefHeight(double aWidth) The preferred height for layout. -
getMinWidth
public double getMinWidth(double aHeight) The min width for layout. -
getMinHeight
public double getMinHeight(double aWidth) The min height for layout. -
addChild
Adds a layout child. -
removeChild
Removes a child. -
getParentWidth
Returns parent width. -
getParentHeight
Returns parent height. -
getChildCount
Returns the child count of given parent. -
getChild
Returns the individual child in this line. -
getInsets
Returns the insets of the parent. -
getLayoutInfo
Returns layout info (descriptor) for child. -
setLayoutInfo
Sets layout info (descriptor) for child. -
getX
Returns child x. -
getY
Returns child y. -
getWidth
Returns child width. -
getHeight
Returns child height. -
setBounds
Set child bounds. -
getPrefWidth
Returns child preferred width. -
getPrefHeight
Returns child preferred height. -
clone
Standard clone implementation.
-