Bug 342610 [Forms] Form heading wraps text unexpectedly
Build Identifier: 20100218-1602 The form heading unexpectedly wraps heading text. A code snippet will be attached that defines a basic editor with a short form heading text string. When the editor is first displayed, there is a generous amount of horizontal space, more than sufficient to display the entire string, however, the last word form heading text appears to be truncated. If the editor is resized horizontally (shrunk), the last word of the form heading text will appear on the second line of the header. Incidentally, some longer heading text strings do not exhibit this problem. Reproducible: Always Steps to Reproduce: Display the editor defined by the attached code snippet. The last word form heading text appears to be truncated. When the editor is resized horizontally (shrunk), the last word of the form heading text will appear on the second line of the header.
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IExpansionListener;
import org.eclipse.ui.internal.forms.widgets.FormUtil;
import org.eclipse.ui.internal.forms.widgets.FormsResources;
/**
 * This composite is capable of expanding or collapsing a single client that is
 * its direct child. The composite renders an expansion toggle affordance
 * (according to the chosen style), and a title that also acts as a hyperlink
 * (can be selected and is traversable). The client is layed out below the title
 * when expanded, or hidden when collapsed.
 * <p>
 * The widget can be instantiated as-is, or subclassed to modify some aspects of
 * it. *
 * <p>
 * Since 3.1, left/right arrow keys can be used to control the expansion state.
 * If several expandable composites are created in the same parent, up/down
 * arrow keys can be used to traverse between them. Expandable text accepts
 * mnemonics and mnemonic activation will toggle the expansion state.
 * 
 * <p>
 * While expandable composite recognize that different styles can be used to
 * render the title bar, and even defines the constants for these styles (<code>TITLE_BAR</code>
 * and <code>SHORT_TITLE_BAR</code> the actual painting is done in the
 * subclasses.
 * 
 * @see Section
 * @since 3.0
 */
public class ExpandableComposite extends Canvas {