Hi
I have a problem with understanding the Lookup Api in netbeans Platform.
I want to have one module, scanning-api, where one final class will be and one interface to implement, and the application will scann pictures trough this module, and one or two modules, that will have dependency on this scanning-api module, and will implement all the functionality.
The implementation modules will scan pictures from scanner, and i want them to notify the one final class in scanning-api module about each finished scanning, so I can immediately show the documents to the user one-by-one through gui module, as soon as they are scanned.
The api module will not be extendet from TopComponent, because the user interaction is in other module, gui. I know about LookupListener
and Lookup.Provider
a bit, but I dont know which one to use and where. The scanned documents are transfered between modules using class ScannedDocumentObject
in third module, called common.
can you explain me how to do this (on some simple example) or at least where to find info? (I googled but for lookup.provider there are not so many examples, and I dont understand whats the difference between lookup.getdefault or getLookup etc.) I think, i have to use LookupListener in the gui module, and somewhere I should implement the lookup.provider, but dunno where.