Package org.eclipse.draw2d
Class ViewportAwareConnectionLayerClippingStrategy
java.lang.Object
org.eclipse.draw2d.ViewportAwareConnectionLayerClippingStrategy
- All Implemented Interfaces:
- IClippingStrategy
public class ViewportAwareConnectionLayerClippingStrategy
extends Object
implements IClippingStrategy
Clipping strategy for connection layer, which takes into account nested view
 ports and truncates those parts of connections which reach outside and are
 thus not visible.
- Since:
- 3.6
- 
Constructor SummaryConstructorsConstructorDescriptionViewportAwareConnectionLayerClippingStrategy(ConnectionLayer connectionLayer) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidclipAtViewports(Rectangle clipRect, List<Viewport> enclosingViewportsPath) Clips the given clipRect at all given viewports.protected RectanglegetAbsoluteBoundsAsCopy(IFigure figure) Returns the figure's bounds in absolute coordinates.protected RectanglegetAbsoluteClientAreaAsCopy(IFigure figure) Returns the viewport's client area in absolute coordinates.protected PointListgetAbsolutePointsAsCopy(Connection connection) Returns the connection's points in absolute coordinates.protected RectanglegetAbsoluteViewportAreaAsCopy(Viewport viewport) Returns the area covered by the viewport in absolute coordinates.Specifies the clipping region for the given child figure.protected Rectangle[]getEdgeClippingRectangle(Connection connection) Computes clipping rectangle(s) for a given connection.protected RectanglegetNodeClippingRectangle(IFigure figure) Computes clipping rectangle for a given (node) figure.protected ViewportReturns the root viewport, i.e. the nearest enclosing viewport of the connection layer, which corresponds to the nearest enclosing common viewport of primary and connection layer.
- 
Constructor Details- 
ViewportAwareConnectionLayerClippingStrategy
 
- 
- 
Method Details- 
getClipDescription copied from interface:IClippingStrategySpecifies the clipping region for the given child figure. That is, all parts of the figure, which are not covered by one of the returned rectangles are masked out and will not get painted. Each returned rectangle is considered to be specified in coordinates relative to the given child figure's bounds.- Specified by:
- getClipin interface- IClippingStrategy
- Parameters:
- figure- The child figure, which clipping region has to be returned.
- Returns:
- An array of rectangles to specify the clipping region of the figure,
         i.e. the areas in which the figure should not get clipped. May return
         an empty array in case the figure should not be visible at all, may
         not return null.
- See Also:
 
- 
getEdgeClippingRectangleComputes clipping rectangle(s) for a given connection. Will consider all enclosing viewports, excluding the root viewport.
- 
getNodeClippingRectangleComputes clipping rectangle for a given (node) figure. Will consider all enclosing viewports, excluding the root viewport.
- 
clipAtViewportsClips the given clipRect at all given viewports.
- 
getRootViewportReturns the root viewport, i.e. the nearest enclosing viewport of the connection layer, which corresponds to the nearest enclosing common viewport of primary and connection layer.
- 
getAbsolutePointsAsCopyReturns the connection's points in absolute coordinates.
- 
getAbsoluteViewportAreaAsCopyReturns the area covered by the viewport in absolute coordinates.
- 
getAbsoluteClientAreaAsCopyReturns the viewport's client area in absolute coordinates.
- 
getAbsoluteBoundsAsCopyReturns the figure's bounds in absolute coordinates.
 
-