{"action":"created","issue":{"url":"https://api.github.com/repos/hbrands/jira-import-test/issues/15","repository_url":"https://api.github.com/repos/hbrands/jira-import-test","labels_url":"https://api.github.com/repos/hbrands/jira-import-test/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/hbrands/jira-import-test/issues/15/comments","events_url":"https://api.github.com/repos/hbrands/jira-import-test/issues/15/events","html_url":"https://github.com/hbrands/jira-import-test/issues/15","id":168518034,"number":15,"title":"Inserted items become selected","user":{"login":"hbrands","id":7273079,"avatar_url":"https://avatars.githubusercontent.com/u/7273079?v=3","gravatar_id":"","url":"https://api.github.com/users/hbrands","html_url":"https://github.com/hbrands","followers_url":"https://api.github.com/users/hbrands/followers","following_url":"https://api.github.com/users/hbrands/following{/other_user}","gists_url":"https://api.github.com/users/hbrands/gists{/gist_id}","starred_url":"https://api.github.com/users/hbrands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbrands/subscriptions","organizations_url":"https://api.github.com/users/hbrands/orgs","repos_url":"https://api.github.com/users/hbrands/repos","events_url":"https://api.github.com/users/hbrands/events{/privacy}","received_events_url":"https://api.github.com/users/hbrands/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hbrands/jira-import-test/labels/www","name":"www","color":"b6a77e"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/hbrands/jira-import-test/milestones/3","html_url":"https://github.com/hbrands/jira-import-test/milestones/milestone%201","labels_url":"https://api.github.com/repos/hbrands/jira-import-test/milestones/3/labels","id":1913975,"number":3,"title":"milestone 1","description":null,"creator":{"login":"hbrands","id":7273079,"avatar_url":"https://avatars.githubusercontent.com/u/7273079?v=3","gravatar_id":"","url":"https://api.github.com/users/hbrands","html_url":"https://github.com/hbrands","followers_url":"https://api.github.com/users/hbrands/followers","following_url":"https://api.github.com/users/hbrands/following{/other_user}","gists_url":"https://api.github.com/users/hbrands/gists{/gist_id}","starred_url":"https://api.github.com/users/hbrands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbrands/subscriptions","organizations_url":"https://api.github.com/users/hbrands/orgs","repos_url":"https://api.github.com/users/hbrands/repos","events_url":"https://api.github.com/users/hbrands/events{/privacy}","received_events_url":"https://api.github.com/users/hbrands/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":15,"state":"open","created_at":"2016-07-31T13:32:30Z","updated_at":"2016-07-31T13:35:11Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-07-31T13:35:10Z","updated_at":"2016-07-31T13:35:13Z","closed_at":"2016-07-31T13:35:11Z","body":"<p>I am delighted with the performance, flexibility and ease of use of your platform, which I am <br/>\ncurrently evaluating for use in a table intensive application for my employer.</p>\n\n<p>Our application needs to display tabular data which gets notified through JMS. That means, <br/>\nultimately, that data arrives via a callback method in out code. I am therefore using a <br/>\nBasicEventList as base list, encapsulated in a SortedList and a subclass of AbstractFilterList as a <br/>\nmeans of providing the functionality (sorting & filtering by various criteria) that we need.</p>\n\n<p>The only problem so far arises with keeping selected rows between data insertions.Â I set the <br/>\nunderlying table selection model to ListSelectionModel.MULTIPLE_INTERVAL_SELECTION (anyway, <br/>\nas it is the default value). A thread keeps adding rows to the table, at a rate of 10 per second (to <br/>\ntest performance). I have noticed that whenever I select a row, further row insertions may <br/>\nmodify the number of selected rows. In particular, if a new row has the same internal index as <br/>\nthe currently selected one, it is guaranteed I will end up with two selected rows.</p>\n\n<p>That seems to be your intended behaviour as per the documentation of the class SelectionList; <br/>\nhowever, I tried to modify it in order to suppress this behaviour to no avail. In particular, I <br/>\nsuppressed the lines marked inside SelectionList.notifyListChanges():<br/>\n// when an element is inserted, it is selected if its index was selected<br/>\n} else if(changeType == ListChangeBlock.INSERT) {<br/>\nÂ Â Â  // when selected, add the flag and fire a selection event<br/>\nÂ Â Â  if(previouslySelected) </p>\n{\nÂ Â Â  Â Â Â  flagList.add(index, Boolean.TRUE); // <--- SUPRESS\nÂ Â Â  Â Â Â  updates.appendChange(previousSelectionIndex, ListChangeBlock.INSERT); // <--- SUPRESS\nÂ Â Â  // when not selected, just add the space\nÂ Â Â  }\n<p> else </p>\n{\nÂ Â Â  Â Â Â  flagList.add(index, null);\nÂ Â Â  }\n\n<p>I tried other changes, including the method SelectionList.valueChanged(). Do you have any <br/>\nsuggestion to solve this problem? Is it a bug in your code? In that case, I'd be willing to help and <br/>\ncontribute back to your project any bugfixes I develop.Â I can also provide you with my testing <br/>\ncode, but at this stage it's really simple: the thread inserting fake data rows does so in an <br/>\ninvokeLater() block, and uses a java.util.Timer for scheduling data feed.</p>\n\n<p>The problem does not manifest when I set the table selection model to <br/>\nListSelectionModel.SINGLE_SELECTION, by the way.</p>\n\n<p>Thank you for your time and for providing the Java Community with such a promising piece of <br/>\nwork.</p>\n\n<p>Yours<br/>\nIvÃ¡n Rivera RodrÃ­guez</p>\n<i>[GLAZEDLISTS-15] created by jessewilson at Tue, 10 Feb 2004 09:48:25 +0100, resolved Tue, 9 Mar 2004 17:39:56 +0100</i>"},"comment":{"url":"https://api.github.com/repos/hbrands/jira-import-test/issues/comments/236430171","html_url":"https://github.com/hbrands/jira-import-test/issues/15#issuecomment-236430171","issue_url":"https://api.github.com/repos/hbrands/jira-import-test/issues/15","id":236430171,"user":{"login":"hbrands","id":7273079,"avatar_url":"https://avatars.githubusercontent.com/u/7273079?v=3","gravatar_id":"","url":"https://api.github.com/users/hbrands","html_url":"https://github.com/hbrands","followers_url":"https://api.github.com/users/hbrands/followers","following_url":"https://api.github.com/users/hbrands/following{/other_user}","gists_url":"https://api.github.com/users/hbrands/gists{/gist_id}","starred_url":"https://api.github.com/users/hbrands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbrands/subscriptions","organizations_url":"https://api.github.com/users/hbrands/orgs","repos_url":"https://api.github.com/users/hbrands/repos","events_url":"https://api.github.com/users/hbrands/events{/privacy}","received_events_url":"https://api.github.com/users/hbrands/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T13:35:13Z","updated_at":"2016-07-31T13:35:13Z","body":"<p>IvÃ¡n -</p>\n\n<p>The current behaviour is \"as designed\" but I agree that there may be a better way to solve this <br/>\nproblem.</p>\n\n<p>This behaviour is the same as the behaviour of a simple JTable (ie. no Glazed Lists). When JTable <br/>\nreceives in insert at some index, say i, then the newly inserted row will be selected only if row i <br/>\nwas selected before the insertion. This behaviour has some nice properties: values inserted <br/>\nwithin a range of selected values will themselves become selected.</p>\n\n<p>But I also agree that this behaviour can be problematic. I think the solution is to add an extra <br/>\n\"mode\" to the SelectionList. The new mode will be as you describe. Inserted values will never be <br/>\nselected until done so explicitly by the user.</p>\n\n<p>Due to constraints at school and at work I will be unable to add this functionality until at least <br/>\nFebruary 14th, 2004. In the worst case it will take until February 21st to complete. Hopefully then <br/>\nI will get something working that solves this problem!</p>\n<i>jessewilson Tue, 10 Feb 2004 09:58:51 +0100</i>"}}
{"actor":{"display_login":"hbrands"}}