Class Menu

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Menu
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    A menu in the navigation.
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Image image
      The image for the menu.
      private java.lang.String inherit
      The way in which the menu is inherited.
      private boolean inheritAsRef
      If this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
      private java.util.List<MenuItem> items
      Field items.
      private java.lang.String name
      The name to display for the menu.
      private java.lang.String ref
      Mark this menu as reference to a pre-defined menu: reports, modules or parent.
    • Constructor Summary

      Constructors 
      Constructor Description
      Menu()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addItem​(MenuItem menuItem)
      Method addItem.
      Menu clone()
      Method clone.
      boolean equals​(java.lang.Object other)
      Method equals.
      Image getImage()
      Get the image for the menu.
      java.lang.String getInherit()
      Get the way in which the menu is inherited.
      java.util.List<MenuItem> getItems()
      Method getItems.
      java.lang.String getName()
      Get the name to display for the menu.
      java.lang.String getRef()
      Get mark this menu as reference to a pre-defined menu: reports, modules or parent.
      int hashCode()
      Method hashCode.
      boolean isInheritAsRef()
      Get if this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
      void removeItem​(MenuItem menuItem)
      Method removeItem.
      void setImage​(Image image)
      Set the image for the menu.
      void setInherit​(java.lang.String inherit)
      Set the way in which the menu is inherited.
      void setInheritAsRef​(boolean inheritAsRef)
      Set if this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
      void setItems​(java.util.List<MenuItem> items)
      Set a list of menu item.
      void setName​(java.lang.String name)
      Set the name to display for the menu.
      void setRef​(java.lang.String ref)
      Set mark this menu as reference to a pre-defined menu: reports, modules or parent.
      java.lang.String toString()
      Method toString.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
        The name to display for the menu.
      • inherit

        private java.lang.String inherit
        The way in which the menu is inherited. Can be one of : top, bottom.
      • inheritAsRef

        private boolean inheritAsRef
        If this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
      • ref

        private java.lang.String ref
        Mark this menu as reference to a pre-defined menu: reports, modules or parent. It will be populated at runtime with corresponding pre-defined content.
      • image

        private Image image
        The image for the menu.
      • items

        private java.util.List<MenuItem> items
        Field items.
    • Constructor Detail

      • Menu

        public Menu()
    • Method Detail

      • addItem

        public void addItem​(MenuItem menuItem)
        Method addItem.
        Parameters:
        menuItem - a menuItem object.
      • clone

        public Menu clone()
        Method clone.
        Overrides:
        clone in class java.lang.Object
        Returns:
        Menu
      • equals

        public boolean equals​(java.lang.Object other)
        Method equals.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - a other object.
        Returns:
        boolean
      • getImage

        public Image getImage()
        Get the image for the menu.
        Returns:
        Image
      • getInherit

        public java.lang.String getInherit()
        Get the way in which the menu is inherited. Can be one of : top, bottom.
        Returns:
        String
      • getItems

        public java.util.List<MenuItem> getItems()
        Method getItems.
        Returns:
        List
      • getName

        public java.lang.String getName()
        Get the name to display for the menu.
        Returns:
        String
      • getRef

        public java.lang.String getRef()
        Get mark this menu as reference to a pre-defined menu: reports, modules or parent. It will be populated at runtime with corresponding pre-defined content.
        Returns:
        String
      • hashCode

        public int hashCode()
        Method hashCode.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int
      • isInheritAsRef

        public boolean isInheritAsRef()
        Get if this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
        Returns:
        boolean
      • removeItem

        public void removeItem​(MenuItem menuItem)
        Method removeItem.
        Parameters:
        menuItem - a menuItem object.
      • setImage

        public void setImage​(Image image)
        Set the image for the menu.
        Parameters:
        image - a image object.
      • setInherit

        public void setInherit​(java.lang.String inherit)
        Set the way in which the menu is inherited. Can be one of : top, bottom.
        Parameters:
        inherit - a inherit object.
      • setInheritAsRef

        public void setInheritAsRef​(boolean inheritAsRef)
        Set if this is a reference, setting to true means that it will be populated in the site, whereas if it is false, it is populated in the parent and then inherited.
        Parameters:
        inheritAsRef - a inheritAsRef object.
      • setItems

        public void setItems​(java.util.List<MenuItem> items)
        Set a list of menu item.
        Parameters:
        items - a items object.
      • setName

        public void setName​(java.lang.String name)
        Set the name to display for the menu.
        Parameters:
        name - a name object.
      • setRef

        public void setRef​(java.lang.String ref)
        Set mark this menu as reference to a pre-defined menu: reports, modules or parent. It will be populated at runtime with corresponding pre-defined content.
        Parameters:
        ref - a ref object.
      • toString

        public java.lang.String toString()
        Method toString.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String