### Eclipse Workspace Patch 1.0 #P org.eclipse.gef.examples.logic Index: src/org/eclipse/gef/examples/logicdesigner/figures/StickyNoteFigure.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.gef.examples.logic/src/org/eclipse/gef/examples/logicdesigner/figures/StickyNoteFigure.java,v retrieving revision 1.5 diff -u -r1.5 StickyNoteFigure.java --- src/org/eclipse/gef/examples/logicdesigner/figures/StickyNoteFigure.java 30 Mar 2005 21:26:50 -0000 1.5 +++ src/org/eclipse/gef/examples/logicdesigner/figures/StickyNoteFigure.java 25 Jul 2007 14:09:37 -0000 @@ -44,6 +44,8 @@ public StickyNoteFigure(int borderSize) { setBorder(new MarginBorder(borderSize)); FlowPage flowPage = new FlowPage(); + flowPage.setTruncateVertically(true); + textFlow = new TextFlow(); Index: src/org/eclipse/gef/examples/logicdesigner/edit/LabelCellEditorLocator.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.gef.examples.logic/src/org/eclipse/gef/examples/logicdesigner/edit/LabelCellEditorLocator.java,v retrieving revision 1.11 diff -u -r1.11 LabelCellEditorLocator.java --- src/org/eclipse/gef/examples/logicdesigner/edit/LabelCellEditorLocator.java 19 Jul 2005 18:21:10 -0000 1.11 +++ src/org/eclipse/gef/examples/logicdesigner/edit/LabelCellEditorLocator.java 25 Jul 2007 14:09:37 -0000 @@ -15,6 +15,7 @@ import org.eclipse.jface.viewers.CellEditor; import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.draw2d.text.FlowPage; import org.eclipse.gef.tools.CellEditorLocator; @@ -32,7 +33,10 @@ public void relocate(CellEditor celleditor) { Text text = (Text)celleditor.getControl(); - Rectangle rect = stickyNote.getClientArea(); + + FlowPage flowPage = (FlowPage) stickyNote.getChildren().get(0); + Rectangle rect = new Rectangle(stickyNote.getClientArea().getLocation(), flowPage + .getPreferredSize(flowPage.getClientArea().width, -1)); stickyNote.translateToAbsolute(rect); org.eclipse.swt.graphics.Rectangle trim = text.computeTrim(0, 0, 0, 0); rect.translate(trim.x, trim.y); Index: src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.gef.examples.logic/src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java,v retrieving revision 1.32 diff -u -r1.32 LogicXYLayoutEditPolicy.java --- src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java 14 Feb 2006 20:26:41 -0000 1.32 +++ src/org/eclipse/gef/examples/logicdesigner/edit/LogicXYLayoutEditPolicy.java 25 Jul 2007 14:09:37 -0000 @@ -190,10 +190,6 @@ ResizableEditPolicy policy = new LogicResizableEditPolicy(); policy.setResizeDirections(0); return policy; - } else if (child instanceof LogicLabelEditPart) { - ResizableEditPolicy policy = new LogicResizableEditPolicy(); - policy.setResizeDirections(PositionConstants.EAST | PositionConstants.WEST); - return policy; } return new LogicResizableEditPolicy(); Index: src/org/eclipse/gef/examples/logicdesigner/model/LogicLabel.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.gef.examples.logic/src/org/eclipse/gef/examples/logicdesigner/model/LogicLabel.java,v retrieving revision 1.11 diff -u -r1.11 LogicLabel.java --- src/org/eclipse/gef/examples/logicdesigner/model/LogicLabel.java 30 Mar 2005 21:26:51 -0000 1.11 +++ src/org/eclipse/gef/examples/logicdesigner/model/LogicLabel.java 25 Jul 2007 14:09:37 -0000 @@ -14,8 +14,6 @@ import org.eclipse.swt.graphics.Image; -import org.eclipse.draw2d.geometry.Dimension; - import org.eclipse.gef.examples.logicdesigner.LogicMessages; public class LogicLabel @@ -47,22 +45,13 @@ return Integer.toString(count++); } -public Dimension getSize(){ - return new Dimension(size.width, -1); -} - private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); } -public void setSize(Dimension d) { - d.height = -1; - super.setSize(d); -} - public void setLabelContents(String s){ text = s; - firePropertyChange("labelContents", null, text); //$NON-NLS-2$//$NON-NLS-1$ + firePropertyChange("labelContents", null, text); //$NON-NLS-1$ } public String toString() { #P org.eclipse.draw2d.examples Index: src/org/eclipse/draw2d/examples/text/CaretExampleWithVerticalTruncation.java =================================================================== RCS file: src/org/eclipse/draw2d/examples/text/CaretExampleWithVerticalTruncation.java diff -N src/org/eclipse/draw2d/examples/text/CaretExampleWithVerticalTruncation.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/draw2d/examples/text/CaretExampleWithVerticalTruncation.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,134 @@ +/******************************************************************************* + * Copyright (c) 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +package org.eclipse.draw2d.examples.text; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Caret; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.draw2d.ColorConstants; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.LineBorder; +import org.eclipse.draw2d.MouseEvent; +import org.eclipse.draw2d.MouseMotionListener; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.examples.AbstractExample; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.text.CaretInfo; +import org.eclipse.draw2d.text.FlowPage; +import org.eclipse.draw2d.text.TextFlow; + +public class CaretExampleWithVerticalTruncation extends AbstractExample { + +TextFlow caretOwner; +TextFlow content[]; +Caret caret; +private Label offsetLabel; +private Label trailLabel; +private Label charLabel; + +protected IFigure getContents() { + caret = new Caret(getFigureCanvas(), 0); + final FlowPage page = new FlowPage() { + protected void paintFigure(org.eclipse.draw2d.Graphics graphics) { + graphics.setBackgroundColor(new Color(null, 190, 220, 250)); + graphics.fillRectangle(getBounds()); + }; + }; + page.setTruncateVertically(true); + + +// page.setBorder(new LineBorder(ColorConstants.darkGray, 10)); + page.setHorizontalAligment(PositionConstants.CENTER); + + final TextFlow text = new TextFlow(); + text.setText("A TextFlow can be queried for an offset for a given Point relative " + + "to it. The returned offset will be between 0 and N, where N is the length " + + "of the figure's text.\n" + + "\u6700\u65B0\u6D88\u606F.\n" + + "\u65e5\u672c\u8a9e\u306e\u30da\u30fc\u30b8\u3092\u691c\u7d22" + + ".\n" + + "דפי×?Ö± מֱ- ישרֱֹ×?ןץֱֹ" + + "\n" + + "نصً Ø«Ù? سÙ?َبÙ?س"); + + text.setBorder(new TestBorder()); + text.setFont(new Font(null, "Tahoma", 20, 0)); + page.add(text); + + page.addMouseMotionListener(new MouseMotionListener.Stub() { + public void mouseMoved(MouseEvent me) { + int trail[] = new int[1]; + Point where = me.getLocation(); + page.translateFromParent(where); + int offset = text.getOffset(where, trail, null); + showCaret(text, offset, trail); + } + public void mouseExited(MouseEvent me) { + + }; + }); + return page; +} + +//protected int getShellStyle() { +// return super.getShellStyle() | SWT.RIGHT_TO_LEFT; +//} + +protected void hookShell() { + getFigureCanvas().addKeyListener(new KeyAdapter() {}); + Group panel = new Group(shell, 0); + panel.setLayout(new GridLayout()); + panel.setText("Hit info"); + panel.setLayoutData(new GridData(GridData.FILL_VERTICAL)); + offsetLabel = new Label(panel, 0); + offsetLabel.setText("Offset: 999"); + trailLabel = new Label(panel, 0); + trailLabel.setText("Trail: 0"); + charLabel = new Label(panel, 0); + charLabel.setText("Char: WW"); +} + +void showCaret(TextFlow text, int offset, int[] trailing) { + if (caretOwner != null) + caretOwner.setSelection(-1, -1); + + offsetLabel.setText("Offset: " + offset); + trailLabel.setText("Trail: " + trailing[0]); + + caretOwner = text; + caret.setVisible(text != null); + CaretInfo info = text.getCaretPlacement(offset, trailing[0] != 0); + caret.setSize(1, info.getHeight()); + caret.setLocation(info.getX(), info.getY()); + text.setSelection(offset, offset + 1); + if (text.getText().length() == offset) + charLabel.setText("Char: ?"); + else + charLabel.setText("Char: " + text.getText().charAt(offset)); +} + +public static void main(String[] args) { + new CaretExampleWithVerticalTruncation().run(); +} + +protected void sizeShell() { + shell.setSize(shell.computeSize(400, -1)); +} + +} Index: src/org/eclipse/draw2d/examples/text/TextFlowLargeExampleWithVerticalTruncation.java =================================================================== RCS file: src/org/eclipse/draw2d/examples/text/TextFlowLargeExampleWithVerticalTruncation.java diff -N src/org/eclipse/draw2d/examples/text/TextFlowLargeExampleWithVerticalTruncation.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/draw2d/examples/text/TextFlowLargeExampleWithVerticalTruncation.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.draw2d.examples.text; + +import org.eclipse.draw2d.*; +import org.eclipse.draw2d.text.*; + +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.SWT; + +/** + * The example is used to build large draw2d.text flow documents to benchmark the layout + * performance as the document changes. In this case, we allow fake typing of text. + * @author hudsonr + */ + +public class TextFlowLargeExampleWithVerticalTruncation { + +static int KEYS_TYPED = 0; +static boolean PERFORMANCE = false; +static FigureCanvas canvas; +static TextFlow target; +static FlowPage page; +static Font + regularFont = new Font(Display.getDefault(), "Arial", 15, SWT.NORMAL), + boldFont = new Font(Display.getDefault(), "Comic Sans MS", 16, SWT.BOLD); + +public static void main(String[] args) { + Display d = Display.getDefault(); + Shell shell = new Shell(d); + shell.setLayout(new GridLayout()); + + canvas = new FigureCanvas(shell); + canvas.setLayoutData(new GridData(GridData.FILL_BOTH)); + canvas.setVerticalScrollBarVisibility(canvas.NEVER); + canvas.getViewport().setContentsTracksWidth(true); + canvas.getViewport().setContentsTracksHeight(true); + shell.open(); + + canvas.addKeyListener(new KeyAdapter(){ + public void keyPressed(KeyEvent e){ + addText(e.character); + } + }); + + page = new FlowPage(); + page.setTruncateVertically(true); + populatePage(); + canvas.setContents(page); + + while (!shell.isDisposed()) + if (!d.readAndDispatch()) + d.sleep(); +} + +static protected void addText(char c){ + if ((c <= 'Z' && c >='A') || + (c <= 'z' && c >='a') || + (c == ' ')) + if (target != null){ + target.setText(target.getText()+c); + if (PERFORMANCE && (KEYS_TYPED % 10 == 0)){ +// System.out.println(KEYS_TYPED + " keys typed " + FlowPage.VALIDATIONS + " paints and layouts"); + } + KEYS_TYPED++; + } +} + +static public void populatePage(){ + + target = new TextFlow("Normal text."); + target.setToolTip(new Label("This is a Tooltip")); + page.add(target); + page.setOpaque(true); + page.setBackgroundColor(ColorConstants.white); + + for (int i=0; i< 20; i++){ + BlockFlow bf = new BlockFlow(); + page.add(bf); + if (i == 0) + bf.add(target); + + FlowFigure ff = new InlineFlow(); + ff.add(new TextFlow("This is the first small sentence. ")); + bf.add(ff); + + FlowFigure inline = new InlineFlow(); + TextFlowFactory.addSentences(inline,4); + ff.add(inline); + + BlockFlow block = new BlockFlow(); + block.setHorizontalAligment(PositionConstants.CENTER); + TextFlowFactory.addFontSizes(block, 5, 25); + page.add(block); + } +} + +} Index: src/org/eclipse/draw2d/examples/text/TextFlowExampleTextWithVerticalTruncation.java =================================================================== RCS file: src/org/eclipse/draw2d/examples/text/TextFlowExampleTextWithVerticalTruncation.java diff -N src/org/eclipse/draw2d/examples/text/TextFlowExampleTextWithVerticalTruncation.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/draw2d/examples/text/TextFlowExampleTextWithVerticalTruncation.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,169 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.draw2d.examples.text; + +import org.eclipse.swt.graphics.Font; + +import org.eclipse.draw2d.ColorConstants; +import org.eclipse.draw2d.FigureCanvas; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.examples.AbstractExample; +import org.eclipse.draw2d.text.BlockFlow; +import org.eclipse.draw2d.text.FlowPage; +import org.eclipse.draw2d.text.InlineFlow; +import org.eclipse.draw2d.text.SimpleTextLayout; +import org.eclipse.draw2d.text.TextFlow; + +/** + * This example shows the basic ways that the draw2d.text figures can be used. + * + * @author hudsonr + * @since 2.0 + */ +public class TextFlowExampleTextWithVerticalTruncation extends AbstractExample { + +static protected IFigure createAlignmentParagraph() { + BlockFlow block = new BlockFlow(); + block.setHorizontalAligment(PositionConstants.RIGHT); + block.add(new TextFlow("An inline flow figure's aligment is determined " + + "by the block flow in which it resides. This block is aligned using ")); + TextFlow text = new TextFlow("PositionConstants.RIGHT"); + text.setFont(COURIER); + block.add(text); + block.add(new TextFlow(", which results in right text aligment")); + return block; +} + +static protected IFigure createBaselineParagraph() { + BlockFlow block = new BlockFlow(); + + String message[] = { + "Text fragments ", + "with different ", + "Font sizes will ", + "have their ", + "baseline ", + "vertically ", + "aligned ", + "within ", + "the current ", + "line" + }; + + for (int i=0; i getPageSize().height) { + setTruncationPoint(new Point(0, getPageSize().height + - getTruncatedDecorationSize().height)); + } + List v = getChildren(); for (int i = 0; i < v.size(); i++) ((FlowFigure)v.get(i)).postValidate(); @@ -126,17 +177,21 @@ return; boolean invalidate = getBounds().width != r.width || getBounds().height != r.height; super.setBounds(r); - int newWidth = r.width; - if (invalidate || getPageWidth() != newWidth) { - setPageWidth(newWidth); + Dimension newSize = new Dimension(r.width, r.height); + if (!shouldTruncateVertically()) { + // avoid triggering a layout if only the height has changed in this case + newSize.height = -1; + } + if (invalidate || !newSize.equals(getPageSize())) { + setPageSize(newSize); getUpdateManager().addInvalidFigure(this); } } -private void setPageWidth(int width) { - if (recommendedWidth == width) +private void setPageSize(Dimension size) { + if (size.equals(recommendedSize)) return; - recommendedWidth = width; + recommendedSize = size; super.invalidate(); } @@ -150,4 +205,47 @@ postValidate(); } +protected void layout() { + setTruncationPoint(null); + super.layout(); +} + +protected Point getTruncationPoint() { + if (shouldTruncateVertically()) { + return super.getTruncationPoint(); + } else { + return null; + } +} + +public void paintBorder(Graphics graphics) { + super.paintBorder(graphics); + if (getTruncationPoint() != null) { + paintTruncationDecoration(graphics); + } +} + +/** + * Paints the truncation decoration. + * + * @param graphics + */ +protected void paintTruncationDecoration(Graphics graphics) { + Point bottomPoint = getBounds().getBottom().translate(-1, -1); + PointList points = new PointList(3); + points.addPoint(bottomPoint); + points.addPoint(bottomPoint.getTranslated(-4, -4)); + points.addPoint(bottomPoint.getTranslated(4, -4)); + graphics.drawPolygon(points); +} + +/** + * Gets the size of the truncation decoration that will be drawn and any + * whitespace around it. + * + * @return the size required for the truncation decoration + */ +protected Dimension getTruncatedDecorationSize() { + return new Dimension(10, 6); +} } Index: src/org/eclipse/draw2d/text/BlockFlow.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BlockFlow.java,v retrieving revision 1.25 diff -u -r1.25 BlockFlow.java --- src/org/eclipse/draw2d/text/BlockFlow.java 27 May 2005 18:12:05 -0000 1.25 +++ src/org/eclipse/draw2d/text/BlockFlow.java 25 Jul 2007 14:09:41 -0000 @@ -19,6 +19,7 @@ import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.PositionConstants; import org.eclipse.draw2d.geometry.Insets; +import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; /** @@ -44,6 +45,9 @@ private int orientation = SWT.NONE; private boolean bidiValid; +/** the point where children figures should be truncated */ +private Point truncationPoint; + /** * Constructs a new BlockFlow. */ public BlockFlow() { @@ -207,6 +211,13 @@ newBounds.crop(new Insets(getTopMargin(), getLeftMargin(), getBottomMargin(), getRightMargin())); setBounds(newBounds); + + Point point = ((FlowFigure)getParent()).getTruncationPoint(); + if (point != null) { + point = point.getCopy(); + translateFromParent(point); + } + setTruncationPoint(point); } /** @@ -298,4 +309,18 @@ super.validate(); } +/** + * Sets the point where this figure's children should be truncated. + * + * @param truncationPoint + */ +protected void setTruncationPoint(Point truncationPoint) { + this.truncationPoint = truncationPoint; +} + +protected Point getTruncationPoint() { + return truncationPoint; +} + + } \ No newline at end of file Index: src/org/eclipse/draw2d/text/PageFlowLayout.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/text/PageFlowLayout.java,v retrieving revision 1.12 diff -u -r1.12 PageFlowLayout.java --- src/org/eclipse/draw2d/text/PageFlowLayout.java 29 Mar 2005 23:58:02 -0000 1.12 +++ src/org/eclipse/draw2d/text/PageFlowLayout.java 25 Jul 2007 14:09:41 -0000 @@ -32,7 +32,7 @@ * @see org.eclipse.draw2d.text.BlockFlowLayout#getContextWidth() */ int getContextWidth() { - return ((FlowPage)getFlowFigure()).getPageWidth(); + return ((FlowPage)getFlowFigure()).getPageSize().width; } } Index: src/org/eclipse/draw2d/text/BlockFlowLayout.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BlockFlowLayout.java,v retrieving revision 1.30 diff -u -r1.30 BlockFlowLayout.java --- src/org/eclipse/draw2d/text/BlockFlowLayout.java 14 Oct 2005 02:35:43 -0000 1.30 +++ src/org/eclipse/draw2d/text/BlockFlowLayout.java 25 Jul 2007 14:09:41 -0000 @@ -231,6 +231,10 @@ if (recommended != blockBox.recommendedWidth) { blockInvalid = true; blockBox.setRecommendedWidth(recommended); + } + if (blockBox.height != -1) { + // force the block to revalidate if the height is important + blockInvalid = true; } if (blockInvalid) { @@ -239,4 +243,6 @@ } } + + } \ No newline at end of file Index: src/org/eclipse/draw2d/text/FlowAdapter.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/text/FlowAdapter.java,v retrieving revision 1.3 diff -u -r1.3 FlowAdapter.java --- src/org/eclipse/draw2d/text/FlowAdapter.java 19 May 2005 20:19:55 -0000 1.3 +++ src/org/eclipse/draw2d/text/FlowAdapter.java 25 Jul 2007 14:09:41 -0000 @@ -14,6 +14,7 @@ import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; /** @@ -154,4 +155,7 @@ } } +protected Point getTruncationPoint() { + return ((FlowFigure) getParent()).getTruncationPoint(); +} } \ No newline at end of file Index: src/org/eclipse/draw2d/text/FlowFigure.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/text/FlowFigure.java,v retrieving revision 1.23 diff -u -r1.23 FlowFigure.java --- src/org/eclipse/draw2d/text/FlowFigure.java 29 Mar 2005 23:58:02 -0000 1.23 +++ src/org/eclipse/draw2d/text/FlowFigure.java 25 Jul 2007 14:09:41 -0000 @@ -14,6 +14,7 @@ import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; /** @@ -182,4 +183,18 @@ repaint(); } +/** + * Gets the point where this FlowFigure should be truncated; + * that is, the point where this FlowFigure will no longer be + * visible because it extends beyond the area it has been given. A + * null return value implies that this figure is not being + * truncated. + * + * @return the point at which this FlowFigure should be + * truncated or null if it should not be truncated + */ +protected Point getTruncationPoint() { + return null; +} + }