Package com._1c.g5.v8.dt.erd.core
Class ErdDiagramController
- java.lang.Object
-
- com._1c.g5.v8.dt.erd.core.ErdDiagramController
-
- All Implemented Interfaces:
com._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
,IErdDiagramController
- Direct Known Subclasses:
DiagramUiController
public class ErdDiagramController extends Object implements IErdDiagramController
Default implementation ofIErdDiagramController
.
convertersService
must be set before using methods of this class.
-
-
Constructor Summary
Constructors Constructor Description ErdDiagramController(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
ConstructorErdDiagramController(org.eclipse.core.runtime.IProgressMonitor progressMonitor, IErdDiagramController parentController, ErdEntityGroup associatedGroup)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends IErdEntity>
addEntities(Collection<? extends IErdEntity> objects)
Adds new items to the existing diagram.Collection<MdObject>
addItems(Collection<MdObject> objects)
Collection<MdObject>
addItems(Collection<MdObject> objects, com._1c.g5.v8.dt.diagram.framework.model.Point location)
Collection<? extends IErdEntity>
deleteEntities(Collection<? extends IErdEntity> entities)
Deletes items from the existing diagram.Collection<MdObject>
deleteItems(Collection<MdObject> objects)
ErdEntityGroup
getAssociatedGroup()
Returns group associated with this controller.com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject>
getConvertersService()
Returns converters service.IErdDiagramCore
getDiagramCore()
Returned type changed fromIDiagramCore
toIErdDiagramCore
.IErdDiagramCoreController
getDiagramCoreController()
Returns diagram core controller without progress monitor.com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
getLayoutAlgorithm()
Returns diagram layout algorithm.IErdDiagramController
getParentController()
Returns parent diagram controller.IV8ProjectManager
getProjectManager()
Returns project manager.com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
getRouteAlgorithm()
Returns edge routing algorithm.void
initialize(Collection<MdObject> objects)
void
initializeFromEntities(Collection<? extends IErdEntity> objects)
Initializes diagram from given items.protected com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
initializeLayoutAlgorithm()
Initializes diagram layout algorithm.protected com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
initializeRouteAlgorithm()
Initializes edges routing algorithm.Collection<MdObject>
refreshItems(Collection<MdObject> objects)
void
setConvertersService(com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> convertersService)
Sets converters service.void
setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets diagram layout algorithm.void
setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Sets progress monitor to report progress.void
setProjectManager(IV8ProjectManager projectManager)
Sets project manager.void
setRouteAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Sets edge routing algorithm.
-
-
-
Constructor Detail
-
ErdDiagramController
public ErdDiagramController(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Constructor- Parameters:
progressMonitor
- - progress monitor to report progress. Can benull
.
-
ErdDiagramController
public ErdDiagramController(org.eclipse.core.runtime.IProgressMonitor progressMonitor, IErdDiagramController parentController, ErdEntityGroup associatedGroup)
Constructor.- Parameters:
progressMonitor
- - progress monitor to report progress. Can benull
.parentController
- - parent diagram controller.null
means this is main controller. Can benull
.associatedGroup
- - associated with this controller group. Can benull
.
-
-
Method Detail
-
setRouteAlgorithm
public void setRouteAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm routeAlgorithm)
Sets edge routing algorithm.- Parameters:
routeAlgorithm
- - edge route algorithm to set. Can't benull
.
-
setLayoutAlgorithm
public void setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets diagram layout algorithm.- Parameters:
layoutAlgorithm
- - layout algorithm to set. Can't benull
.
-
setConvertersService
public void setConvertersService(com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> convertersService)
Sets converters service.- Parameters:
convertersService
- - converters service to set. Can't benull
.
-
setProjectManager
public void setProjectManager(IV8ProjectManager projectManager)
Sets project manager.- Parameters:
projectManager
- - projectManager to set. Can't benull
.
-
setProgressMonitor
public void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Sets progress monitor to report progress.- Parameters:
progressMonitor
- - progress monitor to report progress. Can benull
.
-
getConvertersService
public com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> getConvertersService()
Returns converters service.- Returns:
- the convertersService. Can return
null
.
-
getProjectManager
public IV8ProjectManager getProjectManager()
Returns project manager.- Returns:
- the projectManager. Can return
null
.
-
getDiagramCoreController
public IErdDiagramCoreController getDiagramCoreController()
Description copied from interface:IErdDiagramController
Returns diagram core controller without progress monitor.- Specified by:
getDiagramCoreController
in interfaceIErdDiagramController
- Returns:
- diagram core controller without progress monitor. Can't return
null
.
-
getParentController
public IErdDiagramController getParentController()
Description copied from interface:IErdDiagramController
Returns parent diagram controller.- Specified by:
getParentController
in interfaceIErdDiagramController
- Returns:
- parent diagram controller. Returns
null
if diagram has no parent.
-
getAssociatedGroup
public ErdEntityGroup getAssociatedGroup()
Description copied from interface:IErdDiagramController
Returns group associated with this controller. Returnsnull
if there is no associated group.- Specified by:
getAssociatedGroup
in interfaceIErdDiagramController
- Returns:
- group associated with this controller. Can return
null
.
-
getLayoutAlgorithm
public com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm getLayoutAlgorithm()
Returns diagram layout algorithm.- Returns:
- diagram layout algorithm. Can't return
null
.
-
getRouteAlgorithm
public com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm getRouteAlgorithm()
Returns edge routing algorithm.- Returns:
- edge routing algorithm. Can't return
null
.
-
initialize
public void initialize(Collection<MdObject> objects)
- Specified by:
initialize
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
initializeFromEntities
public void initializeFromEntities(Collection<? extends IErdEntity> objects)
Description copied from interface:IErdDiagramController
Initializes diagram from given items.
Use this method to initialize new diagram.- Specified by:
initializeFromEntities
in interfaceIErdDiagramController
- Parameters:
objects
- - diagram entities which will be shown on diagram. Can't benull
.
-
addItems
public Collection<MdObject> addItems(Collection<MdObject> objects)
- Specified by:
addItems
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
addEntities
public Collection<? extends IErdEntity> addEntities(Collection<? extends IErdEntity> objects)
Description copied from interface:IErdDiagramController
Adds new items to the existing diagram. If diagram already has contained some items, they will be returned.- Specified by:
addEntities
in interfaceIErdDiagramController
- Parameters:
objects
- - diagram entities which will be added to the existing diagram. Can't benull
.- Returns:
- entities from given collection already containing on diagram.
If all items were added to diagram returned collection will be zero size. Can't return
null
.
-
addItems
public Collection<MdObject> addItems(Collection<MdObject> objects, com._1c.g5.v8.dt.diagram.framework.model.Point location)
- Specified by:
addItems
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
deleteItems
public Collection<MdObject> deleteItems(Collection<MdObject> objects)
- Specified by:
deleteItems
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
deleteEntities
public Collection<? extends IErdEntity> deleteEntities(Collection<? extends IErdEntity> entities)
Description copied from interface:IErdDiagramController
Deletes items from the existing diagram. If diagram did not contain some items, they will be returned.- Specified by:
deleteEntities
in interfaceIErdDiagramController
- Parameters:
entities
- - entities to delete. Can't benull
.- Returns:
- entities from given collection not containing on diagram.
If all items contained on diagram returned collection will be zero size. Can't return
null
.
-
refreshItems
public Collection<MdObject> refreshItems(Collection<MdObject> objects)
- Specified by:
refreshItems
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
-
getDiagramCore
public IErdDiagramCore getDiagramCore()
Description copied from interface:IErdDiagramController
Returned type changed fromIDiagramCore
toIErdDiagramCore
.- Specified by:
getDiagramCore
in interfacecom._1c.g5.v8.dt.diagram.framework.IDiagramController<MdObject,IErdEntity,com._1c.g5.v8.dt.diagram.framework.IRelation>
- Specified by:
getDiagramCore
in interfaceIErdDiagramController
-
initializeLayoutAlgorithm
protected com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm initializeLayoutAlgorithm()
Initializes diagram layout algorithm.- Returns:
- diagram layout algorithm. Can't return
null
.
-
initializeRouteAlgorithm
protected com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm initializeRouteAlgorithm()
Initializes edges routing algorithm.- Returns:
- edges routing algorithm. Can't return
null
.
-
-