Class 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 Detail

      • AlgorithmConnector

        public AlgorithmConnector​(DiagramTabItem tab)
        Default constructor.
        Parameters:
        tab - - tab to create algorithm for. Can't be null.
      • 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 be null.
        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 be null.
    • Method Detail

      • getStepCount

        public int getStepCount()
        Specified by:
        getStepCount in interface com._1c.g5.v8.dt.diagram.framework.IProgressBarController
      • fireStepDone

        public void fireStepDone()
        Specified by:
        fireStepDone in interface com._1c.g5.v8.dt.diagram.framework.IProgressBarController
      • fireStepsToFinishCount

        public void fireStepsToFinishCount​(int i)
        Specified by:
        fireStepsToFinishCount in interface com._1c.g5.v8.dt.diagram.framework.IProgressBarController
      • setProgressMonitor

        public void setProgressMonitor​(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
        Specified by:
        setProgressMonitor in interface com._1c.g5.v8.dt.diagram.framework.IProgressBarController
      • getProgressMonitor

        public org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
        Specified by:
        getProgressMonitor in interface com._1c.g5.v8.dt.diagram.framework.IProgressBarController
      • checkForInterruption

        public boolean checkForInterruption()
        Specified by:
        checkForInterruption in interface com._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 be null.
      • 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 interface com._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 interface com._1c.g5.v8.dt.diagram.framework.layout.IDiagramLayoutAlgorithm