override fun paintContent()

in code/richediting/src/main/kotlin/org/fbme/ide/richediting/adapters/ecc/cell/AlgorithmCell.kt [75:108]


    override fun paintContent(graphics: Graphics, settings: ParentSettings) {
        if (isOpenBody && algorithmBody != null) {
            val g = graphics.create() as Graphics2D
            g.color = CellConstants.ALGORITHM_COLOR
            g.fillRoundRect(
                myX,
                myY,
                myWidth + CellConstants.ACTIVE_WEIGHT_PADDING,
                totalHeight,
                CellConstants.ROUNDED,
                CellConstants.ROUNDED
            )
            drawText(graphics, settings)
        } else if (algorithmBody != null) {
            val g = graphics.create() as Graphics2D
            g.color = CellConstants.HIDDEN_ALGORITHM_COLOR
            g.fillRoundRect(
                myX,
                myY,
                myWidth + CellConstants.ACTIVE_WEIGHT_PADDING,
                myHeight,
                CellConstants.ROUNDED,
                CellConstants.ROUNDED
            )
            drawText(graphics, settings)
        } else {
            val g = graphics.create() as Graphics2D
            g.color = CellConstants.ALGORITHM_COLOR
            g.fillRoundRect(myX, myY, myWidth + CellConstants.ACTIVE_WEIGHT_PADDING, myHeight, 10, 10)
            if (isEditable) {
                drawText(graphics, settings)
            }
        }
    }