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
2
votes
2 answers

FXML - How to preselect an item in ChoiceBox?

What is the FXML equivalent for this (cb is a ChoiceBox): cb.getSelectionModel().select(1); I tried something like this: .... and .... and a…
zorglub76
  • 4,852
  • 7
  • 37
  • 46
2
votes
1 answer

Jtable which is set to listen cell selection events will not fire events

JTable which is set to listen cell selection events is not generating events when we select from the same row,, if i select other row other than the cell selected, Jtable fires events. this is code... example when i select the cell "row0 col0", and…
forum.test17
  • 2,119
  • 6
  • 30
  • 62
2
votes
1 answer

Extjs 4.x - CheckboxModel to get checked and unchecked value

I have used check box model in the grid panel. When i checked the check box i am the checked column value. Now what i need is when i unchecked i need to get that same unchecked value. var selModel = Ext.create('Ext.selection.CheckboxModel', { …
Riyaz Ahamed
  • 65
  • 2
  • 2
  • 6
2
votes
2 answers

Select/Highlight multiple rows in TreeView programatically

I have a TreeView and an array containing ModelIndexes from that tree. The treeview's selectionMode is set to Controls.SelectionMode.ExtendedSelection. Is there a way to highlight all the rows in the tree based on the indexes in the array? I can…
Ehsan Enayati
  • 299
  • 2
  • 16
2
votes
2 answers

selectionModel and selectedRows used selected rows but PyQt4.QtCore.QModelIndex object at 0x12xxxxxx

def listedensecilensatirlar(self): adada = self.ui.tableWidget.selectionModel().selectedRows() print adada I have chosen the line in each row I want to achieve but the model did not read the index. I choose what I want to get as text…
emreddogan
  • 33
  • 1
  • 5
2
votes
0 answers

To not have QItemSelectionModel.selectionChanged called when using QSortFilterProxyModel

I have a QTreeview that uses QSortFilterProxyModel to allow filtering by input text, and also uses QItemSelectionModel to keep selections reflected on treeview. Question is, is there any way to avoid the filtering result getting reflected on item…
IsaacS
  • 3,551
  • 6
  • 39
  • 61
2
votes
4 answers

how to remove all rows in jtable?

i have one jtable with listselectionlistener i can dynamically added the new rows in to my table,when i select the row the selected row content will be appear in text box i can able to edit and remove the data ,for my application i stored the …
Mr.Cool
  • 1,525
  • 10
  • 32
  • 51
1
vote
1 answer

Read multiple selection from TableView in JavaFX 2.0

I am trying to get the selection from a TableView in JavaFX 2.0. I have stored 5 Persons (5 rows) in the TableView. The code to get the selection model is: TableView tableView = myStage.getTableView(); ObservableList selection =…
Wouter Konecny
  • 3,260
  • 3
  • 19
  • 26
1
vote
0 answers

Selecting multiple objects and displaying selection in JavaFX TableView

I am trying to display a scene with a TableView where a user can click to select teams, which are then stored in an ObservableList. The selected teams should be highlighted and clicking a selected team should unselect them. Selecting multiple teams…
griffith97
  • 53
  • 4
1
vote
0 answers

JavaFX editable ComboBox not allowing duplicate items

I want to have an editable ComboBox that contains items of some type (e.g. integers), where I can add and delete items, allow the user to edit existing items, and allow for duplicate items. The problem is that whenever the user edits an existing…
1
vote
1 answer

QTableView issue with selectionModel()

I have a problem with my call to QTableView.selectionModel(). I instanciate my QTableView in another class, then when I open a new project and need to fill in my view I call a function fillGrid() in which I get the data among other things. This is…
Johanna
  • 1,343
  • 4
  • 25
  • 44
1
vote
1 answer

Selecting multiple rows in custom JTable with only mousePressed, mouseReleased, and mouseDragged

I am having trouble selecting and deselecting rows in my custom JTable class. My custom class extends JTable and implements MouseListener and MouseMotionListener. When I press a row, I want that row to be selected; if a nonselected row is pressed,…
Chris C.
  • 21
  • 2
1
vote
1 answer

How does angular's selection model determine equality of two objects?

I'm trying to select pre-select some users in a table using Angular's selectionmodel. The call retrieving the users in the table and the call retrieving the already selected users are different so the actual objects are not the same. I tried writing…
1
vote
1 answer

Use gllamm for Heckman selection model in panel setting

I want to use Heckman selection model for panel data. I googled and it seems that gllamm in Stata is able to do that. However, I could not find a proper tutorial of how to use it. I try to follow the one by Sophia Rabe-Hesketh but could not…
Ding Li
  • 673
  • 1
  • 7
  • 19
1
vote
1 answer

qt QTableWidget programattic select of cell - how to make ready with cursor in?

Environment: Qt 4.7.1 Qt Creator 2.1.0 c++ Problem: I have a QTableWidget. I add a row, and then select the first cell. What I want is to be able to immediately type into the cell after the program selects it, so I don't have to reach for the…
fyngyrz
  • 2,458
  • 2
  • 36
  • 43