[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Discussion: TextLayout Alignment and Justification

Hello,
i'm still confused about the justification feature:

what is the difference between wrap text and justify text?

In my opinion "wrap" means the text (not containing any returns) is aligned left (in left to right orientation) and the lines are packed with as much as possible words.
"justify" means, the text is wrapped and additionally aligned right.


But what is the clear definition of the consequences of
setJustify = true in the TextLayout class?

Obviously the text is aligned left except the last line (regardless
which alignment was set). Then the words are a little better packed on one line but not aligned right. Sometimes the character distance is changed if there is too much underflow (which is questionable)


My proposal is to add an alignment SWT.JUSTIFY which means the justification explained above. Then the question is if there is a need of the setJustify method, because the left alignment could include the justification implemented yet by default, and if i set center or right alignmnet i don't need any "justification" (by definition).

Best Regards,
Christian