use of org.hibernate.eclipse.graph.model.AssociationViewAdapter in project jbosstools-hibernate by jbosstools.
the class AssociationEditPart method createFigure.
protected IFigure createFigure() {
PolylineConnection polylineConnection = new PolylineConnection();
AssociationViewAdapter association = (AssociationViewAdapter) getModel();
polylineConnection.setTargetDecoration(association.getTargetDecoration());
ConnectionRouter connectionRouter = association.getConnectionRouter();
if (connectionRouter != null) {
polylineConnection.setConnectionRouter(connectionRouter);
}
AssociationViewAdapter ava = (AssociationViewAdapter) getModel();
if (ava.getAssociationName() != null) {
MidpointLocator mpl = new MidpointLocator(polylineConnection, 0);
polylineConnection.add(new Label(ava.getAssociationName()), mpl);
}
polylineConnection.setForegroundColor(ColorConstants.gray);
return polylineConnection;
}
Aggregations