org.eclipse.draw2d.text.TextFlow Java Examples

The following examples show how to use org.eclipse.draw2d.text.TextFlow. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventTooltip.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
public EventTooltip(String text) {
	setForegroundColor(ColorConstants.tooltipForeground);
	setBackgroundColor(ColorConstants.tooltipBackground);
	setOpaque(true);

	setBorder(new MarginBorder(VERTICAL_INDENT, HORIZONTAL_INDENT, VERTICAL_INDENT, HORIZONTAL_INDENT));
	add(new TextFlow(text));
}
 
Example #2
Source File: NoteFigure.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
public void create() {
    setBorder(new MarginBorder(RETURN_WIDTH));
    setLayoutManager(new BorderLayout());
    final FlowPage page = new FlowPage();

    label = new TextFlow();
    final ParagraphTextLayout layout = new ParagraphTextLayout(label, ParagraphTextLayout.WORD_WRAP_SOFT);
    label.setLayoutManager(layout);
    label.setOpaque(false);

    page.add(label);

    this.add(page, BorderLayout.CENTER);
}
 
Example #3
Source File: WalkerNoteFigure.java    From erflute with Apache License 2.0 5 votes vote down vote up
public void create() {
    setBorder(new MarginBorder(RETURN_WIDTH));
    setLayoutManager(new BorderLayout());
    final FlowPage page = new FlowPage();
    label = new TextFlow();
    final ParagraphTextLayout layout = new ParagraphTextLayout(label, ParagraphTextLayout.WORD_WRAP_SOFT);
    label.setLayoutManager(layout);
    label.setOpaque(false);
    page.add(label);
    add(page, BorderLayout.CENTER);
}
 
Example #4
Source File: NoteFigure.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
public void create() {
	this.setBorder(new MarginBorder(RETURN_WIDTH));
	this.setLayoutManager(new BorderLayout());
	FlowPage page = new FlowPage();

	label = new TextFlow();
	ParagraphTextLayout layout = new ParagraphTextLayout(label,
			ParagraphTextLayout.WORD_WRAP_SOFT);
	label.setLayoutManager(layout);
	label.setOpaque(false);

	page.add(label);

	this.add(page, BorderLayout.CENTER);
}