All Implemented Interfaces:
Control, View

public class StatusBarView extends BoxView
StatusBarView shows items horizontally and is typically used in layouts which builds complete terminal UI's. item primary denotes if item is drawn to left or right, priority on which order items are drawn until bar runs out of space. Default primary is true and priority is 0.
  • Constructor Details

  • Method Details

    • getBackgroundStyle

      protected String getBackgroundStyle()
      Overrides:
      getBackgroundStyle in class BoxView
    • getItemSeparator

      @Nullable public String getItemSeparator()
      Gets the item separator.
      Returns:
      a separator
    • setItemSeparator

      public void setItemSeparator(@Nullable String itemSeparator)
      Sets the item separator. Separator can be null or empty which essentially disables it.
      Parameters:
      itemSeparator - the item separator
    • drawInternal

      protected void drawInternal(Screen screen)
      Description copied from class: BoxView
      Possibly draws a box around this view and title in a box top boundary. Also calls a draw function if defined.
      Overrides:
      drawInternal in class BoxView
      Parameters:
      screen - the screen
    • getMouseHandler

      public MouseHandler getMouseHandler()
      Description copied from class: AbstractView
      Handles mouse events by dispatching registered consumers into an event loop. Override to change default behaviour.
      Specified by:
      getMouseHandler in interface View
      Overrides:
      getMouseHandler in class AbstractView
      Returns:
      a view mouse handler
      See Also:
    • setItems

      public void setItems(List<StatusBarView.StatusItem> items)
      Sets items.
      Parameters:
      items - status items
    • getItems

      public List<StatusBarView.StatusItem> getItems()
      Gets a status items.
      Returns:
      the status items