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 java.lang.Object implements ListViewMenuPopupBuilder
Default implementation ofListViewHeaderColumnMenuPopupBuilderinterface.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Comparator<ColumnDescriptor>colComparatorThe column comparator.protected org.zkoss.zul.MenupopupheaderPopupThe new header popup.protected static java.lang.StringLISTVIEW_COLUMN_MENU_ALL_COLUMNSprotected static java.lang.StringLISTVIEW_COLUMN_MENU_HIDECOLUMNThe Constant LISTVIEW_COLUMN_MENU_HIDECOLUMN.protected static java.lang.StringLISTVIEW_COLUMN_MENU_OTHERLANGUAGESThe Constant LISTVIEW_COLUMN_MENU_OTHERLANGUAGES.protected static java.lang.StringLISTVIEW_COLUMN_MENU_RESETThe Constant LISTVIEW_COLUMN_MENU_RESET.protected static java.lang.StringLISTVIEW_COLUMN_MENU_SHOWCOLUMNThe Constant LISTVIEW_COLUMN_MENU_SHOWCOLUMN.static java.lang.StringON_LATER
-
Constructor Summary
Constructors Constructor Description DefaultListViewMenuPopupBuilder()Instantiates a new default list view header column menu popup builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllColumnElement(UIListView listView, org.zkoss.zul.Menupopup columnMenuPopup, int colIndex)voidaddAllColumnLogic(UIListView listView, org.zkoss.zul.Menupopup allColumnsMenuPopup, int colIndex)voidaddHideColumnElement(UIListView listView, int columnIndex)Adds the hide column element.voidaddLocalizedColumnElement(UIListView listView, ColumnDescriptor descriptor)Adds the localized column element.voidaddResetColumnElement(UIListView listView)Adds the reset column element.voidaddSeparator()Adds the separator.voidaddShowColumnElement(UIListView listView, int colIndex, boolean addResetItem)Adds the show column element.voidaddShowColumnElement(UIListView listView, ColumnLayoutComponent mainColumnComponent, boolean addResetItem)Adds the show column element.voidaddShowColumnLogic(UIListView listView, org.zkoss.zul.Menupopup hiddenColumnMenuPopup, int colIndex, boolean open)Adds the show column logic.org.zkoss.zul.MenupopupbuildBackgroundColumnMenuPopup(UIListView listView, ColumnLayoutComponent mainColumnComponent)Builds menu popup for use in ListView's background column.intbuildHiddenColumnMenupopup(UIListView listView, ColumnGroup group, org.zkoss.zul.Menupopup menuPopup, int colIndex)Builds the hidden column menupopup.org.zkoss.zul.MenupopupbuildStandardColumnMenuPopup(UIListView listView, ColumnDescriptor descriptor, int columnIndex)Builds the standard column menu popup.protected org.zkoss.zul.MenupopupcreateNewMenuPopup(java.lang.String menuLabel, org.zkoss.zul.Menupopup menuPopup)Creates the new menu popup attached toMenupopupobject passed as parameter.protected java.util.Comparator<ColumnDescriptor>getColumnComparator()Gets the column comparator.
-
-
-
Field Detail
-
ON_LATER
public static final java.lang.String ON_LATER
- See Also:
- Constant Field Values
-
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.
-
-
Method Detail
-
addHideColumnElement
public void addHideColumnElement(UIListView listView, int columnIndex)
Adds the hide column element.- Parameters:
columnIndex- the column indexlistView- 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 componentaddResetItem- the add reset itemlistView- the list view
-
addShowColumnElement
public void addShowColumnElement(UIListView listView, int colIndex, boolean addResetItem)
Adds the show column element.- Parameters:
colIndex- the col indexaddResetItem- the add reset itemlistView- 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 popupcolIndex- the col indexopen- true in case of openinglistView- 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:ListViewMenuPopupBuilderBuilds menu popup for use in ListView's background column.- Specified by:
buildBackgroundColumnMenuPopupin interfaceListViewMenuPopupBuildermainColumnComponent- 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 groupmenuPopup- the menu popupcolIndex- the col indexlistView- the list view- Returns:
- the int
-
buildStandardColumnMenuPopup
public org.zkoss.zul.Menupopup buildStandardColumnMenuPopup(UIListView listView, ColumnDescriptor descriptor, int columnIndex)
Description copied from interface:ListViewMenuPopupBuilderBuilds the standard column menu popup.- Specified by:
buildStandardColumnMenuPopupin interfaceListViewMenuPopupBuilderdescriptor- the descriptorcolumnIndex- the column index- Returns:
- the menupopup
-
createNewMenuPopup
protected org.zkoss.zul.Menupopup createNewMenuPopup(java.lang.String menuLabel, org.zkoss.zul.Menupopup menuPopup)Creates the new menu popup attached toMenupopupobject passed as parameter.- Parameters:
menuLabel- the label for newly created MenumenuPopup- 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
-
-