Package com.inductiveautomation.snap.ui
Class FlowLayout<T>
- java.lang.Object
-
- com.inductiveautomation.snap.ui.FlowLayout<T>
-
- All Implemented Interfaces:
java.lang.Cloneable
public abstract class FlowLayout<T> extends java.lang.Object implements java.lang.CloneableA layout that puts children one after another, wrapping when needed.
-
-
Constructor Summary
Constructors Constructor Description FlowLayout()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddChild(T aChild, java.lang.Object aLayoutInfo)Adds a layout child.FlowLayoutclone()Standard clone implementation.abstract TgetChild(T aParent, int anIndex)Returns the individual child in this line.abstract intgetChildCount(T aParent)Returns the child count of given parent.abstract doublegetHeight(T aChild)Returns child height.abstract SPInsetsgetInsets(T aParent)Returns the insets of the parent.abstract java.lang.ObjectgetLayoutInfo(T aChild)Returns layout info (descriptor) for child.doublegetMinHeight(double aWidth)The min height for layout.doublegetMinWidth(double aHeight)The min width for layout.abstract doublegetParentHeight(T aParent)Returns parent height.abstract doublegetParentWidth(T aParent)Returns parent width.doublegetPrefHeight(double aWidth)The preferred height for layout.abstract doublegetPrefHeight(T aChild, double aValue)Returns child preferred height.doublegetPrefWidth(double aHeight)The preferred width for layout.abstract doublegetPrefWidth(T aChild, double aValue)Returns child preferred width.doublegetSpacingX()Returns the spacing x.doublegetSpacingY()Returns the spacing y.abstract doublegetWidth(T aChild)Returns child width.booleangetWraps()Returns whether layout wraps.abstract doublegetX(T aChild)Returns child x.abstract doublegetY(T aChild)Returns child y.voidlayoutChildren(T aParent)Layout children.voidremoveChild(T aChild)Removes a child.abstract voidsetBounds(T aChild, double anX, double aY, double aWidth, double aHeight)Set child bounds.abstract voidsetLayoutInfo(T aChild, java.lang.Object aLI)Sets layout info (descriptor) for child.voidsetSpacingX(double aValue)Sets the spacing x.voidsetSpacingY(double aValue)Sets the spacing y.voidsetWraps(boolean aValue)Sets whether layout wraps.
-
-
-
Method Detail
-
getSpacingX
public double getSpacingX()
Returns the spacing x.
-
setSpacingX
public void setSpacingX(double aValue)
Sets the spacing x.
-
getSpacingY
public double getSpacingY()
Returns the spacing y.
-
setSpacingY
public void setSpacingY(double aValue)
Sets the spacing y.
-
getWraps
public boolean getWraps()
Returns whether layout wraps.
-
setWraps
public void setWraps(boolean aValue)
Sets whether layout wraps.
-
layoutChildren
public void layoutChildren(T aParent)
Layout children.
-
getPrefWidth
public double getPrefWidth(double aHeight)
The preferred width for layout.
-
getPrefHeight
public double getPrefHeight(double aWidth)
The preferred height for layout.
-
getMinWidth
public double getMinWidth(double aHeight)
The min width for layout.
-
getMinHeight
public double getMinHeight(double aWidth)
The min height for layout.
-
addChild
public void addChild(T aChild, java.lang.Object aLayoutInfo)
Adds a layout child.
-
removeChild
public void removeChild(T aChild)
Removes a child.
-
getParentWidth
public abstract double getParentWidth(T aParent)
Returns parent width.
-
getParentHeight
public abstract double getParentHeight(T aParent)
Returns parent height.
-
getChildCount
public abstract int getChildCount(T aParent)
Returns the child count of given parent.
-
getChild
public abstract T getChild(T aParent, int anIndex)
Returns the individual child in this line.
-
getLayoutInfo
public abstract java.lang.Object getLayoutInfo(T aChild)
Returns layout info (descriptor) for child.
-
setLayoutInfo
public abstract void setLayoutInfo(T aChild, java.lang.Object aLI)
Sets layout info (descriptor) for child.
-
getX
public abstract double getX(T aChild)
Returns child x.
-
getY
public abstract double getY(T aChild)
Returns child y.
-
getWidth
public abstract double getWidth(T aChild)
Returns child width.
-
getHeight
public abstract double getHeight(T aChild)
Returns child height.
-
setBounds
public abstract void setBounds(T aChild, double anX, double aY, double aWidth, double aHeight)
Set child bounds.
-
getPrefWidth
public abstract double getPrefWidth(T aChild, double aValue)
Returns child preferred width.
-
getPrefHeight
public abstract double getPrefHeight(T aChild, double aValue)
Returns child preferred height.
-
clone
public FlowLayout clone()
Standard clone implementation.- Overrides:
clonein classjava.lang.Object
-
-