Skip to content
Snippets Groups Projects
Commit 44cbea52 authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Factored out method to determine boundaries for layouted element.

parent fbfaea88
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.model.INamedCommentedElement;
* @author mou
* @author $Author: hoelzl $
* @version $Rev: 8344 $
* @ConQAT.Rating YELLOW Hash: 8D288C854F9C6CDA4673E8D7BFF8A290
* @ConQAT.Rating YELLOW Hash: 5D5747D76C8C86781F7DA48EC1DE1AED
*/
public abstract class SubDiagramEditPartBase<T extends ILayoutedModelElement & INamedCommentedElement>
extends ElementEditPartBase<T> {
......@@ -94,7 +94,7 @@ public abstract class SubDiagramEditPartBase<T extends ILayoutedModelElement & I
Rectangle result = new Rectangle();
for(Object o : getModelChildren()) {
if(o instanceof ILayoutedModelElement) {
Rectangle p = getNodeBounds((ILayoutedModelElement)o);
Rectangle p = getLayoutedElementBounds((ILayoutedModelElement)o);
result.union(p);
}
}
......@@ -102,6 +102,18 @@ public abstract class SubDiagramEditPartBase<T extends ILayoutedModelElement & I
return result;
}
/**
* Determines the boundaries for a given {@link ILayoutedModelElement} in the context of this
* EditPart.
*
* @param layouted
* The {@link ILayoutedModelElement} to determine the boundaries for.
* @return {@link Rectangle} describing the boundaries.
*/
protected Rectangle getLayoutedElementBounds(ILayoutedModelElement layouted) {
return getNodeBounds(layouted);
}
/** {@inheritDoc} */
@Override
protected Rectangle determineLabelFigureBounds() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment