Class KanbanCard

java.lang.Object
com.codename1.kanban.KanbanCard

public class KanbanCard extends Object

A card of a board: a task, a ticket, a lead.

A card knows the column it is in and, on a board with swimlanes, its lane. Change either through the model (KanbanModel.moveCard), which keeps the order of the cards and tells the views.

  • Constructor Details

    • KanbanCard

      public KanbanCard(String id, String title)
      A card with an id, unique in its model, and a title.
  • Method Details

    • getId

      public String getId()
      The id, unique in the model.
    • getTitle

      public String getTitle()
      The title.
    • setTitle

      public KanbanCard setTitle(String title)
      Sets the title. A model shown by a board is told through KanbanModel.renameCard.
    • getDescription

      public String getDescription()
      A longer text under the title, or null.
    • setDescription

      public KanbanCard setDescription(String description)
      Sets the text under the title.
    • getTags

      public List<String> getTags()
      The tags, drawn as small labels. The list is the card's own: add to it or clear it.
    • addTag

      public KanbanCard addTag(String tag)
      Adds a tag.
    • getBadge

      public String getBadge()
      A short text at the trailing edge of the card's last line, such as an estimate or the initials of its owner, or null.
    • setBadge

      public KanbanCard setBadge(String badge)
      Sets the badge.
    • getStyleKey

      public String getStyleKey()
      A key the renderer maps to a colour, such as a priority, or null.
    • setStyleKey

      public KanbanCard setStyleKey(String styleKey)
      Sets the style key.
    • getColumnId

      public String getColumnId()
      The id of the column the card is in.
    • setColumnId

      public void setColumnId(String columnId)
      Sets the column. For a model's own use: a card of a model is moved with KanbanModel.moveCard, and setting this on a card a model holds leaves the model filing it under the column it had.
    • getLaneId

      public String getLaneId()
      The id of the card's swimlane, or null.
    • setLaneId

      public KanbanCard setLaneId(String laneId)
      Sets the lane. On a card that is already in a model, use KanbanModel.moveCard.
    • getUserData

      public Object getUserData()
      Whatever the application attached, or null.
    • setUserData

      public KanbanCard setUserData(Object userData)
      Attaches an object of the application's to the card.
    • copy

      public KanbanCard copy(String newId)
      A card like this one under another id: the same texts, tags, style, lane and user data, in no column yet.
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
      Overrides:
      toString in class Object