Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 91004

Summary: [Dialogs] TitleAreaDialog shoud allow more than 2 lines in the title message
Product: [Eclipse Project] Platform Reporter: Chris Gross <schtoo>
Component: UIAssignee: Susan McCourt <susan>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P4 CC: billy.biggs, higginmi, mbarkhou
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Chris Gross CLA 2005-04-11 11:38:46 EDT
The TitleAreaDialog truncates a message that is longer than 2 lines.  

Patch incoming...
Comment 1 Chris Gross CLA 2005-04-11 11:43:27 EDT
Created attachment 19760 [details]
Patch

This is a small patch that allows the TitleAreaDialog to layout according to
the size of the message.  This is a very minor change.	Only two methods are
affected and < 10 lines.
Comment 2 Tod Creasey CLA 2005-04-12 11:30:35 EDT
The problem with changing is twofold

1) It is easy to get a resize that can fire a large dialog off of the screen. We
take a chance at breaking accessibility for a lot of people if we do this

2) Flash - it will cause a lot of extra resizes.
Comment 3 Chris Gross CLA 2005-04-12 12:19:13 EDT
Re 1:
I understand that but I would think that would be something the developer who 
is extending TitleAreaDialog would/should be concerned about.  I'd rather not 
have the TitleAreaDialog not tie my hands just because it is possible that I 
will screw up and do something stupid.

Re 2:
Yeah I realized this too.  I'd like to rewrite the code a little not to use 
FormLayout and that would make the code a little simplier.  Then I wouldn't 
have to switch the FormData/FormAttachments when the message text changes.  I 
think with the new option in GridLayout in 3.1 it could be done.  Then I don't 
think I'd have to do any extra resizes, with the exception of resizing just 
before open so that it does resize per the message text (with the assumption 
that you are not going to set the message text after the dialog is opened).
Comment 4 Chris Gross CLA 2005-04-18 09:29:01 EDT
Alternatively we could add an extra method for the user to explicitly set the 
number of lines that should be allowed for the message.  
Comment 5 Tod Creasey CLA 2005-05-19 15:30:22 EDT
*** Bug 95979 has been marked as a duplicate of this bug. ***
Comment 6 Chris Gross CLA 2005-05-19 15:49:24 EDT
FYI, the patch I submitted really needs to be rewritten.  There are more than 
a few problems with it.  I'd like to rewrite it (when I can find the time).
Comment 7 Mike Higginbotham CLA 2006-07-11 17:47:37 EDT
I have also run into this problem. It is made worse by the use of large fonts, e.g., high-contrast mode. I have created a work-around that relies on a feature of the current TitleAreaDialog implementation where, when the default image is used, the bottom of the label containing the message lines up with the bottom of the label containing the image. If the user provides an image, the two labels may not be tied together in that manner. For that reason, I overrode setTitleImage to throw an UnsupportedOperationException. The same problem can arise when large fonts are used (e.g., high-contrast mode). In such cases, the work-around results in the same output as TitleAreaDialog. The work-around works in both 3.1.1 and 3.2.

I would much prefer that TitleAreaDialog support multiple lines in the title area message.
Comment 8 Susan McCourt CLA 2007-06-29 13:33:01 EDT

*** This bug has been marked as a duplicate of bug 16552 ***