These are chat archives for fiji/fiji

2nd
Feb 2017
Curtis Rueden
@ctrueden
Feb 02 2017 18:11
@etarena For fiji/Colocalisation_Analysis#24 you can likely force manual line breaks with <br>.
Or if you want it to wrap intelligently then it is probably a matter of putting a preferred and/or maximum width on the relevant component.
Ellen T Arena
@etarena
Feb 02 2017 18:13
@ctrueden - I think the latter option is better... but so far, I haven't gotten it to work myself.
i wanted the table to change size along with the window size and then wrap the text accordingly... it works fine for our strings with spaces - just not for those without.
Jan Eglinger
@imagejan
Feb 02 2017 18:31
@etarena it seems that JEditorPane only has a very limited CSS support (http://stackoverflow.com/a/19758631/1919049), so you won't be able to use word-wrap, I'm afraid.
Ellen T Arena
@etarena
Feb 02 2017 18:36
@imagejan ... I'm super new to all of this. thanks for the insight. any suggestions though? it's really a minor issue... but it's true the job name in Coloc 2 can get exceedingly long given the image names.
Curtis Rueden
@ctrueden
Feb 02 2017 18:48
@imagejan It sounds like she has one very long word, which normally won't wrap regardless of word-wrap setting?
So @etarena: a hack would be to simply inject a space somewhere in there, when it is too long.
Otherwise, you will need to set the maximum table width. There are a couple of ways to do this.

One way is:

table.setMaximumSize(new Dimension(500, table.getMaximumSize().height));

Where 500 is the maximum width you want to allow.

Alternately, if you use MiGLayout then you do not need to hack around with min/pref/max sizes at all, because they are specified instead in the row+column layout string.
Jan Eglinger
@imagejan
Feb 02 2017 18:54

normally won't wrap regardless of word-wrap setting?

I was thinking of word-wrap: break-word because I found it here: http://stackoverflow.com/a/8179481/1919049

Ellen T Arena
@etarena
Feb 02 2017 18:58
Thanks both @imagejan & @ctrueden !!
I'll give it another go...