Class AbstractDiagramEntitiesOperation

    • Constructor Detail

      • AbstractDiagramEntitiesOperation

        public AbstractDiagramEntitiesOperation()
    • Method Detail

      • addEntities

        protected void addEntities​(IErdDiagramController controller,
                                   Collection<? extends IErdEntity> entities,
                                   DiagramTabItem tab,
                                   boolean needRefresh)
        Adds given entities to given controller and refreshes given tab if needRefresh is true.
        Parameters:
        controller - - controller. Can't be null
        entities - - entities to add. Can't be null.
        tab - - tab where entities will be added. Can't be null.
        needRefresh - - true if tab should be refreshed.
      • removeEntities

        protected void removeEntities​(IErdDiagramController controller,
                                      Collection<? extends IErdEntity> entities,
                                      DiagramTabItem tab,
                                      boolean needRefresh)
        Removes given entities from given controller and refreshes given tab if needRefresh is true.
        Parameters:
        controller - - controller. Can't be null
        entities - - entities to delete. Can't be null.
        tab - - tab where entities will be added. Can't be null.
        needRefresh - - true if tab should be refreshed.
      • refreshRelations

        protected void refreshRelations​(DiagramTabItem tab)
        Refreshes relations on given tab.
        Parameters:
        tab - - tab to refresh. Can't be null.
      • savePositions

        protected List<com._1c.g5.v8.dt.diagram.framework.model.Point> savePositions​(List<? extends com._1c.g5.v8.dt.diagram.framework.IPosition> entities)
        Returns positions of given entities. Index of entity in entities list equals to index of its position in positions list.
        Parameters:
        entities - - entities to save positions. Can't be null.
        Returns:
        positions of given entities. Can't return null.
      • setPositions

        protected void setPositions​(List<? extends com._1c.g5.v8.dt.diagram.framework.IPosition> entities,
                                    List<com._1c.g5.v8.dt.diagram.framework.model.Point> positions)
        Sets positions to entities. Size of entities should be equal to size of positions. Index of entity in entities list should be equal to index of its position in positions list.
        Parameters:
        entities - - entities to set positions to. Can't be null.
        positions - - positions. Can't be null.