From 60828f3aadaac3a14544088a0fe9ad4c40c08541 Mon Sep 17 00:00:00 2001 From: Sarah Gerweck Date: Fri, 15 Jul 2016 22:27:31 -0700 Subject: [PATCH] Minor fixups to type signatures --- src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala | 2 +- .../scala/org/gerweck/scalafx/util/layout/Anchored.scala | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala b/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala index 96cb464..2512f68 100644 --- a/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala +++ b/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala @@ -14,7 +14,7 @@ abstract class SingletonStage { protected[this] def singletonStageName = getClass.getSimpleName - protected[this] def makeStage(): InstanceStage + protected[this] def makeStage(): Stage with InstanceStage def showStage(): Unit = { singletonStage match { diff --git a/src/main/scala/org/gerweck/scalafx/util/layout/Anchored.scala b/src/main/scala/org/gerweck/scalafx/util/layout/Anchored.scala index dbe5413..1d632cc 100644 --- a/src/main/scala/org/gerweck/scalafx/util/layout/Anchored.scala +++ b/src/main/scala/org/gerweck/scalafx/util/layout/Anchored.scala @@ -1,8 +1,9 @@ package org.gerweck.scalafx.util.layout import scalafx.geometry.Insets +import scalafx.scene.Node import scalafx.scene.control.MenuBar -import scalafx.scene.layout._ +import scalafx.scene.layout.{ AnchorPane, Priority } /** A wrapper that binds its child pane to all four corners so it will always * grow as the stage is resized. @@ -12,7 +13,7 @@ import scalafx.scene.layout._ * @author Sarah Gerweck */ object Anchored { - def apply(margins: Insets = Insets.Empty, menus: Option[MenuBar] = None)(body: => Pane) = { + def apply(margins: Insets = Insets.Empty, menus: Option[MenuBar] = None)(body: => Node) = { new AnchorPane { ap => hgrow = Priority.Always vgrow = Priority.Always