Class FlowLayout<T>

java.lang.Object
com.inductiveautomation.snap.ui.FlowLayout<T>
All Implemented Interfaces:
Cloneable

public abstract class FlowLayout<T> extends Object implements Cloneable
A layout that puts children one after another, wrapping when needed.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addChild(T aChild, Object aLayoutInfo)
    Adds a layout child.
    Standard clone implementation.
    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 Object
    getLayoutInfo(T aChild)
    Returns layout info (descriptor) for child.
    double
    getMinHeight(double aWidth)
    The min height for layout.
    double
    getMinWidth(double aHeight)
    The min width for layout.
    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.
    double
    Returns the spacing x.
    double
    Returns the spacing y.
    abstract double
    getWidth(T aChild)
    Returns child width.
    boolean
    Returns whether layout wraps.
    abstract double
    getX(T aChild)
    Returns child x.
    abstract double
    getY(T aChild)
    Returns child y.
    void
    layoutChildren(T aParent)
    Layout children.
    void
    removeChild(T aChild)
    Removes a child.
    abstract void
    setBounds(T aChild, double anX, double aY, double aWidth, double aHeight)
    Set child bounds.
    abstract void
    setLayoutInfo(T aChild, Object aLI)
    Sets layout info (descriptor) for child.
    void
    setSpacingX(double aValue)
    Sets the spacing x.
    void
    setSpacingY(double aValue)
    Sets the spacing y.
    void
    setWraps(boolean aValue)
    Sets whether layout wraps.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlowLayout

      public FlowLayout()
  • Method Details

    • 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, 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.
    • getInsets

      public abstract SPInsets getInsets(T aParent)
      Returns the insets of the parent.
    • getLayoutInfo

      public abstract Object getLayoutInfo(T aChild)
      Returns layout info (descriptor) for child.
    • setLayoutInfo

      public abstract void setLayoutInfo(T aChild, 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:
      clone in class Object