a later ScalaDoc might be a little more useful (in particular, the new version of ScalaDoc allows you to show / hide specific elements so that you can focus on what you should implement).
It should be noted that you do not need to define an object named ui that extends the interface. What ScalaDoc says is more accurate and more flexible - "implements the ui field." Due to the Uniform Access Principle, you can implement the ui field as val or object (similarly, you can use val or var to implement def ). The only limitations (as shown in ScalaDoc as val ui : UI ) is that
- ui should be a user interface, and
- reference to ui should be unchanged
For instance:
class MainApplet extends Applet { val ui = new MainUI(Color.WHITE) class MainUI(backgroundColor: Color) extends UI { val mainPanel = new BoxPanel(Orientation.Vertical) {
source share