How do I display multi-line text in JBTabsPresentation.setEmptyText()?
Answered
I would like to set an empty text for my tabs that is split into two lines of text. Is it supported? I tried something like "line 1\nline2" but it didn't work.
Please sign in to leave a comment.
Also, seems like the `setEmptyText()` was added only recently, is there anything similar to that in older versions? I would like to retain backwards compatibility to at least IDEA 2018.
This addition appeared in the code only in later versions (Feb 15 2019). Previously if there was nothing to display no rendering was done.
If you need this functionality in earlier versions and can subclass the JBTabsImpl then you can override paintComponent(). If myVisibleInfos.isEmpty() is true you do your own rendering (including multi-line strings), otherwise pass the call to super.
BTW, If you setup intellij-community project you can use the IDE VCS integration features to see changes in individual files by turning on Annotate in the gutter popup menu.