Package snap.view

Class WrapView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class WrapView extends ParentView
A parent view to correctly layout a content view even if rotated and/or scaled.
  • Field Details

  • Constructor Details

    • WrapView

      public WrapView(View aView)
      Constructor for given view.
    • WrapView

      public WrapView(View aView, boolean fillWidth, boolean fillHeight)
      Constructor for given view.
  • 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.
    • isFillHeight

      public boolean isFillHeight()
      Returns whether children will be resized to fill height.
    • setFillHeight

      public void setFillHeight(boolean aValue)
      Sets whether children will be resized to fill height.
    • getContent

      public View getContent()
      Returns the content.
    • setContent

      public void setContent(View aView)
      Sets the content.
    • getPrefWidthImpl

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

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

      protected void layoutImpl()
      Actual method to layout children.
      Overrides:
      layoutImpl in class ParentView