Class AbstractBpConnection

  • All Implemented Interfaces:
    IDisposable, IRefreshable, com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable, org.eclipse.draw2d.AnchorListener, org.eclipse.draw2d.Connection, org.eclipse.draw2d.IFigure
    Direct Known Subclasses:
    BpConnection, DecorativeLine

    public abstract class AbstractBpConnection
    extends com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
    implements IRefreshable, IDisposable
    Base class for BP scheme connections.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  AbstractBpConnection.BpPathPointConnectionMouseListener
      Graphical Scheme implementation of path point connection mouse listener.
      • Nested classes/interfaces inherited from class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection

        com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection.PathPointConnectionMouseListener
      • Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

        org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch
      • Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

        org.eclipse.draw2d.IFigure.NoInsets
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.eclipse.swt.graphics.RGB DEFAULT_COLOR  
      protected static org.eclipse.swt.graphics.Color SELECTED_COLOR  
      • Fields inherited from class org.eclipse.draw2d.Shape

        lineStyle, lineWidth
      • Fields inherited from class org.eclipse.draw2d.Figure

        bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
      • Fields inherited from interface org.eclipse.draw2d.Connection

        PROPERTY_CONNECTION_ROUTER, PROPERTY_POINTS
      • Fields inherited from interface org.eclipse.draw2d.IFigure

        MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractBpConnection​(com._1c.g5.v8.dt.diagram.framework.IRelation associatedRelation)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void connectionChanged​(org.eclipse.draw2d.Connection arg0, org.eclipse.draw2d.geometry.PointList arg1, org.eclipse.draw2d.geometry.PointList arg2)  
      void dispose()
      Removes unneed figures associated with this from figure canvas.
      protected boolean drawJumpLinks()  
      protected boolean drawRoundedBendAngles()  
      BpRelation getAssociatedRelation()  
      protected com._1c.g5.v8.dt.diagram.framework.ui.IDiagram getDiagramGui()  
      protected org.eclipse.draw2d.Label getLabel()
      Returns connection label.
      protected ConnectionEnding getSourceEnding()
      Returns source ending.
      protected ConnectionEnding getTargetEnding()
      Returns target ending.
      protected int getTolerance()  
      protected abstract void initializeEndings()
      Initializes connections endings.
      protected void initMouseListeners()  
      protected void outlineShape​(org.eclipse.draw2d.Graphics graphics)  
      protected void pathPointAdded​(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPoint pathPoint)  
      protected void pathPointRemoved​(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPoint pathPoint)  
      void refresh()
      Refreshes ui style.
      void setParent​(org.eclipse.draw2d.IFigure parent)  
      void setSelected​(boolean isSelected)  
      void setSourceAnchor​(org.eclipse.draw2d.ConnectionAnchor anchor)  
      protected void setSourceEnding​(ConnectionEnding sourceEnding)
      Sets source ending.
      void setTargetAnchor​(org.eclipse.draw2d.ConnectionAnchor anchor)  
      protected void setTargetEnding​(ConnectionEnding targetEnding)
      Sets target ending.
      protected void showMenu​(org.eclipse.draw2d.Connection source)  
      • Methods inherited from class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection

        createPathPoint, getClearPoints, getPathPoitns, isNew, isRemoved, isSelected, renewPathPoints, setPathPointsVisible, setPoints
      • Methods inherited from class org.eclipse.draw2d.PolylineConnection

        addNotify, addRoutingListener, anchorMoved, getBounds, getConnectionRouter, getRoutingConstraint, getSourceAnchor, getSourceDecoration, getTargetAnchor, getTargetDecoration, layout, removeNotify, removeRoutingListener, revalidate, setConnectionRouter, setRoutingConstraint, setSourceDecoration, setTargetDecoration
      • Methods inherited from class org.eclipse.draw2d.Polyline

        containsPoint, fillShape, isOpaque, primTranslate, removeAllPoints, repaint, setLineWidth, setTolerance, shapeContainsPoint
      • Methods inherited from class org.eclipse.draw2d.AbstractPointListShape

        addPoint, childrenContainsPoint, getEnd, getPoints, getStart, insertPoint, removePoint, setEnd, setEndpoints, setPoint, setStart
      • Methods inherited from class org.eclipse.draw2d.Shape

        getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidthFloat, setOutline, setOutlineXOR, setXOR
      • Methods inherited from class org.eclipse.draw2d.Figure

        add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, paint, paintBorder, paintChildren, paintClientArea, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
      • Methods inherited from interface org.eclipse.draw2d.Connection

        getPoints
      • Methods inherited from interface org.eclipse.draw2d.IFigure

        add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
    • Field Detail

      • DEFAULT_COLOR

        protected static final org.eclipse.swt.graphics.RGB DEFAULT_COLOR
      • SELECTED_COLOR

        protected static final org.eclipse.swt.graphics.Color SELECTED_COLOR
    • Constructor Detail

      • AbstractBpConnection

        public AbstractBpConnection​(com._1c.g5.v8.dt.diagram.framework.IRelation associatedRelation)
        Constructor.
        Parameters:
        associatedRelation - - associated relation. Can't be null.
    • Method Detail

      • setSelected

        public void setSelected​(boolean isSelected)
        Specified by:
        setSelected in interface com._1c.g5.v8.dt.diagram.framework.ui.model.ISelectable
        Overrides:
        setSelected in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • getAssociatedRelation

        public BpRelation getAssociatedRelation()
        Overrides:
        getAssociatedRelation in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramConnection
      • setParent

        public void setParent​(org.eclipse.draw2d.IFigure parent)
        Specified by:
        setParent in interface org.eclipse.draw2d.IFigure
        Overrides:
        setParent in class org.eclipse.draw2d.Figure
      • dispose

        public void dispose()
        Description copied from interface: IDisposable
        Removes unneed figures associated with this from figure canvas.
        Specified by:
        dispose in interface IDisposable
      • setSourceAnchor

        public void setSourceAnchor​(org.eclipse.draw2d.ConnectionAnchor anchor)
        Specified by:
        setSourceAnchor in interface org.eclipse.draw2d.Connection
        Overrides:
        setSourceAnchor in class org.eclipse.draw2d.PolylineConnection
      • setTargetAnchor

        public void setTargetAnchor​(org.eclipse.draw2d.ConnectionAnchor anchor)
        Specified by:
        setTargetAnchor in interface org.eclipse.draw2d.Connection
        Overrides:
        setTargetAnchor in class org.eclipse.draw2d.PolylineConnection
      • initMouseListeners

        protected void initMouseListeners()
        Overrides:
        initMouseListeners in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • getTolerance

        protected int getTolerance()
        Overrides:
        getTolerance in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • outlineShape

        protected void outlineShape​(org.eclipse.draw2d.Graphics graphics)
        Overrides:
        outlineShape in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramConnection
      • drawJumpLinks

        protected boolean drawJumpLinks()
        Specified by:
        drawJumpLinks in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramConnection
      • drawRoundedBendAngles

        protected boolean drawRoundedBendAngles()
        Specified by:
        drawRoundedBendAngles in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramConnection
      • getDiagramGui

        protected com._1c.g5.v8.dt.diagram.framework.ui.IDiagram getDiagramGui()
        Specified by:
        getDiagramGui in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractDiagramConnection
      • showMenu

        protected void showMenu​(org.eclipse.draw2d.Connection source)
        Specified by:
        showMenu in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • connectionChanged

        protected void connectionChanged​(org.eclipse.draw2d.Connection arg0,
                                         org.eclipse.draw2d.geometry.PointList arg1,
                                         org.eclipse.draw2d.geometry.PointList arg2)
        Specified by:
        connectionChanged in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • pathPointAdded

        protected void pathPointAdded​(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPoint pathPoint)
        Specified by:
        pathPointAdded in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • pathPointRemoved

        protected void pathPointRemoved​(com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPoint pathPoint)
        Specified by:
        pathPointRemoved in class com._1c.g5.v8.dt.diagram.framework.ui.model.AbstractPathPointConnection
      • getLabel

        protected org.eclipse.draw2d.Label getLabel()
        Returns connection label.
        Returns:
        connection label. Can return null.
      • getSourceEnding

        protected ConnectionEnding getSourceEnding()
        Returns source ending.
        Returns:
        source ending. Returns null if not set. Can return null.
      • setSourceEnding

        protected void setSourceEnding​(ConnectionEnding sourceEnding)
        Sets source ending.
        Parameters:
        sourceEnding - - source ending. Can't be null.
      • getTargetEnding

        protected ConnectionEnding getTargetEnding()
        Returns target ending.
        Returns:
        target ending. Returns null if not set. Can return null.
      • setTargetEnding

        protected void setTargetEnding​(ConnectionEnding targetEnding)
        Sets target ending.
        Parameters:
        targetEnding - - target ending. Can't be null.
      • initializeEndings

        protected abstract void initializeEndings()
        Initializes connections endings.