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 TypeMethodDescriptionvoidAdds a layout child.clone()Standard clone implementation.abstract TReturns the individual child in this line.abstract intgetChildCount(T aParent) Returns the child count of given parent.abstract doubleReturns child height.abstract SPInsetsReturns the insets of the parent.abstract ObjectgetLayoutInfo(T aChild) Returns layout info (descriptor) for child.doublegetMinHeight(double aWidth) The min height for layout.doublegetMinWidth(double aHeight) The min width for layout.abstract doublegetParentHeight(T aParent) Returns parent height.abstract doublegetParentWidth(T aParent) Returns parent width.doublegetPrefHeight(double aWidth) The preferred height for layout.abstract doublegetPrefHeight(T aChild, double aValue) Returns child preferred height.doublegetPrefWidth(double aHeight) The preferred width for layout.abstract doublegetPrefWidth(T aChild, double aValue) Returns child preferred width.doubleReturns the spacing x.doubleReturns the spacing y.abstract doubleReturns child width.booleangetWraps()Returns whether layout wraps.abstract doubleReturns child x.abstract doubleReturns child y.voidlayoutChildren(T aParent) Layout children.voidremoveChild(T aChild) Removes a child.abstract voidSet child bounds.abstract voidsetLayoutInfo(T aChild, Object aLI) Sets layout info (descriptor) for child.voidsetSpacingX(double aValue) Sets the spacing x.voidsetSpacingY(double aValue) Sets the spacing y.voidsetWraps(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.
-