Class DefaultListViewMenuPopupBuilder

java.lang.Object
de.hybris.platform.cockpit.model.listview.impl.DefaultListViewMenuPopupBuilder
All Implemented Interfaces:
ListViewMenuPopupBuilder
Direct Known Subclasses:
DynamicListViewMenuPopupBuilder

public class DefaultListViewMenuPopupBuilder extends Object implements ListViewMenuPopupBuilder
Default implementation of ListViewHeaderColumnMenuPopupBuilder interface.
  • Field Details

    • ON_LATER

      public static final String ON_LATER
      See Also:
    • LISTVIEW_COLUMN_MENU_HIDECOLUMN

      protected static final String LISTVIEW_COLUMN_MENU_HIDECOLUMN
      The Constant LISTVIEW_COLUMN_MENU_HIDECOLUMN.
      See Also:
    • LISTVIEW_COLUMN_MENU_OTHERLANGUAGES

      protected static final String LISTVIEW_COLUMN_MENU_OTHERLANGUAGES
      The Constant LISTVIEW_COLUMN_MENU_OTHERLANGUAGES.
      See Also:
    • LISTVIEW_COLUMN_MENU_RESET

      protected static final String LISTVIEW_COLUMN_MENU_RESET
      The Constant LISTVIEW_COLUMN_MENU_RESET.
      See Also:
    • LISTVIEW_COLUMN_MENU_SHOWCOLUMN

      protected static final String LISTVIEW_COLUMN_MENU_SHOWCOLUMN
      The Constant LISTVIEW_COLUMN_MENU_SHOWCOLUMN.
      See Also:
    • LISTVIEW_COLUMN_MENU_ALL_COLUMNS

      protected static final String LISTVIEW_COLUMN_MENU_ALL_COLUMNS
      See Also:
    • headerPopup

      protected final org.zkoss.zul.Menupopup headerPopup
      The new header popup.
    • colComparator

      protected Comparator<ColumnDescriptor> colComparator
      The column comparator.
  • Constructor Details

    • DefaultListViewMenuPopupBuilder

      public DefaultListViewMenuPopupBuilder()
      Instantiates a new default list view header column menu popup builder.
  • Method Details

    • addHideColumnElement

      public void addHideColumnElement(UIListView listView, int columnIndex)
      Adds the hide column element.
      Parameters:
      columnIndex - the column index
      listView - the list view
    • addLocalizedColumnElement

      public void addLocalizedColumnElement(UIListView listView, ColumnDescriptor descriptor)
      Adds the localized column element.
      Parameters:
      descriptor - the descriptor
    • addResetColumnElement

      public void addResetColumnElement(UIListView listView)
      Adds the reset column element.
    • addSeparator

      public void addSeparator()
      Adds the separator.
    • addShowColumnElement

      public void addShowColumnElement(UIListView listView, ColumnLayoutComponent mainColumnComponent, boolean addResetItem)
      Adds the show column element.
      Parameters:
      mainColumnComponent - the main column component
      addResetItem - the add reset item
      listView - the list view
    • addShowColumnElement

      public void addShowColumnElement(UIListView listView, int colIndex, boolean addResetItem)
      Adds the show column element.
      Parameters:
      colIndex - the col index
      addResetItem - the add reset item
      listView - the list view
    • addShowColumnLogic

      public void addShowColumnLogic(UIListView listView, org.zkoss.zul.Menupopup hiddenColumnMenuPopup, int colIndex, boolean open)
      Adds the show column logic.
      Parameters:
      hiddenColumnMenuPopup - the hidden column menu popup
      colIndex - the col index
      open - true in case of opening
      listView - the list view
    • addAllColumnElement

      public void addAllColumnElement(UIListView listView, org.zkoss.zul.Menupopup columnMenuPopup, int colIndex)
    • addAllColumnLogic

      public void addAllColumnLogic(UIListView listView, org.zkoss.zul.Menupopup allColumnsMenuPopup, int colIndex)
    • buildBackgroundColumnMenuPopup

      public org.zkoss.zul.Menupopup buildBackgroundColumnMenuPopup(UIListView listView, ColumnLayoutComponent mainColumnComponent)
      Description copied from interface: ListViewMenuPopupBuilder
      Builds menu popup for use in ListView's background column.
      Specified by:
      buildBackgroundColumnMenuPopup in interface ListViewMenuPopupBuilder
      mainColumnComponent - the main column component
      Returns:
      the menupopup
    • buildHiddenColumnMenupopup

      public int buildHiddenColumnMenupopup(UIListView listView, ColumnGroup group, org.zkoss.zul.Menupopup menuPopup, int colIndex)
      Builds the hidden column menupopup.
      Parameters:
      group - the group
      menuPopup - the menu popup
      colIndex - the col index
      listView - the list view
      Returns:
      the int
    • buildStandardColumnMenuPopup

      public org.zkoss.zul.Menupopup buildStandardColumnMenuPopup(UIListView listView, ColumnDescriptor descriptor, int columnIndex)
      Description copied from interface: ListViewMenuPopupBuilder
      Builds the standard column menu popup.
      Specified by:
      buildStandardColumnMenuPopup in interface ListViewMenuPopupBuilder
      descriptor - the descriptor
      columnIndex - the column index
      Returns:
      the menupopup
    • createNewMenuPopup

      protected org.zkoss.zul.Menupopup createNewMenuPopup(String menuLabel, org.zkoss.zul.Menupopup menuPopup)
      Creates the new menu popup attached to Menupopup object passed as parameter.
      Parameters:
      menuLabel - the label for newly created Menu
      menuPopup - the menu popup object for which newly created menu popup should be attached
      Returns:
      the newly created menu popup object
    • getColumnComparator

      protected Comparator<ColumnDescriptor> getColumnComparator()
      Gets the column comparator.
      Returns:
      the column comparator