Package com.inductiveautomation.rm.shape
Class RMSpringLayout
- java.lang.Object
-
- com.inductiveautomation.rm.shape.RMShapeLayout
-
- com.inductiveautomation.rm.shape.RMSpringLayout
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.lang.Cloneable,java.util.EventListener
- Direct Known Subclasses:
RMTableRowLayout
public class RMSpringLayout extends RMShapeLayout implements java.beans.PropertyChangeListener
Handles code for laying out shape children with springs and struts.
-
-
Constructor Summary
Constructors Constructor Description RMSpringLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLayoutChild(RMShape aChild)Override to start listening to property changes.RMSpringLayoutclone()Standard clone implementation.protected doublecomputePrefHeight(double aWidth)Returns the preferred with of the parent.protected doublecomputePrefWidth(double aHeight)Override to send to SnapLayout.protected voidlayoutChildren()Override to send to SnapLayout.voidpropertyChange(java.beans.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
-
-
-
-
Method Detail
-
setParent
public void setParent(RMParentShape aParent)
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
public RMSpringLayout clone()
Standard clone implementation.- Overrides:
clonein classRMShapeLayout
-
addLayoutChild
public void addLayoutChild(RMShape aChild)
Override to start listening to property changes.- Overrides:
addLayoutChildin classRMShapeLayout
-
removeLayoutChild
public void removeLayoutChild(RMShape aChild)
Override to stop listening to property changes.- Overrides:
removeLayoutChildin classRMShapeLayout
-
reset
public void reset()
Update LayoutInfo for all children.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Called to revalidate when shape bounds change.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
-