matthiasblaesing commented on PR #5591:
URL: https://github.com/apache/netbeans/pull/5591#issuecomment-1462753591

   If I understand if correctly, the API of `core.windows` is provided by 
`org.openide.windows`. So this is where new API could be established.
   
   I looked into the area and I saw this:
   
   
https://github.com/apache/netbeans/blob/12f20e87a763cfa033ab614d7069c006e1c84174/platform/core.windows/src/org/netbeans/core/windows/view/EditorView.java#L201-L213
   
   If you run this:
   
   ````
   ant 
-Drun.args.ide=-J-Dnetbeans.winsys.imageSource=org/netbeans/core/windows/resources/topComponentDragMoveFreeArea.gif
 tryme
   ```
   
   You get an icon from `core.windows` as background image for the empty editor 
area. So what could be possible (rough plan to give an idea):
   
   - use the system file system with a folder to lookup the component/component 
provider to use for background
   - modify `EditorView` to lookup the component to use from that folder and 
replace the code where currently the custom code for 
`Constants.SWITCH_IMAGE_SOURCE` is used.
   - add a special lookup provider that checks for the system property 
`Constants.SWITCH_IMAGE_SOURCE` and provides a component in the mentioned folder
   - add a lookup provider an implementation of your shortcut displayer to the 
NetBeans branding, where this lookup provider is registered with the path 
described
   - make `EditorView` listen for lookup changes for the chosen path and if the 
lookup changes let it update the background component
   
   This way you decouple the actual implementation (shortcut display) from the 
use site (where only a JComponent is expected). The two modules are loosly 
coupled and other users of the NB Platform can provide their own background 
providers.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to