Class AbstractSfMenuItem

java.lang.Object
com.googlecode.wicket.jquery.ui.plugins.sfmenu.AbstractSfMenuItem
All Implemented Interfaces:
ISfMenuItem, Serializable, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
SfMenuItem

public abstract class AbstractSfMenuItem extends Object implements ISfMenuItem
Base class for SfMenuItem item, adapted for Superfish
Since:
6.12.0
Author:
Ludger Kluitmann - JavaLuigi, Sebastien Briquet - sebfz1
See Also:
  • Constructor Details

    • AbstractSfMenuItem

      public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
    • AbstractSfMenuItem

      public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      pageClass - the class of the page to redirect to when menu-item is clicked
    • AbstractSfMenuItem

      public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters pageParameters)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      pageClass - the class of the page to redirect to when menu-item is clicked
      pageParameters - the PageParameters
    • AbstractSfMenuItem

      public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      pageUrl - the url of the page to redirect to when menu-item is clicked
    • AbstractSfMenuItem

      public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl, boolean openInNewWindow)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      pageUrl - the url of the page to redirect to when menu-item is clicked
      openInNewWindow - whether the page is opened in a new window
  • Method Details

    • getTitle

      public org.apache.wicket.model.IModel<String> getTitle()
      Description copied from interface: ISfMenuItem
      Gets the menu-item title
      Specified by:
      getTitle in interface ISfMenuItem
      Returns:
      the menu-item title
    • setTitle

      public void setTitle(org.apache.wicket.model.IModel<String> title)
      Sets the menu-item title
      Parameters:
      title - the menu-item title
    • getItems

      public List<ISfMenuItem> getItems()
      Description copied from interface: ISfMenuItem
      Gets the List of submenu-items
      Specified by:
      getItems in interface ISfMenuItem
      Returns:
      the List of submenu-items
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: ISfMenuItem
      Indicates whether the menu-item is enabled
      Specified by:
      isEnabled in interface ISfMenuItem
      Returns:
      true or false
    • isOpenInNewWindow

      public boolean isOpenInNewWindow()
      Description copied from interface: ISfMenuItem
      Indicates whether the pages is opened in a new window
      Specified by:
      isOpenInNewWindow in interface ISfMenuItem
      Returns:
      true or false
    • setEnabled

      public void setEnabled(boolean enabled)
      Set whether the menu-item is enabled
      Parameters:
      enabled - true or false
    • setOpenInNewWindow

      public void setOpenInNewWindow(boolean openInNewWindow)
      Set whether a page is opened in a new window
      Parameters:
      openInNewWindow - true or false
    • getPageClass

      public Class<? extends org.apache.wicket.Page> getPageClass()
      Get the page class registered with the link
      Specified by:
      getPageClass in interface ISfMenuItem
      Returns:
      the page class
    • getPageParameters

      public org.apache.wicket.request.mapper.parameter.PageParameters getPageParameters()
      Description copied from interface: ISfMenuItem
      Gets the page parameters
      Specified by:
      getPageParameters in interface ISfMenuItem
      Returns:
      the PageParameters
    • getPageUrl

      public String getPageUrl()
      Get the url for a page. In most cases this will be an url for an external page.
      Specified by:
      getPageUrl in interface ISfMenuItem
      Returns:
      url of the page