Make action 'generic'
Trevor Carpenter <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <VI1PR02MB1278B79BEE644BA6E5174C79A4D30@VI1PR02MB1278.eurprd02.prod.outlook.com> |
Hi I have a set of classes that extend MultiDataObject that read bathymetry data in different formats via a set of readers that pass back a class implementing an interface so that they are all of a type that implements BathymetryAbstractProduct. At a project level I have an action that deletes other files in the project folders when the selected bathymetry file is deleted (since these become invalid). I added the action to the context menu of BathymetryDataNode. However, in the ActionListener the what is being passed to the constructor is the specific MultiDataObject type. As a work around I guess I could enable the action when any DataObject is in the lookup, and rely upon the action only ever being added to BathymetryDataNode - (I have not tried this yet). Will the above work or is there a better alternative? I would like to write one ActionListener that will work for BathymetryDataNode regardless of the specific MultiDataObject type. Thanks for your help Trevor The Scottish Association for Marine Science (SAMS) is registered in Scotland as a Company Limited by Guarantee (SC009292) and is a registered charity (9206). SAMS has two actively trading wholly owned subsidiary companies: SAMS Research Services Ltd (SC224404) and SAMS Ltd (SC306912). All Companies in the group are registered in Scotland and share a registered office at Scottish Marine Institute, Oban Argyll PA37 1QA. The content of this message may contain personal views which are not the views of SAMS unless specifically stated. Please note that all email traffic is monitored for purposes of security and spam filtering. As such individual emails may be examined in more detail.