Class Ribbons.Standard

java.lang.Object
org.apache.juneau.console.views.Ribbons.Standard
Enclosing class:
Ribbons

public static final class Ribbons.Standard extends Object
Builder for the standard table ribbon.
  • Method Details

    • create

      public Ribbons.Standard create(RibbonItem... items)
      Adds items to the create slot (group entity); repeatable.

      Ids of items added here are not checked for duplicates by the builder; build-time id validation applies to the stock items only, so keep the ids you pass unique among themselves and against the stock ids.

      Parameters:
      items - The items.
      Returns:
      This object.
    • filter

      public Ribbons.Standard filter(RibbonItem... items)
      Adds items to the filter slot (group filter); repeatable.
      Parameters:
      items - The items.
      Returns:
      This object.
    • export

      public Ribbons.Standard export(String... buttons)
      Adds optional export buttons (for example "excel", "pdf") after copy and csv.

      An optional button is omitted at runtime when its library is missing.

      Parameters:
      buttons - The buttons, each excel or pdf.
      Returns:
      This object.
    • without

      Drops a preset item or export button by id.

      Valid ids are search, export, copy, csv, excel, pdf, link, collapse, columns, reset, refresh, and the id given to refreshId(String). An unknown id is rejected by build().

      Parameters:
      id - The id.
      Returns:
      This object.
    • refreshId

      Renames the refresh item (default "refresh").
      Parameters:
      id - The id. Must not be null or blank.
      Returns:
      This object.
    • build

      public List<RibbonItem> build()
      Builds the items in slot order, each with its canonical group.
      Returns:
      An immutable list, for TableSpec.ribbon(List).
      Throws:
      IllegalArgumentException - If without(String) named an id that is not a preset id.