Package org.idempiere.ui.zk.report
Class ComboboxReportFormatSelector
java.lang.Object
org.idempiere.ui.zk.report.ComboboxReportFormatSelector
- All Implemented Interfaces:
IReportFormatSelector
Default report format selector, a combo box of the print format names.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zk.ui.ComponentintvoidsetFormats(List<ReportFormatEntry> entries, int selectedKey) Replace the displayed entries and select one.voidsetSelectedKey(int key) Select an entry without notifying the selection listener.voidsetSelectionListener(Runnable listener) Set the action to run when the user picks an entry.
-
Constructor Details
-
ComboboxReportFormatSelector
public ComboboxReportFormatSelector()Create the combo box
-
-
Method Details
-
getComponent
public org.zkoss.zk.ui.Component getComponent()- Specified by:
getComponentin interfaceIReportFormatSelector- Returns:
- component the viewer adds to its toolbar or toolbar popup
-
setFormats
Description copied from interface:IReportFormatSelectorReplace the displayed entries and select one. Does not notify the selection listener.- Specified by:
setFormatsin interfaceIReportFormatSelector- Parameters:
entries- entries to show, immutable, never null. May be emptyselectedKey- key of the entry to select. Select nothing if no entry has this key
-
getSelectedKey
public int getSelectedKey()- Specified by:
getSelectedKeyin interfaceIReportFormatSelector- Returns:
- key of the selected entry, or
ReportFormatEntry.KEY_NONEif nothing is selected
-
setSelectedKey
public void setSelectedKey(int key) Description copied from interface:IReportFormatSelectorSelect an entry without notifying the selection listener.- Specified by:
setSelectedKeyin interfaceIReportFormatSelector- Parameters:
key- key of the entry to select. Select nothing if no entry has this key
-
setSelectionListener
Description copied from interface:IReportFormatSelectorSet the action to run when the user picks an entry.- Specified by:
setSelectionListenerin interfaceIReportFormatSelector- Parameters:
listener- action to run, null to remove it
-