Class Menu.Item

    • Field Detail

      • associatedTopic

        protected TopicIF associatedTopic
      • image

        protected String image
      • conditionString

        protected String conditionString
      • condition

        protected boolean condition
    • Constructor Detail

      • Item

        public Item​(TopicIF topic)
        Create a new Item, represented by the given topic.
    • Method Detail

      • getIsHeading

        public boolean getIsHeading()
        Check whether this Item is a Heading.
        Specified by:
        getIsHeading in interface Menu.ChildIF
        Returns:
        false, since it is not a Heading.
      • getIsItem

        public boolean getIsItem()
        Check whether this is an Item.
        Specified by:
        getIsItem in interface Menu.ChildIF
        Returns:
        true, since it is an Item.
      • getAssociatedTopic

        public TopicIF getAssociatedTopic()
        Get the associated topic of this Item.
      • getLink

        public String getLink()
        The link occurrence as a String.
      • getImage

        public String getImage()
        Get the image occurrence as a String.
      • getHasChildren

        public boolean getHasChildren()
        Check if this Item has children. $return false, since an Item cannot have any children.
        Specified by:
        getHasChildren in interface Menu.MenuObjectIF
      • getConditionTrue

        public boolean getConditionTrue()
        Check the condition of this Item.
      • setAssociatedTopic

        public void setAssociatedTopic​(TopicIF topic)
        Set the associated topic.
      • setLink

        public void setLink​(String link)
        Set the link occurrence value.
      • setImage

        public void setImage​(String image)
        Set the image occurrence value.
      • getCondition

        public String getCondition()
        Get the condition occurrence value as a String.
      • setCondition

        public void setCondition​(String condition)
        Set the condition occurrence value.
      • moveOneUp

        public void moveOneUp()
        Moves this item one step higher up the list of children on its parent. has no effect if it is already first.
        Specified by:
        moveOneUp in interface Menu.ChildIF
      • moveOneDown

        public void moveOneDown()
        Moves this item one step further down the list of children on its parent. Has no effect if it is already last.
        Specified by:
        moveOneDown in interface Menu.ChildIF