Package com.inductiveautomation.snap.ui
Class SpringLayout<T>
java.lang.Object
com.inductiveautomation.snap.ui.SpringLayout<T>
- All Implemented Interfaces:
- Cloneable
A class to layout children using springs/struts settings.
 Settings are described with strings using '~' (spring) and '-' (struts), eg.: "-~-,-~-" (horizontal,vertical).
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidOverride to force LayoutInfoX to get set.clone()Standard clone implementation.getAutosizing(T aChild) Returns the autosizing string for child.doublegetBestHeight(T aChild, double aValue) Returns child best height.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.getLayoutInfoSP(T aChild) Return LayoutInfo for child.abstract ObjectgetLayoutInfoX(T aChild) Returns the internal layout info for a child.doublegetMinHeight(double aWidth) The min height for layout.abstract doublegetMinHeight(T aChild, double aValue) Returns child max height.doublegetMinWidth(double aHeight) The min width for layout.abstract doublegetMinWidth(T aChild, double aValue) Returns child min width.Returns the parent.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.abstract doubleReturns child width.abstract doubleReturns child x.abstract doubleReturns child y.voidlayoutChildren(T aParent) Performs layout.voidremoveChild(T aChild) Override to clear LayoutInfoX.voidreset()Update LayoutInfo for all children.abstract voidSet child bounds.abstract voidsetLayoutInfo(T aChild, Object aLI) Sets layout info (descriptor) for child.abstract voidsetLayoutInfoX(T aChild, Object aLIX) Sets the internal layout info for a child.voidSets the parent.voidupdateChild(T aChild) Updates a child if its layout info has changed.
- 
Constructor Details- 
SpringLayoutCreates a new SpringLayout for adapter.
 
- 
- 
Method Details- 
getParentReturns the parent.
- 
setParentSets the parent.
- 
getLayoutInfoSPReturn LayoutInfo for child.
- 
getAutosizingReturns the autosizing string for child.
- 
addChildOverride to force LayoutInfoX to get set.
- 
removeChildOverride to clear LayoutInfoX.
- 
updateChildUpdates a child if its layout info has changed.
- 
layoutChildrenPerforms layout.
- 
resetpublic void reset()Update LayoutInfo for all children.
- 
getMinWidthpublic double getMinWidth(double aHeight) The min width for layout.
- 
getMinHeightpublic double getMinHeight(double aWidth) The min height for layout.
- 
getPrefWidthpublic double getPrefWidth(double aHeight) The preferred width for layout.
- 
getPrefHeightpublic double getPrefHeight(double aWidth) The preferred height for layout.
- 
getLayoutInfoXReturns the internal layout info for a child.
- 
setLayoutInfoXSets the internal layout info for a child.
- 
getParentWidthReturns parent width.
- 
getParentHeightReturns parent height.
- 
getChildCountReturns the child count of given parent.
- 
getChildReturns the individual child in this line.
- 
getInsetsReturns the insets of the parent.
- 
getLayoutInfoReturns layout info (descriptor) for child.
- 
setLayoutInfoSets layout info (descriptor) for child.
- 
getXReturns child x.
- 
getYReturns child y.
- 
getWidthReturns child width.
- 
getHeightReturns child height.
- 
setBoundsSet child bounds.
- 
getMinWidthReturns child min width.
- 
getMinHeightReturns child max height.
- 
getPrefWidthReturns child preferred width.
- 
getPrefHeightReturns child preferred height.
- 
getBestHeightReturns child best height.
- 
cloneStandard clone implementation.
 
-