1 /* ************************************************************************
3 qooxdoo - the new era of web development
8 2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org
11 LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
14 * Sebastian Werner (wpbasti)
15 * Andreas Ecker (ecker)
17 ************************************************************************ */
19 /* ************************************************************************
23 ************************************************************************ */
26 This class represents a selection and manage incoming events for widgets which need selection support.
28 qx.OO.defineClass("qx.manager.selection.VirtualSelectionManager", qx.manager.selection.SelectionManager,
29 function(vBoundedWidget) {
30 qx.manager.selection.SelectionManager.call(this, vBoundedWidget);
38 ---------------------------------------------------------------------------
39 MAPPING TO BOUNDED WIDGET
40 ---------------------------------------------------------------------------
43 qx.Proto.getFirst = function() {
44 return qx.lang.Array.getFirst(this.getItems());
47 qx.Proto.getLast = function() {
48 return qx.lang.Array.getLast(this.getItems());
51 qx.Proto.getItems = function() {
52 return this.getBoundedWidget().getData();
55 qx.Proto.getNextSibling = function(vItem)
57 var vData = this.getItems();
58 return vData[vData.indexOf(vItem)+1];
61 qx.Proto.getPreviousSibling = function(vItem)
63 var vData = this.getItems();
64 return vData[vData.indexOf(vItem)-1];
71 ---------------------------------------------------------------------------
72 MAPPING TO ITEM PROPERTIES
73 ---------------------------------------------------------------------------
76 qx.Proto.getItemHashCode = function(oItem)
82 return oItem._hash = qx.core.Object.toHashCode(oItem);
90 ---------------------------------------------------------------------------
91 MAPPING TO ITEM DIMENSIONS
92 ---------------------------------------------------------------------------
95 qx.Proto.scrollItemIntoView = function(vItem, vTopLeft) {
96 this.getBoundedWidget().scrollItemIntoView(vItem, vTopLeft);
99 qx.Proto.getItemLeft = function(vItem) {
100 return this.getBoundedWidget().getItemLeft(vItem);
103 qx.Proto.getItemTop = function(vItem) {
104 return this.getBoundedWidget().getItemTop(vItem);
107 qx.Proto.getItemWidth = function(vItem) {
108 return this.getBoundedWidget().getItemWidth(vItem);
111 qx.Proto.getItemHeight = function(vItem) {
112 return this.getBoundedWidget().getItemHeight(vItem);
116 In a qx.ui.listview.ListView there are no disabled entries support currently.
118 qx.Proto.getItemEnabled = function(vItem) {
128 ---------------------------------------------------------------------------
130 ---------------------------------------------------------------------------
133 qx.Proto.renderItemSelectionState = function(vItem, vIsSelected) {
134 this.getBoundedWidget()._updateSelectionState(vItem, vIsSelected);
137 qx.Proto.renderItemAnchorState = function(vItem, vIsAnchor) {
138 this.getBoundedWidget()._updateAnchorState(vItem, vIsAnchor);
141 qx.Proto.renderItemLeadState = function(vItem, vIsLead) {
142 this.getBoundedWidget()._updateLeadState(vItem, vIsLead);