abstract class MVCfx extends AnyRef
MVCfx is the "root" class for creation of UI components using MVCfx pattern. It instantiates and binds together the model, the controller, and the view (FXML).
The implementation of a class that extends MVCfx is very simple, it only needs instance of the model and information about location of the FXML resource. For example:
import org.scalafx.extras.mvcfx.MVCfx class StopWatch(val model: StopWatchModel = new StopWatchModel()) extends MVCfx("/org/scalafx/extras/mvcfx/stopwatch/StopWatch.fxml")
The implementation will include: * StopWatch extends MVCfx * StopWatchModel extends ModelFX * StopWatchController extends ControllerFX * StopWatch.fxml
The complete example in in demo module.
See more details on MVCfx see org.scalafx.extras.mvcfx
documentation.
- Source
- MVCfx.scala
- Alphabetic
- By Inheritance
- MVCfx
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MVCfx(fxmlFilePath: String)
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def createStage(title: String): Stage
Create a stage containing this component.
Create a stage containing this component. The model is initialized on a separate thread.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- lazy val view: Parent
Top level UI node for this component.
- def viewDependencies: ControllerDependencyResolver
Dependencies for the view.
Dependencies for the view. Default implementation only provides the model as a dependency. Overwrite to add additional dependencies as needed.
- returns
dependencies injected into the view when it is created.
- Attributes
- protected
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Helper methods and classes to simplify ScalaFX use.
Package
org.scalafx.extras
contains basic helper methods for running tasks on threads and showing messages.Package
org.scalafx.extras.image
contains image display component with scrolling and zooming.Package
org.scalafx.extras.mvcfx
contains classes for creating with UI components based on FXML.