Class ComboboxReportFormatSelector

java.lang.Object
org.idempiere.ui.zk.report.ComboboxReportFormatSelector
All Implemented Interfaces:
IReportFormatSelector

public class ComboboxReportFormatSelector extends Object implements IReportFormatSelector
Default report format selector, a combo box of the print format names.
  • Constructor Details

    • ComboboxReportFormatSelector

      public ComboboxReportFormatSelector()
      Create the combo box
  • Method Details

    • getComponent

      public org.zkoss.zk.ui.Component getComponent()
      Specified by:
      getComponent in interface IReportFormatSelector
      Returns:
      component the viewer adds to its toolbar or toolbar popup
    • setFormats

      public void setFormats(List<ReportFormatEntry> entries, int selectedKey)
      Description copied from interface: IReportFormatSelector
      Replace the displayed entries and select one. Does not notify the selection listener.
      Specified by:
      setFormats in interface IReportFormatSelector
      Parameters:
      entries - entries to show, immutable, never null. May be empty
      selectedKey - key of the entry to select. Select nothing if no entry has this key
    • getSelectedKey

      public int getSelectedKey()
      Specified by:
      getSelectedKey in interface IReportFormatSelector
      Returns:
      key of the selected entry, or ReportFormatEntry.KEY_NONE if nothing is selected
    • setSelectedKey

      public void setSelectedKey(int key)
      Description copied from interface: IReportFormatSelector
      Select an entry without notifying the selection listener.
      Specified by:
      setSelectedKey in interface IReportFormatSelector
      Parameters:
      key - key of the entry to select. Select nothing if no entry has this key
    • setSelectionListener

      public void setSelectionListener(Runnable listener)
      Description copied from interface: IReportFormatSelector
      Set the action to run when the user picks an entry.
      Specified by:
      setSelectionListener in interface IReportFormatSelector
      Parameters:
      listener - action to run, null to remove it