Package org.idempiere.ui.zk.report
Interface IReportFormatSelector
- All Known Implementing Classes:
ComboboxReportFormatSelector
public interface IReportFormatSelector
Widget the report viewer uses to show the print formats a role can use and to switch between them.
The viewer owns the list and the role checks. A selector only shows the entries it is given.
It identifies a selection by
ReportFormatEntry.key(), never by a widget item.-
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.
-
Method Details
-
getComponent
org.zkoss.zk.ui.Component getComponent()- Returns:
- component the viewer adds to its toolbar or toolbar popup
-
setFormats
Replace the displayed entries and select one. Does not notify the selection listener.- 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
int getSelectedKey()- Returns:
- key of the selected entry, or
ReportFormatEntry.KEY_NONEif nothing is selected
-
setSelectedKey
void setSelectedKey(int key) Select an entry without notifying the selection listener.- Parameters:
key- key of the entry to select. Select nothing if no entry has this key
-
setSelectionListener
Set the action to run when the user picks an entry.- Parameters:
listener- action to run, null to remove it
-