Class DefaultListViewMenuPopupBuilder

    • Field Detail

      • LISTVIEW_COLUMN_MENU_HIDECOLUMN

        protected static final java.lang.String LISTVIEW_COLUMN_MENU_HIDECOLUMN
        The Constant LISTVIEW_COLUMN_MENU_HIDECOLUMN.
        See Also:
        Constant Field Values
      • LISTVIEW_COLUMN_MENU_OTHERLANGUAGES

        protected static final java.lang.String LISTVIEW_COLUMN_MENU_OTHERLANGUAGES
        The Constant LISTVIEW_COLUMN_MENU_OTHERLANGUAGES.
        See Also:
        Constant Field Values
      • LISTVIEW_COLUMN_MENU_RESET

        protected static final java.lang.String LISTVIEW_COLUMN_MENU_RESET
        The Constant LISTVIEW_COLUMN_MENU_RESET.
        See Also:
        Constant Field Values
      • LISTVIEW_COLUMN_MENU_SHOWCOLUMN

        protected static final java.lang.String LISTVIEW_COLUMN_MENU_SHOWCOLUMN
        The Constant LISTVIEW_COLUMN_MENU_SHOWCOLUMN.
        See Also:
        Constant Field Values
      • LISTVIEW_COLUMN_MENU_ALL_COLUMNS

        protected static final java.lang.String LISTVIEW_COLUMN_MENU_ALL_COLUMNS
        See Also:
        Constant Field Values
      • headerPopup

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

        protected java.util.Comparator<ColumnDescriptor> colComparator
        The column comparator.
    • Constructor Detail

      • DefaultListViewMenuPopupBuilder

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

      • 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)
      • 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
      • createNewMenuPopup

        protected org.zkoss.zul.Menupopup createNewMenuPopup​(java.lang.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 java.util.Comparator<ColumnDescriptor> getColumnComparator()
        Gets the column comparator.
        Returns:
        the column comparator