Package snap.view

Class ColView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable, ViewHost

public class ColView extends ChildView
A View subclass to layout child views vertically, from top to bottom.
  • Field Details

  • Constructor Details

    • ColView

      public ColView()
      Constructor.
  • Method Details

    • isFillWidth

      public boolean isFillWidth()
      Returns whether children will be resized to fill width.
    • setFillWidth

      public void setFillWidth(boolean aValue)
      Sets whether children will be resized to fill width.
    • getPrefWidthImpl

      protected double getPrefWidthImpl(double aH)
      Returns the preferred width.
      Overrides:
      getPrefWidthImpl in class View
    • getPrefHeightImpl

      protected double getPrefHeightImpl(double aW)
      Returns the preferred height.
      Overrides:
      getPrefHeightImpl in class View
    • layoutImpl

      protected void layoutImpl()
      Layout children.
      Overrides:
      layoutImpl in class ParentView
    • getViewProxy

      protected ColViewProxy<?> getViewProxy()
      Override to return ColViewProxy.
      Overrides:
      getViewProxy in class ParentView
    • initProps

      protected void initProps(PropSet aPropSet)
      Override to support props for this class.
      Overrides:
      initProps in class ParentView
    • getPropValue

      public Object getPropValue(String aPropName)
      Override to support props for this class.
      Overrides:
      getPropValue in class ParentView
    • setPropValue

      public void setPropValue(String aPropName, Object aValue)
      Override to support props for this class.
      Overrides:
      setPropValue in class ParentView
    • toXMLView

      public XMLElement toXMLView(XMLArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLView in class ParentView
    • fromXMLView

      public void fromXMLView(XMLArchiver anArchiver, XMLElement anElement)
      XML unarchival.
      Overrides:
      fromXMLView in class ParentView
    • getPrefWidth

      public static double getPrefWidth(ParentView aPar, double aH)
      Returns preferred width of given parent with given children.
    • getPrefHeight

      public static double getPrefHeight(ParentView aParent, double aW)
      Returns preferred height of given parent with given children.
    • layout

      public static void layout(ParentView aParent, boolean isFillWidth)
      Performs layout for given parent with option to fill width.