Skip to main content



      Home
Home » Eclipse Projects » GEF » TextFlow and FlowPage producing ugly-cropped texts
TextFlow and FlowPage producing ugly-cropped texts [message #486943] Mon, 21 September 2009 05:09 Go to previous message
Eclipse UserFriend
Hi,

where implementing a tool using GEF. For drawing some labels, we've
implemented the following Figure:
public class PetriNetLabelFigure extends Figure {

private TextFlow textFlow;
private FlowPage flowPage;

public PetriNetLabelFigure() {
setBackgroundColor(ColorConstants.tooltipBackground);
setForegroundColor(ColorConstants.tooltipForeground);
flowPage = new FlowPage();
textFlow = new TextFlow();
textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
ParagraphTextLayout.WORD_WRAP_SOFT));
flowPage.add(textFlow);
setLayoutManager(new StackLayout());
add(flowPage);
}
....


This works so far, except for 2 problems:
1) While zooming, with some text-lengths in the flowPage (we're setting
these using textFlow.setText) and some zoom-levels, the last character of
the text gets truncated. I consider this a bug, so we posted this under
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288745
2) When changing the windows font-size from 96 dpi to 120 dpi and opening my
drawings, the text gets truncated very ugly. Is there a way to make TextFlow
and FlowPage independent of the windows "font-size" (set unter
system-display-advanced) ? This problems makes GEF nearly unusable in our
context, since having different dpi-settings is commonly used here.


Is there a better way to format a label with automatic word-wrap? It would
be great if our drawings would look the same when getting openend again. Can
I do some manual scaling? Any hints?
http://dev.eclipse.org/newslists/news.eclipse.platform.swt/m sg23152.html
seems to have the same problems, but there is no solution given over there
:-(


-orgler
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:GEF png fails when WebSphere run as a Windows Service
Next Topic:[Announce] GEF 3.5.1 is available
Goto Forum:
  


Current Time: Sat Jul 19 04:26:56 EDT 2025

Powered by FUDForum. Page generated in 0.04789 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top