Package snap.view

Class BorderView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class BorderView extends ParentView
A View subclass to manage subviews along edges (top, bottom, left, right) and center.
  • Constructor Details

    • BorderView

      public BorderView()
      Constructor.
  • Method Details

    • getCenter

      public View getCenter()
      Returns the center node.
    • setCenter

      public void setCenter(View aView)
      Sets the center node.
    • getTop

      public View getTop()
      Returns the top node.
    • setTop

      public void setTop(View aView)
      Sets the top node.
    • getBottom

      public View getBottom()
      Returns the bottom node.
    • setBottom

      public void setBottom(View aView)
      Sets the bottom node.
    • getLeft

      public View getLeft()
      Returns the left node.
    • setLeft

      public void setLeft(View aView)
      Sets the left node.
    • getRight

      public View getRight()
      Returns the right node.
    • setRight

      public void setRight(View aView)
      Sets the right node.
    • 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 BorderViewProxy getViewProxy()
      Override to return ColViewProxy.
      Overrides:
      getViewProxy in class ParentView
    • toXMLChildren

      protected void toXMLChildren(XMLArchiver anArchiver, XMLElement anElement)
      XML archival of children.
      Overrides:
      toXMLChildren in class ParentView
    • fromXMLChildren

      protected void fromXMLChildren(XMLArchiver anArchiver, XMLElement anElement)
      XML unarchival for shape children.
      Overrides:
      fromXMLChildren in class ParentView
    • getPrefWidth

      public static double getPrefWidth(ParentView aPar, View aCtr, View aTop, View aRgt, View aBtm, View aLft, double aH)
      Returns preferred width of given parent with given children.
    • getPrefHeight

      public static double getPrefHeight(ParentView aPar, View aCtr, View aTop, View aRgt, View aBtm, View aLft, double aW)
      Returns the preferred height.
    • layout

      public static void layout(ParentView aPar, View aCtr, View aTop, View aRgt, View aBtm, View aLft)
      Layout children.