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 TypeMethodDescriptionvoid
addLayoutChild
(RMShape aChild) Override to start listening to property changes.clone()
Standard clone implementation.protected double
computePrefHeight
(double aWidth) Returns the preferred with of the parent.protected double
computePrefWidth
(double aHeight) Override to send to SnapLayout.protected void
Override to send to SnapLayout.void
propertyChange
(PropertyChangeEvent anEvent) Called to revalidate when shape bounds change.void
removeLayoutChild
(RMShape aChild) Override to stop listening to property changes.void
reset()
Update LayoutInfo for all children.void
setParent
(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:
setParent
in classRMShapeLayout
-
layoutChildren
protected void layoutChildren()Override to send to SnapLayout.- Overrides:
layoutChildren
in classRMShapeLayout
-
computePrefWidth
protected double computePrefWidth(double aHeight) Override to send to SnapLayout.- Overrides:
computePrefWidth
in classRMShapeLayout
-
computePrefHeight
protected double computePrefHeight(double aWidth) Description copied from class:RMShapeLayout
Returns the preferred with of the parent.- Overrides:
computePrefHeight
in classRMShapeLayout
-
clone
Standard clone implementation.- Overrides:
clone
in classRMShapeLayout
-
addLayoutChild
Override to start listening to property changes.- Overrides:
addLayoutChild
in classRMShapeLayout
-
removeLayoutChild
Override to stop listening to property changes.- Overrides:
removeLayoutChild
in classRMShapeLayout
-
reset
public void reset()Update LayoutInfo for all children. -
propertyChange
Called to revalidate when shape bounds change.- Specified by:
propertyChange
in interfacePropertyChangeListener
-