Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3500 closed defect (fixed)

[PATCH] raw html in UI message

Reported by: avarab@… Owned by: xeen
Priority: minor Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

See screenshot

Attachments (3)

html-in-message.png (17.4 KB ) - added by avarab@… 15 years ago.
html in UI message
jmultiline.patch (3.0 KB ) - added by xeen 15 years ago.
Patch is unnecessary large due to Eclipse reformatting the source code. I still do not get why we need braces around single statement blocks, but well.
new_jmultiline.patch (9.1 KB ) - added by xeen 15 years ago.
Well, apparently I did work on it. This is a quick hack after I read a tip on Sun's bug tracker. Labels do support line breaking, but one must set the preferred width. The new jmutliline class derives this value automatically from the parent window. The patch is not well tested, there might be problems. Requires ExtendedDialog to not use a JScrollpane because it will display scrollbars even when not needed (they arent taken into account, might be fixable though). I didn't check if the max-width function actually works. Didn't check for other consumers, but it should have the same function names. Maybe I'll fix issues in my tree if I find them, but guarantees that this ever becomes a good patch.

Download all attachments as: .zip

Change History (9)

by avarab@…, 15 years ago

Attachment: html-in-message.png added

html in UI message

comment:1 by xeen, 15 years ago

The reason for this is that ExtendedDialogs displays message strings using a JMultilineLabel which does not support HTML. There are many possibilities to fix this, two easy ones and the hard one (add proper HTML support to JMulti…). I favor the latter but I lack the skills to do so (that code confuses me in ways I never deemed possible). I'll attach a patch that fixes the issue at hand, but probably this is not the best way to go.

by xeen, 15 years ago

Attachment: jmultiline.patch added

Patch is unnecessary large due to Eclipse reformatting the source code. I still do not get why we need braces around single statement blocks, but well.

comment:2 by Gubaer, 15 years ago

Summary: raw html in UI message[PATCH] raw html in UI message

comment:3 by xeen, 15 years ago

Just a note: I do not consider this patch to be a good solution. We want proper HTML support in a multiline label, but I'm not going to work on this.

by xeen, 15 years ago

Attachment: new_jmultiline.patch added

Well, apparently I did work on it. This is a quick hack after I read a tip on Sun's bug tracker. Labels do support line breaking, but one must set the preferred width. The new jmutliline class derives this value automatically from the parent window. The patch is not well tested, there might be problems. Requires ExtendedDialog to not use a JScrollpane because it will display scrollbars even when not needed (they arent taken into account, might be fixable though). I didn't check if the max-width function actually works. Didn't check for other consumers, but it should have the same function names. Maybe I'll fix issues in my tree if I find them, but guarantees that this ever becomes a good patch.

comment:4 by stoecker, 15 years ago

Owner: changed from team to xeen

Please checking yourself when you think it works as expected.

comment:5 by xeen, 15 years ago

Resolution: fixed
Status: newclosed

(In [2154]) Rewrite JMultilineLabel to support HTML markup.
this closes #3500

comment:6 by xeen, 15 years ago

Well, here goes. It's another new approach that supports the maxWidth. The new JMultilineLabel will not work if put into JScrollBox or similar, see class description. If you find any bugs related to this, please assign them to me.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain xeen.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.