glazedlists

How to sort glazed TreeList?

China☆狼群 提交于 2020-01-06 03:18:05
问题 I have a pretty weird question - how to sort glazed TreeList? I am using it in SWT NatTable, and when my data provider is set to GlazedListsDataProvider with TreeList inside it, sorting works in a very strange way. It works fine, if I am using GlazedListsDataProvider with SortedList. For instance, my tree looks like that: Root Node1 Child1 Child2 Node2 Child3 I need to sort only children INSIDE Node1 and Node2, separately one of another (so that only child1 and child2 will change their place)

Editing JTable from RestulSet Table

大兔子大兔子 提交于 2020-01-01 19:48:08
问题 Continuing this question. My problem is that I can not edit my JTable. I get an exception and the Object value instead of what I should be seeing. I am using the ResultSet Table code with a MS-Access database and with a few modifications. My code can be found here. I run into an error when I rs.updateRow() is called. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Error in row. I did a google search on this error with updateRow() and not much came up. The only real answer I

How to deal with GlazedLists's PluggableList requirement for shared publisher and lock

 ̄綄美尐妖づ 提交于 2019-12-25 06:47:41
问题 I have just started using GlazedLists in a Java project which uses beansbinding extensively (MVVM pattern). PluggableList is allowing me to bind a source list to a table, and then change the source list at runtime. In order to make this happen every source list must share the same ListEventPublisher and ReadWriteLock, since PluggableList must share a lock and plublisher with it's source. I accomplish this by creating a static publisher and lock in my class that owns the potential source lists

Groovy 'as' keyword to implement 2+ interfaces

◇◆丶佛笑我妖孽 提交于 2019-12-22 11:28:46
问题 I would like to implement a Glazed List that has both an AdvancedTableFormat and WritableTableFormat interface. I am reading here: http://www.jroller.com/aalmiray/entry/glazedlists_groovy_not_your_regular and for one interface it seems this is possible in Groovy with the "as" keyword: # return new EventTableModel(linksList, [ # getColumnCount: {columnNames.size()}, # getColumnName: {index -> columnNames[index]}, # getColumnValue: {object, index -> # object."${columnNames[index].toLowerCase()}

GlazedList update EventList in JTable

隐身守侯 提交于 2019-12-12 02:49:38
问题 How can I update EventList list to update JTable ? This is what I do: String[] headers = new String[]{"MNO", "NAME", "ID/REG No", "PHONE"}; String[] properties = new String[]{"milkNo", "fullName", "nationalId", "phone1"}; TextFilterator<Member> personTextFilterator = new TextFilterator<Member>() { @Override public void getFilterStrings(List list, Member m) { list.add(m.getFullName()); list.add(m.getMilkNo()); list.add(m.getNationalId()); list.add(m.getPhone1()); } }; MatcherEditor<Member>

How to prevent selection of SeparatorList.Separator in a JList?

荒凉一梦 提交于 2019-12-12 01:51:41
问题 I have created a JList using GrazedLists, specifically an EventList which I then pass into a SeparatorList with a custom Comparator that sorts my EventList elements. I am using a DefaultEventListModel as the JList model, passing in my SeparatorList. And I am using a custom CellRenderer to decorate the SeparatorList.Separator cells. All is displaying nicely, I see a nicely formatted list grouped as I like, similar to optgroups in HTML SELECT elements. Now I would like to prevent selection of

How do you remove the JComboBox 'click and see dropdown' functionality?

纵饮孤独 提交于 2019-12-11 02:38:38
问题 I have a JComboBox which uses GlazedLists to add type-ahead functionality. I want the user to type in a string and see type-ahead (this is working thanks to Glazedlists). However, I don't want users to be able to click the down arrow of the combobox and inspect the dropdown list. I've made the down arrow invisible and made the combobox editable so that it resembles a JTextField. However, you are still able to hover the mouse over the area where the down arrow used to be and click it. This

Sorting of tree implemented with NatTable

不打扰是莪最后的温柔 提交于 2019-12-08 04:08:50
问题 I'm trying to implement sorting of tree implemented with NatTable but I can't really understand how it works. My problem is that after the sorting of any column other than 'tree' column child nodes can move to invalid parent. Though the order of elements is correct on all levels of hierarchy. So basically I don't understand the purpose of TreeList.Format.getComparator() and how it related to comparators registred for the columns, and I don't understand when and why node can change its parent.

Groovy 'as' keyword to implement 2+ interfaces

醉酒当歌 提交于 2019-12-06 11:58:19
I would like to implement a Glazed List that has both an AdvancedTableFormat and WritableTableFormat interface. I am reading here: http://www.jroller.com/aalmiray/entry/glazedlists_groovy_not_your_regular and for one interface it seems this is possible in Groovy with the "as" keyword: # return new EventTableModel(linksList, [ # getColumnCount: {columnNames.size()}, # getColumnName: {index -> columnNames[index]}, # getColumnValue: {object, index -> # object."${columnNames[index].toLowerCase()}" # }] as TableFormat) Is it somehow possible to do this for two interfaces? If so how? Thank you!

Database to GlazedList/Jtable and then edit the database through the GlazedList/JTable

自古美人都是妖i 提交于 2019-11-30 10:30:50
I am able to break this problem down into two questions: What is the best way to put the contents of a database (MS-Access) into a GlazedList / JTable ? How do I make sure any changes made to the GlazedList / JTable are reflected on the database (MS-Access)? Here are the things I know: I know how to retrieve/manipulate the information from a database using the JDBC method . I know that GlazedList 's require reflection so I would need to make a class that contains every column/field in the database. This is not very expandable... What is the best way to go about this problem? edit:// I have