|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.ui.table.selection.Model
public class Model
A selection model.
Constructor Summary | |
---|---|
Model()
|
Method Summary | |
---|---|
void |
_addSelectionInterval(java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Adds a selection interval to the current selection, but doesn’t inform the listeners. |
void |
_applySelectionMode(java.lang.Object selectionMode,
java.lang.Object old)
Applies changes of the property value of the property selectionMode . |
void |
_clearSelection()
Clears the selection, but doesn’t inform the listeners. |
void |
_dumpRanges()
Logs the current ranges for debug perposes. |
void |
_fireChangeSelection()
Fires the “changeSelection” event to all registered listeners. |
void |
addSelectionInterval(java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Adds a selection interval to the current selection. |
void |
clearSelection()
Clears the selection. |
java.lang.Integer |
getAnchorSelectionIndex()
Returns the first argument of the last call to #setSelectionInterval() ,
#addSelectionInterval() or #removeSelectionInterval() . |
java.lang.Integer |
getLeadSelectionIndex()
Returns the second argument of the last call to #setSelectionInterval() ,
#addSelectionInterval() or #removeSelectionInterval() . |
java.lang.Integer |
getSelectedCount()
Returns the number of selected items. |
java.lang.Object |
getSelectedRanges()
Returns the selected ranges as an array. |
java.lang.Object |
getSelectionMode()
Returns the (computed) value of the property selectionMode . |
boolean |
hasBatchMode()
Returns whether batch mode is active. |
void |
initSelectionMode(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property selectionMode
with the default value defined by the class developer. |
boolean |
isSelectedIndex(java.lang.Integer index)
Returns whether a index is selected. |
boolean |
isSelectionEmpty()
Returns whether the selection is empty. |
void |
iterateSelection(java.lang.Object iterator,
java.lang.Object object)
Calls a iterator function for each selected index. |
void |
removeSelectionInterval(java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Removes a interval from the current selection. |
void |
resetSelectionMode()
Resets the user value of the property selectionMode . |
boolean |
setBatchMode(boolean batchMode)
Activates / Deactivates batch mode. |
void |
setSelectionInterval(java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Sets the selected interval. |
void |
setSelectionMode(java.lang.Object arg)
Sets the user value of the property selectionMode . |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Model()
Method Detail |
---|
public void _addSelectionInterval(java.lang.Integer fromIndex, java.lang.Integer toIndex)
Adds a selection interval to the current selection, but doesn’t inform the listeners.
public void _applySelectionMode(java.lang.Object selectionMode, java.lang.Object old)
Applies changes of the property value of the property selectionMode
.
For further details take a look at the property definition: _applySelectionMode(java.lang.Object, java.lang.Object)
.
public void _clearSelection()
Clears the selection, but doesn’t inform the listeners.
public void _dumpRanges()
Logs the current ranges for debug perposes.
public void _fireChangeSelection()
Fires the “changeSelection” event to all registered listeners. If the selection model currently is in batch mode, only one event will be thrown when batch mode is ended.
public void addSelectionInterval(java.lang.Integer fromIndex, java.lang.Integer toIndex)
Adds a selection interval to the current selection.
public void clearSelection()
Clears the selection.
public java.lang.Integer getAnchorSelectionIndex()
Returns the first argument of the last call to #setSelectionInterval()
,
#addSelectionInterval()
or #removeSelectionInterval()
.
public java.lang.Integer getLeadSelectionIndex()
Returns the second argument of the last call to #setSelectionInterval()
,
#addSelectionInterval()
or #removeSelectionInterval()
.
public java.lang.Integer getSelectedCount()
Returns the number of selected items.
public java.lang.Object getSelectedRanges()
Returns the selected ranges as an array. Each array element has a
minIndex
and a maxIndex
property.
public java.lang.Object getSelectionMode()
Returns the (computed) value of the property selectionMode
.
For further details take a look at the property definition: selectionMode
.
public boolean hasBatchMode()
Returns whether batch mode is active. See setter for a description of batch mode.
public void initSelectionMode(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property selectionMode
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: selectionMode
.
public boolean isSelectedIndex(java.lang.Integer index)
Returns whether a index is selected.
public boolean isSelectionEmpty()
Returns whether the selection is empty.
public void iterateSelection(java.lang.Object iterator, java.lang.Object object)
Calls a iterator function for each selected index.
Usage Example:
var selectedRowData = []; mySelectionModel.iterateSelection(function(index) { selectedRowData.push(myTableModel.getRowData(index)); });
public void removeSelectionInterval(java.lang.Integer fromIndex, java.lang.Integer toIndex)
Removes a interval from the current selection.
public void resetSelectionMode()
Resets the user value of the property selectionMode
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: selectionMode
.
public boolean setBatchMode(boolean batchMode)
Activates / Deactivates batch mode. In batch mode, no change events will be thrown but will be collected instead. When batch mode is turned off again and any events have been collected, one event is thrown to inform the listeners.
This method supports nested calling, i. e. batch mode can be turned more than once. In this case, batch mode will not end until it has been turned off once for each turning on.
public void setSelectionInterval(java.lang.Integer fromIndex, java.lang.Integer toIndex)
Sets the selected interval. This will clear the former selection.
public void setSelectionMode(java.lang.Object arg)
Sets the user value of the property selectionMode
.
For further details take a look at the property definition: selectionMode
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |