Created
July 2, 2014 13:21
-
-
Save andy1138/f80bda3503af711671d3 to your computer and use it in GitHub Desktop.
scaladoc link to javadoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package scala.swing | |
import javax.swing._ | |
object Button { | |
def apply(text0: String)(op: => Unit) = new Button(Action(text0)(op)) | |
} | |
/** | |
* A button that can be clicked, usually to perform some action. | |
* | |
* @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JButton.html">javax.swing.JButton</a> | |
*/ | |
class Button(text0: String) extends AbstractButton with Publisher { | |
override lazy val peer: JButton = new JButton(text0) with SuperMixin | |
def this() = this("") | |
def this(a: Action) = { | |
this("") | |
action = a | |
} | |
/** | |
* @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JButton.html#isDefaultButton()">javax.swing.JButton.isDefaultButton</a> | |
*/ | |
def defaultButton: Boolean = peer.isDefaultButton | |
def defaultCapable: Boolean = peer.isDefaultCapable | |
def defaultCapable_=(capable: Boolean) { peer.setDefaultCapable(capable) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment