public abstract class SpringLayout<T>
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
class |
SpringLayout.SPLayoutInfo
LayoutInfo for SpringLayout.
|
Constructor and Description |
---|
SpringLayout(T aParent)
Creates a new SpringLayout for adapter.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(T aChild,
java.lang.Object aLayoutInfo)
Override to force LayoutInfoX to get set.
|
SpringLayout |
clone()
Standard clone implementation.
|
java.lang.String |
getAutosizing(T aChild)
Returns the autosizing string for child.
|
double |
getBestHeight(T aChild,
double aValue)
Returns child best height.
|
abstract T |
getChild(T aParent,
int anIndex)
Returns the individual child in this line.
|
abstract int |
getChildCount(T aParent)
Returns the child count of given parent.
|
abstract double |
getHeight(T aChild)
Returns child height.
|
abstract SPInsets |
getInsets(T aParent)
Returns the insets of the parent.
|
abstract java.lang.Object |
getLayoutInfo(T aChild)
Returns layout info (descriptor) for child.
|
SpringLayout.SPLayoutInfo |
getLayoutInfoSP(T aChild)
Return LayoutInfo for child.
|
abstract java.lang.Object |
getLayoutInfoX(T aChild)
Returns the internal layout info for a child.
|
double |
getMinHeight(double aWidth)
The min height for layout.
|
abstract double |
getMinHeight(T aChild,
double aValue)
Returns child max height.
|
double |
getMinWidth(double aHeight)
The min width for layout.
|
abstract double |
getMinWidth(T aChild,
double aValue)
Returns child min width.
|
T |
getParent()
Returns the parent.
|
abstract double |
getParentHeight(T aParent)
Returns parent height.
|
abstract double |
getParentWidth(T aParent)
Returns parent width.
|
double |
getPrefHeight(double aWidth)
The preferred height for layout.
|
abstract double |
getPrefHeight(T aChild,
double aValue)
Returns child preferred height.
|
double |
getPrefWidth(double aHeight)
The preferred width for layout.
|
abstract double |
getPrefWidth(T aChild,
double aValue)
Returns child preferred width.
|
abstract double |
getWidth(T aChild)
Returns child width.
|
abstract double |
getX(T aChild)
Returns child x.
|
abstract double |
getY(T aChild)
Returns child y.
|
void |
layoutChildren(T aParent)
Performs layout.
|
void |
removeChild(T aChild)
Override to clear LayoutInfoX.
|
void |
reset()
Update LayoutInfo for all children.
|
abstract void |
setBounds(T aChild,
double anX,
double aY,
double aWidth,
double aHeight)
Set child bounds.
|
abstract void |
setLayoutInfo(T aChild,
java.lang.Object aLI)
Sets layout info (descriptor) for child.
|
abstract void |
setLayoutInfoX(T aChild,
java.lang.Object aLIX)
Sets the internal layout info for a child.
|
void |
setParent(T aParent)
Sets the parent.
|
void |
updateChild(T aChild)
Updates a child if its layout info has changed.
|
public SpringLayout(T aParent)
public T getParent()
public void setParent(T aParent)
public SpringLayout.SPLayoutInfo getLayoutInfoSP(T aChild)
public java.lang.String getAutosizing(T aChild)
public void addChild(T aChild, java.lang.Object aLayoutInfo)
public void removeChild(T aChild)
public void updateChild(T aChild)
public void layoutChildren(T aParent)
public void reset()
public double getMinWidth(double aHeight)
public double getMinHeight(double aWidth)
public double getPrefWidth(double aHeight)
public double getPrefHeight(double aWidth)
public abstract java.lang.Object getLayoutInfoX(T aChild)
public abstract void setLayoutInfoX(T aChild, java.lang.Object aLIX)
public abstract double getParentWidth(T aParent)
public abstract double getParentHeight(T aParent)
public abstract int getChildCount(T aParent)
public abstract T getChild(T aParent, int anIndex)
public abstract java.lang.Object getLayoutInfo(T aChild)
public abstract void setLayoutInfo(T aChild, java.lang.Object aLI)
public abstract double getX(T aChild)
public abstract double getY(T aChild)
public abstract double getWidth(T aChild)
public abstract double getHeight(T aChild)
public abstract void setBounds(T aChild, double anX, double aY, double aWidth, double aHeight)
public abstract double getMinWidth(T aChild, double aValue)
public abstract double getMinHeight(T aChild, double aValue)
public abstract double getPrefWidth(T aChild, double aValue)
public abstract double getPrefHeight(T aChild, double aValue)
public double getBestHeight(T aChild, double aValue)
public SpringLayout clone()
clone
in class java.lang.Object