[ 
https://issues.apache.org/jira/browse/PIVOT-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332615#comment-16332615
 ] 

Roger Whitcomb commented on PIVOT-1011:
---------------------------------------

This time the Component-related listeners and bunch of others:

Sending demos\src\org\apache\pivot\demos\rss\RSSFeedDemo.java
Sending tests\src\org\apache\pivot\tests\ListViewSelectionTest.java
Sending tests\src\org\apache\pivot\tests\TextInputValidatorTest.java
Sending tests\src\org\apache\pivot\tests\WindowTest.java
Sending tests\src\org\apache\pivot\tests\issues\Pivot811.java
Sending tests\src\org\apache\pivot\tests\issues\Pivot951.java
Sending tutorials\src\org\apache\pivot\tutorials\KitchenSink.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\explorer\tools\ComponentInspectorSkin.java
Sending tutorials\src\org\apache\pivot\tutorials\layout\SimpleTablePanes.java
Sending wtk\src\org\apache\pivot\wtk\ColorChooserBindingListener.java
Sending wtk\src\org\apache\pivot\wtk\ColorChooserButtonBindingListener.java
Sending wtk\src\org\apache\pivot\wtk\Component.java
Sending wtk\src\org\apache\pivot\wtk\ComponentClassListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentDataListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentDecoratorListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentMouseButtonListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentMouseListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentMouseWheelListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentStateListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentStyleListener.java
Sending wtk\src\org\apache\pivot\wtk\ComponentTooltipListener.java
Sending wtk\src\org\apache\pivot\wtk\ListView.java
Sending wtk\src\org\apache\pivot\wtk\ListViewListener.java
Sending wtk\src\org\apache\pivot\wtk\ListViewSelectionListener.java
Sending wtk\src\org\apache\pivot\wtk\RulerListener.java
Sending wtk\src\org\apache\pivot\wtk\ScrollPaneListener.java
Sending wtk\src\org\apache\pivot\wtk\TextInputBindingListener.java
Sending wtk\src\org\apache\pivot\wtk\TextInputListener.java
Sending wtk\src\org\apache\pivot\wtk\TextInputSelectionListener.java
Sending wtk\src\org\apache\pivot\wtk\TextPane.java
Sending wtk\src\org\apache\pivot\wtk\skin\CalendarButtonSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\ColorChooserButtonSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\ListButtonSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\TextPaneSkinComponentNodeView.java
Sending wtk\src\org\apache\pivot\wtk\text\Node.java
Sending wtk\src\org\apache\pivot\wtk\text\NodeListener.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraAccordionSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraCalendarSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraExpanderSkin.java
Sending 
wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSheetSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraPaletteSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraRollupSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraSheetSkin.java
Sending 
wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraSuggestionPopupSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraTabPaneSkin.java
Sending 
wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraVFSBrowserSheetSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraVFSBrowserSkin.java
Transmitting file data ...................................................done
Committing transaction...
Committed revision 1821689.

> 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)

Reply via email to