override fun paintConnection()

in code/richediting/src/main/kotlin/org/fbme/ide/richediting/adapters/ecc/ECTransitionController.kt [123:150]


    override fun paintConnection(
        path: ECTransitionPath,
        cursor: ECTransitionCursor?,
        selected: Boolean,
        graphics: Graphics
    ) {
        val g = graphics.create()
        val painter = ECTransitionPathPainter(path, cursor)
        if (highlightColor != null) {
            ECTransitionPathPainter.setupHighlightPathPaint(g)
            g.color = highlightColor
            painter.paint(g, false)
        }
        g.color = MPSColors.GRAY
        if (selected) {
            ECTransitionPathPainter.setupSelectedPathPaint(g)
        } else {
            ECTransitionPathPainter.setupRegularPathPaint(g)
        }
        painter.paint(g, true)
        val bounds = Rectangle(handle.getBounds(path.centre))
        bounds.x -= 3
        bounds.width += 6
        graphics.color = MPSColors.WHITE
        (graphics as Graphics2D).fill(bounds)
        graphics.setColor(MPSColors.LIGHT_GRAY)
        graphics.draw(bounds)
    }