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

Bug 352420

Summary: Box for Veto Exception is too small (Message Box?)
Product: z_Archived Reporter: Stephan Merkli <stephan.merkli>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel.wiehl, zimmermann
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
To Small Veto Exception Box
none
Full Size Veto Exception Box none

Description Stephan Merkli CLA 2011-07-19 04:58:05 EDT
Build Identifier: M20110210-1200

When a veto exception is thrown with a large text, the box showing the text is to small, the text is cut off.

Reproducible: Always

Steps to Reproduce:
1. throw new VetoException("Lorem ... amet."); (with long text)
2. Check appearance of message box
Comment 1 Stephan Merkli CLA 2011-07-19 04:59:50 EDT
Created attachment 199883 [details]
To Small Veto Exception Box
Comment 2 Stephan Merkli CLA 2011-07-19 05:00:06 EDT
Created attachment 199884 [details]
Full Size Veto Exception Box
Comment 3 Daniel Wiehl CLA 2011-07-29 06:02:48 EDT
Solved.

29.07.2011 dwi
bugzilla 352420
Problem:
The height of the message box is too small if text of either intro or content is wider than the initial message box width and therefore needs to be wrapped.
Solution:
Preceding Swing size calculation, the span of the labels is constrained to the maximal display width of the message box. Thus, Swing is able to calculate the height correctly in respect to the wrapping text height.
In order to make the text reflow when being resized to a width greater than the initial size, the span is reset just after being enlarged the first time.
Migration:
None
Comment 4 Matthias Zimmermann CLA 2011-10-10 12:57:42 EDT
shipped with scout 3.7.1