API Reference 0.7.1rikulo_modelDisablesModel<T>

DisablesModel<T> abstract class

Indicates a model that allows to disable some of the objects. It is a supplymental interface used with other models, such as ListModel.

abstract class DisablesModel<T> {
 /**
  * Returns the current list of disabled objects.
  * It is readonly. Don't modify it directly. Otherwise, UI won't be
  * updated correctly.
  */
 Set<T> get disables;
 /**
  * Replace the current list of disabled objects with the given set.
  *
  * Notice this method copies the content of [disables], so it is OK
  * to use it after the invocation.
  */
 void set disables(Iterable<T> disables);

 /** Returns whether an object is disabled.
  */
 bool isDisabled(Object obj);
 /**
  * Returns true if the list of the disabled objects is currently empty.
  */
 bool get isDisablesEmpty;

 /**
  * Add the specified object into the current list of disabled objects.
  * It returns whether it has been added successfully.
  * Returns false if it is already disabled.
  */
 bool addToDisables(T obj);
 /**
  * Remove the specified object from the current list of disabled objects.
  * It returns whether it is removed successfully.
  * Returns false if it is not disabled.
  */
 bool removeFromDisables(Object obj);
 /**
  * Change the current list of disabled objects to the empty set.
  */
 void clearDisables();
}

Subclasses

AbstractDataModel<T>

Properties

abstract Set<T> get disables #

Returns the current list of disabled objects. It is readonly. Don't modify it directly. Otherwise, UI won't be updated correctly.

abstract void set disables(Iterable<T> disables) #

Replace the current list of disabled objects with the given set.

Notice this method copies the content of disables, so it is OK to use it after the invocation.

final bool isDisablesEmpty #

Returns true if the list of the disabled objects is currently empty.

bool get isDisablesEmpty;

Methods

abstract bool addToDisables(T obj) #

Add the specified object into the current list of disabled objects. It returns whether it has been added successfully. Returns false if it is already disabled.

abstract void clearDisables() #

Change the current list of disabled objects to the empty set.

abstract bool isDisabled(Object obj) #

Returns whether an object is disabled.

abstract bool removeFromDisables(Object obj) #

Remove the specified object from the current list of disabled objects. It returns whether it is removed successfully. Returns false if it is not disabled.