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 void
addLayoutChild(RMShape aChild)
Override to start listening to property changes.RMSpringLayout
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
layoutChildren()
Override to send to SnapLayout.void
propertyChange(java.beans.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
-
-
-
-
Method Detail
-
setParent
public void setParent(RMParentShape aParent)
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
public RMSpringLayout clone()
Standard clone implementation.- Overrides:
clone
in classRMShapeLayout
-
addLayoutChild
public void addLayoutChild(RMShape aChild)
Override to start listening to property changes.- Overrides:
addLayoutChild
in classRMShapeLayout
-
removeLayoutChild
public void removeLayoutChild(RMShape aChild)
Override to stop listening to property changes.- Overrides:
removeLayoutChild
in 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:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-