Package snap.view

Class Divider

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class Divider extends View
A View to represent a movable separation between views.
  • Field Details

  • Constructor Details

    • Divider

      public Divider()
      Creates a new Divider.
  • Method Details

    • getSpan

      public double getSpan()
      Returns the size of the divider.
    • setSpan

      public void setSpan(double aValue)
      Sets the size of the divider.
    • getClickSpan

      public double getClickSpan()
      Returns the size of the clickable length of the divider (if greater than Span).
    • setClickSpan

      public void setClickSpan(double aValue)
      Sets the size of the clickable length of the divider (if greater than Span).
    • getLocation

      public double getLocation()
      Returns the distance from the min x of preceding View to min x of divider (or y if vertical).
    • setLocation

      public void setLocation(double aValue)
      Sets the distance from the min x of preceding View to min x of divider (or y if vertical).
    • setLocationV

      protected void setLocationV(double aX)
      Implementation of setLocation for Vertical divider.
    • setLocationH

      protected void setLocationH(double aY)
      Implementation of setLocation for Horizontal divider.
    • getRemainder

      public double getRemainder()
      Returns the distance from the max x of successive View to max x of divider (or y if vertical).
    • setRemainder

      public void setRemainder(double aValue)
      Sets the distance from the max x of successive View to max x of divider (or y if vertical).
    • getViewBefore

      public View getViewBefore()
      Returns the view before divider.
    • getViewAfter

      public View getViewAfter()
      Returns the view after divider.
    • setVertical

      public void setVertical(boolean aValue)
      Override to configure attributes based on parent.Vertical.
      Overrides:
      setVertical in class View
    • getPrefWidthImpl

      protected double getPrefWidthImpl(double aH)
      Override to return pref span.
      Overrides:
      getPrefWidthImpl in class View
    • getPrefHeightImpl

      protected double getPrefHeightImpl(double aH)
      Override to return pref span.
      Overrides:
      getPrefHeightImpl in class View
    • setDisabled

      public void setDisabled(boolean aValue)
      Override to relayout parent since this can cause size change.
      Overrides:
      setDisabled in class View
    • getPropValue

      public Object getPropValue(String aPropName)
      Override to handle extra props.
      Overrides:
      getPropValue in class View
    • setPropValue

      public void setPropValue(String aPropName, Object aValue)
      Override to handle extra props.
      Overrides:
      setPropValue in class View