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 Details

    • getComponent

      org.zkoss.zk.ui.Component getComponent()
      Returns:
      component the viewer adds to its toolbar or toolbar popup
    • setFormats

      void setFormats(List<ReportFormatEntry> entries, int selectedKey)
      Replace the displayed entries and select one. Does not notify the selection listener.
      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

      int getSelectedKey()
      Returns:
      key of the selected entry, or ReportFormatEntry.KEY_NONE if 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

      void setSelectionListener(Runnable listener)
      Set the action to run when the user picks an entry.
      Parameters:
      listener - action to run, null to remove it