Skip to content

Commit

Permalink
addChildren -> addChild
Browse files Browse the repository at this point in the history
  • Loading branch information
alshan committed May 17, 2019
1 parent 6d006ea commit c16be37
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface CanvasControl {

fun createCanvas(size: Vector): Canvas

fun addChildren(canvas: Canvas)
fun addChild(canvas: Canvas)

fun removeChild(canvas: Canvas)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SingleCanvasControl(private val myCanvasControl: CanvasControl) {

init {
canvas = myCanvasControl.createCanvas(myCanvasControl.size)
myCanvasControl.addChildren(canvas)
myCanvasControl.addChild(canvas)
}

fun createCanvas(): Canvas {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SvgCanvasRenderer(private val svgRoot: SvgElement, private val canvasContr
private var needRedraw: Boolean = true

init {
canvasControl.addChildren(mainCanvas)
canvasControl.addChild(mainCanvas)
initNodeContainer()
animationTimer.start()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class AwtCanvasControl(graphicsCanvasControlFactory: GraphicsCanvasControlFactor
return myGraphicsCanvasControl.createCanvas(size)
}

override fun addChildren(canvas: Canvas) {
myGraphicsCanvasControl.addChildren(canvas)
override fun addChild(canvas: Canvas) {
myGraphicsCanvasControl.addChild(canvas)
}

override fun removeChild(canvas: Canvas) {
myGraphicsCanvasControl.addChildren(canvas)
myGraphicsCanvasControl.addChild(canvas)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal class AwtGraphicsCanvasControl(
return AwtCanvas.create(size, myPixelRatio)
}

override fun addChildren(canvas: Canvas) {
override fun addChild(canvas: Canvas) {
throw IllegalStateException()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class JavafxCanvasControl(override val size: Vector, private val myPixelRatio: D
return JavafxCanvas.create(size, myPixelRatio)
}

override fun addChildren(canvas: Canvas) {
override fun addChild(canvas: Canvas) {
myRoot.children.add((canvas as JavafxCanvas).nativeCanvas)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ internal class JavafxGraphicsCanvasControl(
return myJavafxCanvasControl.createCanvas(size)
}

override fun addChildren(canvas: Canvas) {
myJavafxCanvasControl.addChildren(canvas)
override fun addChild(canvas: Canvas) {
myJavafxCanvasControl.addChild(canvas)
}

override fun removeChild(canvas: Canvas) {
Expand Down

0 comments on commit c16be37

Please sign in to comment.