Package com._1c.g5.v8.dt.erd.ui
Class AlgorithmConnector
- java.lang.Object
-
- com._1c.g5.v8.dt.erd.ui.AlgorithmConnector
-
- All Implemented Interfaces:
com._1c.g5.v8.dt.diagram.framework.IProgressBarController
,com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
public class AlgorithmConnector extends Object implements com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm, com._1c.g5.v8.dt.diagram.framework.IProgressBarController
Instance of this class calculates entities size and uses layout algorithm.
-
-
Constructor Summary
Constructors Constructor Description AlgorithmConnector(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm, boolean isOrthogonalLineStyles, boolean adjustScreenSize, DiagramTabItem tab)
Constructor.AlgorithmConnector(DiagramTabItem tab)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkForInterruption()
void
fireStepDone()
void
fireStepsToFinishCount(int i)
com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
getLayoutAlgorithm()
Returns diagram layout algorithm.org.eclipse.core.runtime.IProgressMonitor
getProgressMonitor()
int
getStepCount()
void
process(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<? extends com._1c.g5.v8.dt.diagram.framework.IEntity,? extends com._1c.g5.v8.dt.diagram.framework.IRelation> diagramCore)
void
process(Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations)
void
setAdjustScreenSize(boolean adjustScreenSize)
Sets if screen size should be adjusted.void
setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets diagram layout algorithm.void
setOrthogonalLineStyles(boolean isOrthogonalLineStyles)
Sets if line style should be orthogonal.void
setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
-
-
-
Constructor Detail
-
AlgorithmConnector
public AlgorithmConnector(DiagramTabItem tab)
Default constructor.- Parameters:
tab
- - tab to create algorithm for. Can't benull
.
-
AlgorithmConnector
public AlgorithmConnector(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm, boolean isOrthogonalLineStyles, boolean adjustScreenSize, DiagramTabItem tab)
Constructor.- Parameters:
layoutAlgorithm
- - layout algorithm. Can benull
.isOrthogonalLineStyles
- -true
if lines should be orthogonal.adjustScreenSize
- -true
if screen size should be adjusted after algorithm.tab
- - tab to create algorithm for. Can't benull
.
-
-
Method Detail
-
getStepCount
public int getStepCount()
- Specified by:
getStepCount
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
fireStepDone
public void fireStepDone()
- Specified by:
fireStepDone
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
fireStepsToFinishCount
public void fireStepsToFinishCount(int i)
- Specified by:
fireStepsToFinishCount
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
setProgressMonitor
public void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
- Specified by:
setProgressMonitor
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
getProgressMonitor
public org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
- Specified by:
getProgressMonitor
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
checkForInterruption
public boolean checkForInterruption()
- Specified by:
checkForInterruption
in interfacecom._1c.g5.v8.dt.diagram.framework.IProgressBarController
-
setAdjustScreenSize
public void setAdjustScreenSize(boolean adjustScreenSize)
Sets if screen size should be adjusted.- Parameters:
adjustScreenSize
- -true
if screen size should be adjusted.
-
setOrthogonalLineStyles
public void setOrthogonalLineStyles(boolean isOrthogonalLineStyles)
Sets if line style should be orthogonal.- Parameters:
isOrthogonalLineStyles
- -true
if line styles should be orthogonal.
-
setLayoutAlgorithm
public void setLayoutAlgorithm(com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm layoutAlgorithm)
Sets diagram layout algorithm.- Parameters:
layoutAlgorithm
- the layoutAlgorithm to set. Can't benull
.
-
getLayoutAlgorithm
public com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm getLayoutAlgorithm()
Returns diagram layout algorithm.- Returns:
- the layoutAlgorithm. Can't return
null
.
-
process
public void process(Collection<? extends com._1c.g5.v8.dt.diagram.framework.IEntity> entities, Collection<? extends com._1c.g5.v8.dt.diagram.framework.IRelation> relations)
- Specified by:
process
in interfacecom._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
-
process
public void process(com._1c.g5.v8.dt.diagram.framework.IDiagramCore<? extends com._1c.g5.v8.dt.diagram.framework.IEntity,? extends com._1c.g5.v8.dt.diagram.framework.IRelation> diagramCore)
- Specified by:
process
in interfacecom._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm
-
-