Package com._1c.g5.v8.dt.erd.core
Class ErdDiagramCoreController
- java.lang.Object
-
- com._1c.g5.v8.dt.erd.core.ErdDiagramCoreController
-
- All Implemented Interfaces:
com._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
,IErdDiagramCoreController
public class ErdDiagramCoreController extends Object implements IErdDiagramCoreController
Implementation ofIDiagramCoreController
for ERD.
-
-
Constructor Summary
Constructors Constructor Description ErdDiagramCoreController(org.eclipse.core.runtime.IProgressMonitor progressMonitor, com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> convertersService, IErdDiagramController parent, com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm, com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
add(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
add(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities, com._1c.g5.v8.dt.diagram.framework.model.Point point)
protected void
checkExistingRelations(Collection<IErdEntity> entities)
Checks existing relation in given entities.IErdDiagramCore
create(Collection<? extends IErdEntity> entities)
protected void
createRelationsInEntities(Collection<IErdEntity> entities)
Creates relation between given entities.com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
delete(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
protected void
deleteRelationsInEntities(Collection<IErdEntity> entities)
Deletes relations linking to deleted from diagram entities.com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
getLayoutAlgorithm()
Returns algorithm for automated layout.com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
getRouteAlgorithm()
Returns algorithm for automated edge routing.com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
refreshEntities(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
refreshRelations(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations)
void
relayout(IErdDiagramCore diagramCore, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Relayouts given entities and relations in given diagram core.void
reroute(IErdDiagramCore diagramCore, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Reroutes given relations in given diagram core.void
setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets algorithm for automated layout.void
setRouteAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Sets algorithm for automated edge routing.
-
-
-
Constructor Detail
-
ErdDiagramCoreController
public ErdDiagramCoreController(org.eclipse.core.runtime.IProgressMonitor progressMonitor, com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> convertersService, IErdDiagramController parent, com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm, com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Constructor.- Parameters:
progressMonitor
- - progress monitor to report progress. Can't benull
.convertersService
- - service for getting converters and relation makers. Can benull
.parent
- - parent diagram core controller. Can't benull
.layoutAlgorithm
- - algorithm for automated layout. Can't benull
.routeAlgorithm
- - algorithm for automated edge routing. Can't benull
.
-
-
Method Detail
-
setLayoutAlgorithm
public void setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets algorithm for automated layout.- Parameters:
layoutAlgorithm
- - layout algorithm to set. Can't benull
.
-
getLayoutAlgorithm
public com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm getLayoutAlgorithm()
Returns algorithm for automated layout.- Returns:
- algorithm for automated layout. Can't return
null
.
-
setRouteAlgorithm
public void setRouteAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Sets algorithm for automated edge routing.- Parameters:
routeAlgorithm
- - edge route algorithm to set. Can't benull
.
-
getRouteAlgorithm
public com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm getRouteAlgorithm()
Returns algorithm for automated edge routing.- Returns:
- algorithm for automated edge routing. Can't return
null
.
-
create
public IErdDiagramCore create(Collection<? extends IErdEntity> entities)
- Specified by:
create
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
add
public com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> add(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
- Specified by:
add
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
add
public com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> add(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities, com._1c.g5.v8.dt.diagram.framework.model.Point point)
- Specified by:
add
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
delete
public com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> delete(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
- Specified by:
delete
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
refreshEntities
public com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> refreshEntities(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends IErdEntity> entities)
- Specified by:
refreshEntities
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
refreshRelations
public com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> refreshRelations(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation> diagram, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations)
- Specified by:
refreshRelations
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramCoreController<IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
relayout
public void relayout(IErdDiagramCore diagramCore, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Description copied from interface:IErdDiagramCoreController
Relayouts given entities and relations in given diagram core.- Specified by:
relayout
in interfaceIErdDiagramCoreController
- Parameters:
diagramCore
- - diagram core. Can't benull
.entities
- - entities to relayout. Can't benull
.relations
- - relations to reroute. Can't benull
.progressMonitor
- - progress monitor to report progress. Can benull
.
-
reroute
public void reroute(IErdDiagramCore diagramCore, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Description copied from interface:IErdDiagramCoreController
Reroutes given relations in given diagram core.- Specified by:
reroute
in interfaceIErdDiagramCoreController
- Parameters:
diagramCore
- - diagram core. Can't benull
.entities
- - entities connected to given relations. Can't benull
.relations
- - relations to reroute. Can't benull
.progressMonitor
- - progress monitor to report progress. Can benull
.
-
deleteRelationsInEntities
protected void deleteRelationsInEntities(Collection<IErdEntity> entities)
Deletes relations linking to deleted from diagram entities.- Parameters:
entities
- - remaining after delete operation entities. Can't benull
.
-
checkExistingRelations
protected void checkExistingRelations(Collection<IErdEntity> entities)
Checks existing relation in given entities. if relation no longer exists, deletes it.- Parameters:
entities
- - diagram entities. Can't benull
.
-
createRelationsInEntities
protected void createRelationsInEntities(Collection<IErdEntity> entities)
Creates relation between given entities.- Parameters:
entities
- - entities to create relations. Can't benull
.
-
-