Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-770

Parameterize ListView, TableView and TreeView getters and setters for ListData

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0
    • 2.5
    • None
    • None

    Description

      Firstly, please forgive me if I use incorrect terms, I'm no generics expert

      I'll use TableView#getTableData() as an example. This method is today anonymously typed, so that if you want to mutate the list, you need to cast it to a spesific type first. This can easily be fixed by parameterizing the method. The same goes for ListView and TreeView as well. I'll supply a patch to change this behavior. This removes an annoyance and enables better looking code.

      This is how one need to do it today:

      List<MyObject> myList = (List<MyObject>) tableView.getTableData();
      myList.add(myObject);

      By parameterizing the methods, this changes to:

      tableView.getTableData().add(myObject);

      Attachments

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            edvin Edvin Syse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: