On Sun, 25 Feb 2018 at 13:41 Christian Lenz <[email protected]> wrote:

> I think you can use: UIManager.getColor(„TextField.background“) and you
> have to find the right key for that.
>
> Please if there is a better API, let me knows it.
>
>
Editor settings and mime lookup would probably be the better way to get
this info.

I use this in my save-flash plugin (one day I'll release that for the IDE!)
- see particularly the code here -

https://github.com/praxis-live/praxis-live/blob/master/praxis.live.editor.saveflash/src/net/neilcsmith/praxis/live/editor/saveflash/FlashOnSaveHighlight.java#L124

I assume you'd want to use StyleConstants.Background as the key?  See the
FontColorSettings code -

https://github.com/apache/incubator-netbeans/blob/master/editor.settings/src/org/netbeans/api/editor/settings/FontColorSettings.java

Hope that helps.

Best wishes,

Neil


-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Reply via email to