Questions tagged [selectionmodel]

Abstract class used by UI controls to provide a consistent API for maintaining selection. Used in Java(FX), GWT and other libraries / languages, too.

A SelectionModel is Model used to provide an API for maintaining data and/or visual item selection. The term SelectionModel was primarily established in the Java environment and now is used as a generally admitted term for abstract kinds of models used for data / item selection.

Resources

Java

JavaScript

80 questions
0
votes
1 answer

Multiple selection and JPopupMenu on right click

I am having problems with a popup menu on a JTable and the fact that this JTable allows for Multiple Interval Selection. I'm going to explain in detail my situation, making it as clear as possible, hopefully. I have a basic data class, lets call it…
mdm
  • 3,928
  • 3
  • 27
  • 43
0
votes
1 answer

angular selectionmodel .selected not working

I am facing an issue using SelectionModel. Sometimes it works fine and sometimes it does not work. I have spent a lot of time on it. While analyzing I found that sometimes it contains a value in _selected field and sometimes the object does not have…
jesper
  • 7
  • 3
0
votes
1 answer

GWT CellTree Selection of Parent nodes

I'm trying to use the GWT CellTree to display a heterogeneous, hierarchical data model. I need to be able to a single selection, but be able to select Parent nodes as well as child nodes. For example, if you look at GWT's own example, you'll see…
hba
  • 7,406
  • 10
  • 63
  • 105
0
votes
0 answers

Problem with normalizing a function with likelihood

I have a problem with the following code. In the evidence part, the value is very small so, in the end, the probabilities are not calculated. I need to normalize it, but in which part should it be? The code in MATLAB is: clear all; close all;…
0
votes
1 answer

ExtJS Grid selection not refreshing after store update

I have a grid with 2 rows, when removing the first row from the store the grid updates and looks as expected. But the old selection is still active with data that should not exist anymore. When doubleclicking (the new first row) in the grid, it…
0
votes
0 answers

Not getting expected results from a ListChangeListener on a TreeView selection model

I have the following test code below: tvNodes.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); tvNodes.getSelectionModel().getSelectedItems().addListener(new ListChangeListener>() { @Override …
Rafael Ibasco
  • 1,342
  • 3
  • 14
  • 19
0
votes
1 answer

ERROR TypeError: this.dataSource.findIndex is not a function

I have this: removeSelectedRows() { this.selection.selected.forEach(item => { let index: number = this.dataSource.findIndex(d => d === item); console.log(this.dataSource.findIndex(d => d === item)); …
Maria Gálvez
  • 187
  • 1
  • 1
  • 15
0
votes
0 answers

ExtJS 6.5 - SelectionModel select not working

I am trying to select the first row in a grid: Ext.getCmp('myGrid').getSelectionModel.select(0); I got an error saying select is undefined but I can see the function exists. I was using the ExtJS 4.2 version and I had no problem with that, now I…
Juan Alberto
  • 165
  • 3
  • 18
0
votes
1 answer

Checkbox are not checked when initial values are loaded in a mat-table

Want to load a table with checkbox already checked with the initial values that come from a local storage variable. I already put the initial data in the selectionModel: this.servChecked = [ {tipo: 'Servicio', descripcion: 'Visit', cantidad:…
0
votes
2 answers

ObservableList.remove(index, index+1) causing UnsupportedOperationException and still removes from the list

So in my FXML application I have a ListView displaying information from a class using an ObservableList as well as Add and Delete buttons. The add button works as intended. However, I want to be able to select an entry on the list a click the delete…
0
votes
1 answer

ExtJs: Programly select rows of a GridPanel in an inactive tab not working?

Basicly, I have a window contains two tabs, the second tab is a GridPanel and is initially inactive. I want to programly select two rows of this GridPanel(via CheckboxSelectionModel) by clicking a "show window" button , but found it not working.…
Colin Niu
  • 109
  • 12
0
votes
1 answer

JavaFX ListView//Radio Button setSelected() not working

Heyall, im working on this form, that has a listview on top and text fields with attributes of the list objects beneath it. I implemented listeners so that if you click on one of the objects in the list, they form will fill with the corresponding…
sonti yo
  • 61
  • 1
  • 9
0
votes
0 answers

How to invert QTableView selection with Sorting Enabled

The code below creates a single QTableView with a QPushButton: from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * app = QApplication([]) class Dialog(QDialog): def __init__(self, parent=None): …
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
0
votes
1 answer

ListSelectionModel - getMinSelectionIndex() falsely returns -1

I extracted a table from an Oracle database via a TableModel. Here is the source code: package database; import javax.swing.*; import javax.swing.table.*; import javax.swing.text.Document; import oracle.jdbc.internal.OracleResultSet; import…
Phreneticus
  • 349
  • 2
  • 11
0
votes
0 answers

Detect whether user has clicked on empty rows in tableview

I have a table view which has some rows. I am able to get the selected index which user has selected. I want to clear the selection when the user clicks on empty rows. How can I detect whether the user has clicked on empty rows or not? I have tried…
Anurag Sharma
  • 143
  • 6
  • 15