[ https://issues.apache.org/jira/browse/PIVOT-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16336884#comment-16336884 ]
Roger Whitcomb commented on PIVOT-1011: --------------------------------------- And still more (getting closer): Sending demos\src\org\apache\pivot\demos\million\LargeData.java Sending demos\src\org\apache\pivot\demos\tables\FixedColumnTableDemo.java Sending tests\src\org\apache\pivot\tests\issues\Pivot751WithoutGUI.java Sending tests\src\org\apache\pivot\tests\issues\Pivot841.java Sending tutorials\src\org\apache\pivot\tutorials\bxmlexplorer\BXMLExplorerDocument.java Sending tutorials\src\org\apache\pivot\tutorials\explorer\ComponentExplorerWindow.java Sending tutorials\src\org\apache\pivot\tutorials\navigation\TabPanes.java Sending tutorials\src\org\apache\pivot\tutorials\stocktracker\StockTrackerWindow.java Sending tutorials\src\org\apache\pivot\tutorials\webqueries\ExpensesWindow.java Sending wtk\src\org\apache\pivot\wtk\Button.java Sending wtk\src\org\apache\pivot\wtk\ButtonBindingListener.java Sending wtk\src\org\apache\pivot\wtk\ButtonListener.java Sending wtk\src\org\apache\pivot\wtk\ButtonPressListener.java Sending wtk\src\org\apache\pivot\wtk\ButtonStateListener.java Sending wtk\src\org\apache\pivot\wtk\TabPane.java Sending wtk\src\org\apache\pivot\wtk\TabPaneAttributeListener.java Sending wtk\src\org\apache\pivot\wtk\TabPaneListener.java Sending wtk\src\org\apache\pivot\wtk\TabPaneSelectionListener.java Sending wtk\src\org\apache\pivot\wtk\TableView.java Sending wtk\src\org\apache\pivot\wtk\TableViewBindingListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewColumnListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewHeader.java Sending wtk\src\org\apache\pivot\wtk\TableViewHeaderListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewHeaderPressListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewRowListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewSelectionListener.java Sending wtk\src\org\apache\pivot\wtk\TableViewSortListener.java Sending wtk\src\org\apache\pivot\wtk\TextArea.java Sending wtk\src\org\apache\pivot\wtk\TextAreaBindingListener.java Sending wtk\src\org\apache\pivot\wtk\TextAreaContentListener.java Sending wtk\src\org\apache\pivot\wtk\TextAreaListener.java Sending wtk\src\org\apache\pivot\wtk\TextAreaSelectionListener.java Sending wtk\src\org\apache\pivot\wtk\TextPane.java Sending wtk\src\org\apache\pivot\wtk\TextPaneCharacterListener.java Sending wtk\src\org\apache\pivot\wtk\TextPaneListener.java Sending wtk\src\org\apache\pivot\wtk\TextPaneSelectionListener.java Sending wtk\src\org\apache\pivot\wtk\TreeView.java Sending wtk\src\org\apache\pivot\wtk\TreeViewBranchListener.java Sending wtk\src\org\apache\pivot\wtk\TreeViewListener.java Sending wtk\src\org\apache\pivot\wtk\TreeViewNodeListener.java Sending wtk\src\org\apache\pivot\wtk\TreeViewNodeStateListener.java Sending wtk\src\org\apache\pivot\wtk\TreeViewSelectionListener.java Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSkin.java Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraVFSBrowserSkin.java Transmitting file data .............................................done Committing transaction... Committed revision 1822073. > Move ListenerList implementations of interfaces into the interface itself > ------------------------------------------------------------------------- > > Key: PIVOT-1011 > URL: https://issues.apache.org/jira/browse/PIVOT-1011 > Project: Pivot > Issue Type: Improvement > Components: core-collections, core-util, web, wtk, wtk-terra > Environment: All > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > Attachments: 1011.diffs > > > A universal paradigm in Pivot is to have a "listener" interface for a class > or data structure that is used to notify listeners of changes in the > class/data. There is then an "Adapter" static class in the interface file > that implements the interface with default implementations. Then there is a > very separate enclosed static class that implements the "ListenerList" > interface of that listener interface. And usually (or always) this "listener > list" class is defined/used only in the class that needs to notify the > listeners. However, this class must be very parallel to not only the > interface itself, but also the "Adapter" class, and yet it is in a different > place. > So, it seems somewhat reasonable to move all these "listener list" classes > into the interfaces themselves, so all three related things are located in > the same file. A preliminary POC of this concept was done with "Query.java", > and "QueryListener.java" and it looks good. > This doesn't seem to require changes to client code, because the accessor > methods only refer to "ListenerList<....>" and not to the listener list class > itself (in order to be more general, of course), but which helps us to hide > the implementing class away inside the interface. > I will attach the diff of the POC, to hopefully make this more clear. It may > seem a somewhat nebulous concept, but the idea is to keep "like things" > together for clarity. -- This message was sent by Atlassian JIRA (v7.6.3#76005)