Skip to content

Instantly share code, notes, and snippets.

@andy1138
Created July 2, 2014 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy1138/f80bda3503af711671d3 to your computer and use it in GitHub Desktop.
Save andy1138/f80bda3503af711671d3 to your computer and use it in GitHub Desktop.
scaladoc link to javadoc
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