Interface KanbanCardRenderer

All Known Implementing Classes:
DefaultKanbanCardRenderer

public interface KanbanCardRenderer
Paints the cards of a KanbanBoard, and says how tall each is.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getCardHeight(KanbanBoard board, KanbanCard card, int width)
    The height of a card that is width pixels wide, without the component a KanbanCardFactory adds under it.
    void
    paintCard(Graphics g, KanbanBoard board, KanbanCard card, int x, int y, int w, int h, boolean selected, float lift)
    Paints a card into a rectangle.
  • Method Details

    • getCardHeight

      int getCardHeight(KanbanBoard board, KanbanCard card, int width)
      The height of a card that is width pixels wide, without the component a KanbanCardFactory adds under it.
    • paintCard

      void paintCard(Graphics g, KanbanBoard board, KanbanCard card, int x, int y, int w, int h, boolean selected, float lift)

      Paints a card into a rectangle.

      Parameters
      • g: the graphics, with the colour and alpha the renderer may change
      • board: the component
      • card: the card
      • x, y, w, h: the card on screen; the bottom board.getCardComponentHeight(card) pixels belong to its component
      • selected: true for the selected card
      • lift: how far the card is off the board, from 0 to 1, while it is dragged