Commit 1158780f authored by Simon Barner's avatar Simon Barner
Browse files

Adapt newly introduced base classes for controllers and visuals

Issue-Ref: 3865
Issue-Url: https://af3-developer.fortiss.org/issues/3865

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 67c688cb
ControllerFactory.java 4d3376de19e349232d0ea5a3243dc64fffc5cd12 YELLOW
ModelFactory.java 730bde557a8323ba0e6da7b4c2d90fe11b4cabf7 YELLOW
PartitionStructureFXEditor.java cd80833cbecec6bf39da5508b7d36abe9a26d386 YELLOW
PartitionStructureFXEditorBinding.java a44a246926fcda3c07f5b779cb8bfecef8241a45 YELLOW
VisualFactory.java 92e83e9501954b924493481a5f2217ac6e00ecc1 YELLOW
PartitionControllerFactory.java 85d48280fd1970357bd58c3061fa989f669dbc3b YELLOW
PartitionModelFactory.java d6137f92cb27b13ad08cadcf327c6b39b8cf47e7 YELLOW
PartitionStructureFXEditor.java 2b29b5b2021d9692957ef93a4f9eda5b26661e01 YELLOW
PartitionStructureFXEditorBinding.java 02754326053ed46688f404df0378ad32bc08a7dc YELLOW
PartitionVisualFactory.java df76e179f1970905e6c42f312f71a1126d9dab4b YELLOW
......@@ -27,12 +27,11 @@ import org.fortiss.af3.partition.model.MemoryAreaChannel;
import org.fortiss.af3.partition.model.Partition;
import org.fortiss.af3.partition.model.PartitionArchitecture;
import org.fortiss.af3.partition.model.PartitionChannel;
import org.fortiss.af3.partition.ui.editor.fx.controller.MemoryAreaChannelController;
import org.fortiss.af3.partition.ui.editor.fx.controller.MemoryAreaController;
import org.fortiss.af3.partition.ui.editor.fx.controller.PartitionArchitectureController;
import org.fortiss.af3.partition.ui.editor.fx.controller.PartitionChannelController;
import org.fortiss.af3.partition.ui.editor.fx.controller.PartitionController;
import org.fortiss.af3.partition.ui.editor.fx.controller.PartitionPortController;
import org.fortiss.af3.partition.model.PartitionPort;
import org.fortiss.tooling.base.ui.editor.fx.controller.EObjectDiagramController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedDiagramAnchorageController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedLinkBendPointController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedRectangularResizableContentController;
/**
* The implementation of the {@link IControllerFactory} for the {@link PartitionArchitecture}
......@@ -40,15 +39,17 @@ import org.fortiss.af3.partition.ui.editor.fx.controller.PartitionPortController
*
* @author barner
*/
final class ControllerFactory implements IControllerFactory {
public final class PartitionControllerFactory implements IControllerFactory {
/** {@inheritDoc} */
@Override
public IController createContentController(IContentMVCBundle modelBundle) {
Object modelObj = modelBundle.getModel();
if(modelObj instanceof Partition) {
return new PartitionController(modelBundle);
return new LayoutedRectangularResizableContentController<Partition>(modelBundle,
Partition.class);
} else if(modelObj instanceof MemoryArea) {
return new MemoryAreaController(modelBundle);
return new LayoutedRectangularResizableContentController<MemoryArea>(modelBundle,
MemoryArea.class);
}
return null;
}
......@@ -63,7 +64,7 @@ final class ControllerFactory implements IControllerFactory {
@Override
public IController createContentAnchorageController(IContentAnchorageMVCBundle modelBundle) {
// PartitionPort is a supertype of MemoryArea{Input, Output}Port
return new PartitionPortController(modelBundle);
return new LayoutedDiagramAnchorageController<>(modelBundle, PartitionPort.class);
}
/** {@inheritDoc} */
......@@ -71,9 +72,9 @@ final class ControllerFactory implements IControllerFactory {
public IController createLinkController(ILinkMVCBundle modelBundle) {
Object linkObj = modelBundle.getModel();
if(linkObj instanceof PartitionChannel) {
return new PartitionChannelController(modelBundle);
return new LayoutedLinkBendPointController<>(modelBundle, PartitionChannel.class);
} else if(linkObj instanceof MemoryAreaChannel) {
return new MemoryAreaChannelController(modelBundle);
return new LayoutedLinkBendPointController<>(modelBundle, MemoryAreaChannel.class);
}
return null;
......@@ -82,6 +83,6 @@ final class ControllerFactory implements IControllerFactory {
/** {@inheritDoc} */
@Override
public IController createDiagramController(IDiagramMVCBundle diagramBundle) {
return new PartitionArchitectureController(diagramBundle);
return new EObjectDiagramController<>(diagramBundle, PartitionArchitecture.class);
}
}
......@@ -37,12 +37,12 @@ import org.fortiss.tooling.base.model.element.IHierarchicElement;
*
* @author barner
*/
final class ModelFactory implements IModelFactory {
public final class PartitionModelFactory implements IModelFactory {
/** The currently edited {@link PartitionArchitecture}. */
private final PartitionArchitecture rootElement;
/** Constructor. */
public ModelFactory(PartitionArchitecture root) {
public PartitionModelFactory(PartitionArchitecture root) {
this.rootElement = requireNonNull(root);
}
......
......@@ -19,9 +19,6 @@ import static javafx.scene.paint.Color.LIGHTGRAY;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramViewerFeatures;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.fortiss.af3.partition.model.MemoryArea;
import org.fortiss.af3.partition.model.MemoryAreaInputPort;
import org.fortiss.af3.partition.model.MemoryAreaOutputPort;
......@@ -54,22 +51,4 @@ public class PartitionStructureFXEditor extends LWFXEFEditorBase<PartitionArchit
features.setIndicatorSpacing(new Dimension2D(12, 12));
features.setBackgroundColor(LIGHTGRAY);
}
/** {@inheritDoc} */
@Override
protected IModelFactory createModelFactory() {
return new ModelFactory(editedObject);
}
/** {@inheritDoc} */
@Override
protected IVisualFactory createVisualFactory() {
return new VisualFactory();
}
/** {@inheritDoc} */
@Override
protected IControllerFactory createControllerFactory() {
return new ControllerFactory();
}
}
......@@ -15,6 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.partition.model.Partition;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
......@@ -31,6 +34,24 @@ public final class PartitionStructureFXEditorBinding extends ModelEditorBindingB
return PartitionStructureFXEditor.class;
}
/** {@inheritDoc} */
@Override
public Class<? extends IModelFactory> getModelFactory() {
return PartitionModelFactory.class;
}
/** {@inheritDoc} */
@Override
public Class<? extends IVisualFactory> getVisualFactory() {
return PartitionVisualFactory.class;
}
/** {@inheritDoc} */
@Override
public Class<? extends IControllerFactory> getControllerFactory() {
return PartitionControllerFactory.class;
}
/** {@inheritDoc} */
@Override
public String getLabel() {
......
......@@ -30,18 +30,17 @@ import org.fortiss.af3.partition.model.Partition;
import org.fortiss.af3.partition.model.PartitionArchitecture;
import org.fortiss.af3.partition.model.PartitionChannel;
import org.fortiss.af3.partition.model.PartitionPort;
import org.fortiss.af3.partition.ui.editor.fx.visual.MemoryAreaChannelVisual;
import org.fortiss.af3.partition.ui.editor.fx.visual.MemoryAreaVisual;
import org.fortiss.af3.partition.ui.editor.fx.visual.PartitionChannelVisual;
import org.fortiss.af3.partition.ui.editor.fx.visual.PartitionPortVisual;
import org.fortiss.af3.partition.ui.editor.fx.visual.PartitionVisual;
import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedLineLinkVisual;
/**
* The implementation of the {@link IVisualFactory} for the {@link PartitionArchitecture} editor.
*
* @author barner
*/
final class VisualFactory implements IVisualFactory {
public final class PartitionVisualFactory implements IVisualFactory {
/** {@inheritDoc} */
@Override
public IContentVisual createContentVisual(IContentMVCBundle modelBundle) {
......@@ -78,9 +77,11 @@ final class VisualFactory implements IVisualFactory {
public ILinkVisual createLinkVisual(ILinkMVCBundle modelBundle) {
Object linkObj = modelBundle.getModel();
if(linkObj instanceof PartitionChannel) {
return new PartitionChannelVisual(modelBundle);
return new NamedLayoutedLineLinkVisual<PartitionChannel>(modelBundle,
PartitionChannel.class);
} else if(linkObj instanceof MemoryAreaChannel) {
return new MemoryAreaChannelVisual(modelBundle);
return new NamedLayoutedLineLinkVisual<MemoryAreaChannel>(modelBundle,
MemoryAreaChannel.class);
}
return null;
}
......
MemoryAreaChannelController.java 1ae0fea8abba6a654b9869e56684f75440ac3216 YELLOW
MemoryAreaController.java 381dbb8bfdcd93da4818cd608b250f5beddbf6b3 YELLOW
PartitionArchitectureController.java 9de5002fe500ea92ca52e8a17e26db9cc8d68d95 YELLOW
PartitionChannelController.java 74a16bbe64edb9858e70a74ef17c3e26e4a1ff10 YELLOW
PartitionController.java d8cd064d75cfc7a64e5452c33f05a1768108c616 YELLOW
PartitionPortController.java 4e81e2dd2efe7edf2313289317231194e593a278 YELLOW
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx.controller;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
import org.fortiss.af3.partition.model.MemoryAreaChannel;
import org.fortiss.tooling.base.ui.editor.fx.LayoutedModelElementBasedLinkBendPointController;
/**
* {@link IController} for {@link MemoryAreaChannel}s.
*
* @author barner
*/
public final class MemoryAreaChannelController
extends LayoutedModelElementBasedLinkBendPointController {
/** Constructor. */
public MemoryAreaChannelController(ILinkMVCBundle mvcb) {
super(mvcb);
Object model = mvcb.getModel();
if(!(model instanceof MemoryAreaChannel)) {
throw new IllegalArgumentException(
"Expected model of type MemoryAreaChannel, but was " +
model.getClass().getSimpleName());
}
}
/** {@inheritDoc} */
@Override
protected boolean clampAndSnapBendPointToGridCenter() {
// disable default mode
return false;
}
/** {@inheritDoc} */
@Override
protected boolean clampAndSnapBendPointToGrid() {
// enable clamping mode
return true;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx.controller;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH;
import static org.fortiss.tooling.base.ui.utils.LWFXEditorUtils.convertSideToEOrientation;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.getNodeSize;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.moveNode;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.setNodeSize;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.setStickyConnectorLayoutData;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.FeedbackChange;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IDragController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.rectangular.RectangularContentAnchorageMoveController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.af3.partition.model.MemoryArea;
import org.fortiss.af3.partition.model.PartitionArchitecture;
import org.fortiss.af3.partition.model.PartitionPort;
import org.fortiss.tooling.base.model.layout.Dimension;
import org.fortiss.tooling.base.ui.editor.fx.EObjectBasedRectangularResizableContentControllerBase;
import javafx.geometry.Dimension2D;
import javafx.geometry.Side;
/**
* {@link IController} for {@link MemoryArea}s in the {@link PartitionArchitecture} displayed in the
* diagram.
*
* @author barner
*/
public final class MemoryAreaController
extends EObjectBasedRectangularResizableContentControllerBase {
/** Constructor. */
public MemoryAreaController(IContentMVCBundle mvcb) {
super(mvcb);
Object model = mvcb.getModel();
if(!(model instanceof MemoryArea)) {
throw new IllegalArgumentException("Expected model of type MemoryArea, but was " +
model.getClass().getSimpleName());
}
}
/** Returns the {@link MemoryArea}. */
private MemoryArea getMemoryArea() {
// wild cast works: see constructor
return (MemoryArea)getModel();
}
/** {@inheritDoc} */
@Override
protected IDragController createAnchorageMoveController(IContentAnchorageMVCBundle anchorage) {
// we need an overridden port move controller due to the frameworks default snapping
// behavior, which snaps to anchorage size while AF3 ports snap to half their size
return new RectangularContentAnchorageMoveController(this, anchorage) {
/** {@inheritDoc} */
@Override
protected Dimension2D overrideBorderSnap(Dimension2D anchorageSize) {
// this override is required because ports can be moved by half their size
// while the default implementation would only allow for full size of the port
return new Dimension2D(anchorageSize.getWidth() / 2, anchorageSize.getHeight() / 2);
}
};
}
/** {@inheritDoc} */
@Override
protected void moveAnchorageToSideOffset(IContentAnchorageMVCBundle anchorage, Side side,
double offset) {
Object portObj = anchorage.getModel();
if(portObj instanceof PartitionPort) {
PartitionPort port = (PartitionPort)portObj;
// the following correction compensates for SubComponentPortVisual.getOffset()
Dimension2D portDim = anchorage.getVisual().getDimensions();
int correction;
if(side == Side.TOP || side == Side.BOTTOM) {
correction = (int)portDim.getWidth() / 2;
} else {
correction = (int)portDim.getHeight() / 2;
}
int corrected = (int)offset + correction;
setStickyConnectorLayoutData(port, convertSideToEOrientation(side), corrected);
}
}
/** {@inheritDoc} */
@Override
protected void move(FeedbackChange deltaChange) {
moveNode(getMemoryArea(), (int)deltaChange.getDeltaX(), (int)deltaChange.getDeltaY());
}
/** {@inheritDoc} */
@Override
protected void resize(FeedbackChange delta) {
MemoryArea memoryArea = getMemoryArea();
Dimension d = getNodeSize(memoryArea);
int w = d.getWidth() + (int)delta.getDeltaW();
int h = d.getHeight() + (int)delta.getDeltaH();
setNodeSize(memoryArea, w, h);
}
/** {@inheritDoc} */
@Override
protected Dimension2D getMinimumSize() {
return new Dimension2D(DEFAULT_SHAPE_MINIMUM_WIDTH, DEFAULT_SHAPE_MINIMUM_HEIGHT);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx.controller;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IMVCBundle;
import org.fortiss.tooling.base.ui.editor.fx.EObjectBasedDiagramControllerBase;
/**
* {@link IController} for the diagram model element.
*
* @author barner
*/
public final class PartitionArchitectureController extends EObjectBasedDiagramControllerBase {
/** Constructor. */
public PartitionArchitectureController(IMVCBundle mvcb) {
super(mvcb);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx.controller;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
import org.fortiss.af3.partition.model.PartitionChannel;
import org.fortiss.tooling.base.ui.editor.fx.LayoutedModelElementBasedLinkBendPointController;
/**
* {@link IController} for {@link PartitionChannel}s.
*
* @author barner
*/
public final class PartitionChannelController
extends LayoutedModelElementBasedLinkBendPointController {
/** Constructor. */
public PartitionChannelController(ILinkMVCBundle mvcb) {
super(mvcb);
Object model = mvcb.getModel();
if(!(model instanceof PartitionChannel)) {
throw new IllegalArgumentException("Expected model of type PartitionChannel, but was " +
model.getClass().getSimpleName());
}
}
/** {@inheritDoc} */
@Override
protected boolean clampAndSnapBendPointToGridCenter() {
// disable default mode
return false;
}
/** {@inheritDoc} */
@Override
protected boolean clampAndSnapBendPointToGrid() {
// enable clamping mode
return true;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui.editor.fx.controller;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH;
import static org.fortiss.tooling.base.ui.utils.LWFXEditorUtils.convertSideToEOrientation;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.getNodeSize;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.moveNode;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.setNodeSize;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.setStickyConnectorLayoutData;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.FeedbackChange;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IDragController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.rectangular.RectangularContentAnchorageMoveController;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.af3.partition.model.Partition;
import org.fortiss.af3.partition.model.PartitionArchitecture;
import org.fortiss.af3.partition.model.PartitionPort;
import org.fortiss.tooling.base.model.layout.Dimension;
import org.fortiss.tooling.base.ui.editor.fx.EObjectBasedRectangularResizableContentControllerBase;
import javafx.geometry.Dimension2D;
import javafx.geometry.Side;
/**
* {@link IController} for {@link Partition}s in the {@link PartitionArchitecture} displayed in the
* diagram.
*
* @author barner
*/
public final class PartitionController
extends EObjectBasedRectangularResizableContentControllerBase {
/** Constructor. */
public PartitionController(IContentMVCBundle mvcb) {
super(mvcb);
Object model = mvcb.getModel();
if(!(model instanceof Partition)) {
throw new IllegalArgumentException("Expected model of type Partition, but was " +
model.getClass().getSimpleName());
}
}
/** Returns the {@link Partition}. */
private Partition getPartition() {
// wild cast works: see constructor
return (Partition)getModel();
}
/** {@inheritDoc} */
@Override
protected IDragController createAnchorageMoveController(IContentAnchorageMVCBundle anchorage) {
// we need an overridden port move controller due to the frameworks default snapping
// behavior, which snaps to anchorage size while AF3 ports snap to half their size
return new RectangularContentAnchorageMoveController(this, anchorage) {
/** {@inheritDoc} */
@Override
protected Dimension2D overrideBorderSnap(Dimension2D anchorageSize) {
// this override is required because ports can be moved by half their size
// while the default implementation would only allow for full size of the port
return new Dimension2D(anchorageSize.getWidth() / 2, anchorageSize.getHeight() / 2);
}
};
}
/** {@inheritDoc} */
@Override