Package com.inductiveautomation.rm.shape
Class RMSpringLayout
java.lang.Object
com.inductiveautomation.rm.shape.RMShapeLayout
com.inductiveautomation.rm.shape.RMSpringLayout
- All Implemented Interfaces:
PropertyChangeListener,Cloneable,EventListener
- Direct Known Subclasses:
RMTableRowLayout
Handles code for laying out shape children with springs and struts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutChild(RMShape aChild) Override to start listening to property changes.clone()Standard clone implementation.protected doublecomputePrefHeight(double aWidth) Returns the preferred with of the parent.protected doublecomputePrefWidth(double aHeight) Override to send to SnapLayout.protected voidOverride to send to SnapLayout.voidpropertyChange(PropertyChangeEvent anEvent) Called to revalidate when shape bounds change.voidremoveLayoutChild(RMShape aChild) Override to stop listening to property changes.voidreset()Update LayoutInfo for all children.voidsetParent(RMParentShape aParent) Override to send to SnapLayout.Methods inherited from class com.inductiveautomation.rm.shape.RMShapeLayout
getParent
-
Constructor Details
-
RMSpringLayout
public RMSpringLayout()
-
-
Method Details
-
setParent
Override to send to SnapLayout.- Overrides:
setParentin classRMShapeLayout
-
layoutChildren
protected void layoutChildren()Override to send to SnapLayout.- Overrides:
layoutChildrenin classRMShapeLayout
-
computePrefWidth
protected double computePrefWidth(double aHeight) Override to send to SnapLayout.- Overrides:
computePrefWidthin classRMShapeLayout
-
computePrefHeight
protected double computePrefHeight(double aWidth) Description copied from class:RMShapeLayoutReturns the preferred with of the parent.- Overrides:
computePrefHeightin classRMShapeLayout
-
clone
Standard clone implementation.- Overrides:
clonein classRMShapeLayout
-
addLayoutChild
Override to start listening to property changes.- Overrides:
addLayoutChildin classRMShapeLayout
-
removeLayoutChild
Override to stop listening to property changes.- Overrides:
removeLayoutChildin classRMShapeLayout
-
reset
public void reset()Update LayoutInfo for all children. -
propertyChange
Called to revalidate when shape bounds change.- Specified by:
propertyChangein interfacePropertyChangeListener
-