UNPKG

@qooxdoo/framework

Version:

The JS Framework for Coders

69 lines (55 loc) 1.73 kB
/* ************************************************************************ qooxdoo - the new era of web development http://qooxdoo.org Copyright: 2004-2009 1&1 Internet AG, Germany, http://www.1und1.de License: MIT: https://opensource.org/licenses/MIT See the LICENSE file in the project's top-level directory for details. Authors: * Christian Hagendorn (chris_schmidt) * Martin Wittemann (martinwittemann) ************************************************************************ */ /** * Each object, which should support multiselection selection have to * implement this interface. */ qx.Interface.define("qx.ui.core.IMultiSelection", { extend: qx.ui.core.ISingleSelection, /* ***************************************************************************** MEMBERS ***************************************************************************** */ members : { /** * Selects all items of the managed object. */ selectAll : function() { return true; }, /** * Adds the given item to the existing selection. * * @param item {qx.ui.core.Widget} Any valid item * @throws {Error} if the item is not a child element. */ addToSelection : function(item) { return arguments.length == 1; }, /** * Removes the given item from the selection. * * Use {@link qx.ui.core.ISingleSelection#resetSelection} when you * want to clear the whole selection at once. * * @param item {qx.ui.core.Widget} Any valid item * @throws {Error} if the item is not a child element. */ removeFromSelection : function(item) { return arguments.length == 1; } } });