Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public abstract class AbstractKanbanModel

  1. Object
  2. AbstractKanbanModel

ImplementsKanbanModel

Known subtypesDefaultKanbanModel

A model that looks things up by walking its lists and refuses every edit: what a board that is only shown needs. Override the mutators a user should have, and call fireChanged when the data changes.

Constructors

public AbstractKanbanModel()

Methods

public int getCardCount(KanbanColumn column)The number of cards in a column, in all its lanes.
public KanbanCard getCard(String id)The card with an id, or null.
public KanbanColumn getColumn(String id)The column with an id, or null.
public KanbanLane getLane(String id)The lane with an id, or null.
public boolean canMoveCard(KanbanCard card, KanbanColumn column, KanbanLane lane)Whether moveCard would take the card into a column.
public boolean insertCard(KanbanCard card, KanbanColumn column, KanbanLane lane, int index)Adds a card to a cell at an index among the cell’s cards; an index past the end adds it last.
public boolean removeCard(KanbanCard card)Removes a card.
public boolean renameCard(KanbanCard card, String title)Gives a card another title.
public boolean moveCard(KanbanCard card, KanbanColumn column, KanbanLane lane, int index)Moves a card to an index among the cards of a cell, which may be the cell it is in.
public boolean moveColumn(KanbanColumn column, int index)Moves a column to an index among the columns, counted without it.
public boolean setCollapsed(KanbanColumn column, boolean collapsed)Folds or unfolds a column.
public boolean setLaneCollapsed(KanbanLane lane, boolean collapsed)Folds or unfolds a lane.
public void addChangeListener(KanbanChangeListener l)Adds a listener told of every change.
public void removeChangeListener(KanbanChangeListener l)Removes a listener.
protected void fireChanged()Tells the listeners the board changed.

Inherited methods

Constructor details

AbstractKanbanModel

public AbstractKanbanModel()

Method details

getCardCount

public int getCardCount(KanbanColumn column)
The number of cards in a column, in all its lanes.

getCard

public KanbanCard getCard(String id)
The card with an id, or null.

getColumn

public KanbanColumn getColumn(String id)
The column with an id, or null.

getLane

public KanbanLane getLane(String id)
The lane with an id, or null.

canMoveCard

public boolean canMoveCard(KanbanCard card, KanbanColumn column, KanbanLane lane)
Whether moveCard would take the card into a column. A board asks while a card is dragged over a column, to show a refusal before the card is let go.

insertCard

public boolean insertCard(KanbanCard card, KanbanColumn column, KanbanLane lane, int index)
Adds a card to a cell at an index among the cell’s cards; an index past the end adds it last.

removeCard

public boolean removeCard(KanbanCard card)
Removes a card.

renameCard

public boolean renameCard(KanbanCard card, String title)
Gives a card another title.

moveCard

public boolean moveCard(KanbanCard card, KanbanColumn column, KanbanLane lane, int index)
Moves a card to an index among the cards of a cell, which may be the cell it is in. The index counts the cell without the card. A null lane is the whole column: the index counts every lane’s cards, and the card keeps the lane it names.

moveColumn

public boolean moveColumn(KanbanColumn column, int index)
Moves a column to an index among the columns, counted without it.

setCollapsed

public boolean setCollapsed(KanbanColumn column, boolean collapsed)
Folds or unfolds a column.

setLaneCollapsed

public boolean setLaneCollapsed(KanbanLane lane, boolean collapsed)
Folds or unfolds a lane.

addChangeListener

public void addChangeListener(KanbanChangeListener l)
Adds a listener told of every change.

removeChangeListener

public void removeChangeListener(KanbanChangeListener l)
Removes a listener.

fireChanged

protected void fireChanged()
Tells the listeners the board changed.