API Reference 0.7.1rikulo_modelOpensModel<T>

OpensModel<T> abstract class

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

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

 /** Returns true if the node shall be opened.
  * That is, it tests if the given node is in the list of opened nodes.
  */
 bool isOpened(T node);
 /** Returns true if the list of opened nodes is empty.
  */
 bool get isOpensEmpty;

 /** Adds the given node to the list of opened nodes.
  */
 bool addToOpens(T node);
 /** Removes the given node from the list of opened nodes.
  */
 bool removeFromOpens(T node);
 /** Empties the list of opened nodes.
  */
 void clearOpens();
}

Subclasses

AbstractTreeModel<T>

Properties

final bool isOpensEmpty #

Returns true if the list of opened nodes is empty.

bool get isOpensEmpty;

abstract Set<T> get opens #

Returns the current list of nodes that are opened. It is readonly. Don't modify it directly. Otherwise, UI won't be updated correctly.

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

Replace the current list of node that are opened with the given set.

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

Methods

abstract bool addToOpens(T node) #

Adds the given node to the list of opened nodes.

abstract void clearOpens() #

Empties the list of opened nodes.

abstract bool isOpened(T node) #

Returns true if the node shall be opened. That is, it tests if the given node is in the list of opened nodes.

abstract bool removeFromOpens(T node) #

Removes the given node from the list of opened nodes.