Package snap.view

Class ArrowView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class ArrowView extends ParentView
A view to show up to four arrows.
  • Field Details

  • Constructor Details

    • ArrowView

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

    • isShowUp

      public boolean isShowUp()
      Returns whether to show up button.
    • setShowUp

      public void setShowUp(boolean aValue)
      Sets whether to show up button.
    • isShowDown

      public boolean isShowDown()
      Returns whether to show down button.
    • setShowDown

      public void setShowDown(boolean aValue)
      Sets whether to show down button.
    • isShowLeft

      public boolean isShowLeft()
      Returns whether to show left button.
    • setShowLeft

      public void setShowLeft(boolean aValue)
      Sets whether to show left button.
    • isShowRight

      public boolean isShowRight()
      Returns whether to show right button.
    • setShowRight

      public void setShowRight(boolean aValue)
      Sets whether to show right button.
    • getLastArrow

      public ArrowView.Arrow getLastArrow()
      Returns the last arrow.
    • isUp

      public boolean isUp()
      Returns whether last button was up.
    • isDown

      public boolean isDown()
      Returns whether last button was down.
    • isLeft

      public boolean isLeft()
      Returns whether last button was left.
    • isRight

      public boolean isRight()
      Returns whether last button was right.
    • buttonDidFire

      protected void buttonDidFire(Button aBtn)
      Called when button fires.
    • getUpArrowImage

      public static Image getUpArrowImage()
      Returns an image of a up arrow.
    • getDownArrowImage

      public static Image getDownArrowImage()
      Returns an image of a down arrow.
    • getLeftArrowImage

      public static Image getLeftArrowImage()
      Returns an image of a left arrow.
    • getRightArrowImage

      public static Image getRightArrowImage()
      Returns an image of a right arrow.
    • 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
    • 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