All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.swing.Applet.scala Maven / Gradle / Ivy

There is a newer version: 2.11.0-M7
Show newest version
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2007-2013, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */



package scala.swing

import javax.swing.JApplet

/** 

* Clients should implement the ui field. See the SimpleApplet * demo for an example. *

*

* Note: Applet extends javax.swing.JApplet * to satisfy Java's applet loading mechanism. The usual component wrapping * scheme doesn't work here. *

* * @see javax.swing.JApplet */ abstract class Applet extends JApplet { outer => val ui: UI override def init() { ui.init() } override def start() { ui.start() } override def stop() { ui.stop() } abstract class UI extends RootPanel { def peer = outer override def contents_=(c: Component) { super.contents_=(c) peer.validate() } def init() def start() {} def stop() {} } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy