scala.swing

CheckBox

class CheckBox extends ToggleButton

Two state button that can either be checked or unchecked.

Inherits

  1. ToggleButton
  2. AbstractButton
  3. Trigger
  4. Component
  5. UIElement
  6. LazyPublisher
  7. Publisher
  8. Reactor
  9. Proxy
  10. AnyRef
  11. Any

Value Members

  1. var Mouse: mouse

  2. def action: Action

  3. def action_=(a: Action): Unit

  4. def background: Color

  5. def background_=(c: Color): Unit

  6. def border: Border

  7. def borderPainted: Boolean

  8. def borderPaintedFlat: Boolean

  9. def borderPaintedFlat_=(flat: Boolean): Unit

  10. def borderPainted_=(b: Boolean): Unit

  11. def border_=(b: Border): Unit

  12. def bounds: Rectangle

  13. def contentAreaFilled: Boolean

  14. def contentAreaFilled_=(b: Boolean): Unit

  15. def cursor: Cursor

  16. def cursor_=(c: Cursor): Unit

  17. def deafTo(ps: Publisher*): Unit

    Installed reaction won't receive events from the given publisher anylonger

    Installed reaction won't receive events from the given publisher anylonger.

    definition classes: Reactor
  18. def disabledIcon: Icon

  19. def disabledIcon_=(i: Icon): Unit

  20. def disabledSelectedIcon: Icon

  21. def disabledSelectedIcon_=(i: Icon): Unit

  22. def displayable: Boolean

  23. def displayedMnemonicIndex: Int

  24. def displayedMnemonicIndex_=(n: Int): Unit

  25. def doClick(times: Int): Unit

  26. def doClick(): Unit

  27. def enabled: Boolean

  28. def enabled_=(b: Boolean): Unit

  29. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  30. def focusPainted: Boolean

  31. def focusPainted_=(b: Boolean): Unit

  32. def focusable: Boolean

  33. def focusable_=(b: Boolean): Unit

  34. def font: Font

  35. def font_=(f: Font): Unit

  36. def foreground: Color

  37. def foreground_=(c: Color): Unit

  38. def hasFocus: Boolean

  39. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  40. def horizontalAlignment: Value

  41. def horizontalAlignment_=(a: Value): Unit

  42. def horizontalTextPosition: Value

  43. def horizontalTextPosition_=(a: Value): Unit

  44. def icon: Icon

  45. def iconTextGap: Int

  46. def iconTextGap_=(x: Int): Unit

  47. def icon_=(i: Icon): Unit

  48. def ignoreRepaint: Boolean

  49. def ignoreRepaint_=(b: Boolean): Unit

  50. var initP: JComponent

  51. def inputVerifier: (CheckBox.this.type) ⇒ Boolean

  52. def inputVerifier_=(v: (CheckBox.this.type) ⇒ Boolean): Unit

  53. object keys extends Publisher

  54. def listenTo(ps: Publisher*): Unit

    Listen to the given publisher as long as deafTo isn't called for them

    Listen to the given publisher as long as deafTo isn't called for them.

    definition classes: Reactor
  55. def locale: Locale

  56. def location: Point

  57. def locationOnScreen: Point

  58. def margin: Insets

  59. def margin_=(i: Insets): Unit

  60. def maximumSize: Dimension

  61. def maximumSize_=(x: Dimension): Unit

  62. def minimumSize: Dimension

  63. def minimumSize_=(x: Dimension): Unit

  64. def mnemonic: Value

  65. def mnemonic_=(k: Value): Unit

  66. object mouse extends AnyRef

    Contains publishers for various mouse events

  67. def multiClickThreshold: Long

  68. def multiClickThreshold_=(n: Long): Unit

  69. def onFirstSubscribe(): Unit

  70. def onLastUnsubscribe(): Unit

  71. def opaque: Boolean

  72. def opaque_=(b: Boolean): Unit

  73. def paint(g: Graphics2D): Unit

  74. var peer: JCheckBox

    The underlying Swing peer

    The underlying Swing peer.

  75. def preferredSize: Dimension

  76. def preferredSize_=(xy: (Int, Int)): Unit

  77. def preferredSize_=(x: Dimension): Unit

  78. def pressedIcon: Icon

  79. def pressedIcon_=(i: Icon): Unit

  80. def publish(e: Event): Unit

    Notify all registered reactions

    Notify all registered reactions.

    definition classes: Publisher
  81. val reactions: Reactions

    All reactions of this reactor

    All reactions of this reactor.

    definition classes: Reactor
  82. def repaint(rect: Rectangle): Unit

  83. def repaint(): Unit

  84. def requestFocus(): Unit

  85. def requestFocusInWindow(): Boolean

  86. def revalidate(): Unit

  87. def rolloverEnabled: Boolean

  88. def rolloverEnabled_=(b: Boolean): Unit

  89. def rolloverIcon: Icon

  90. def rolloverIcon_=(b: Icon): Unit

  91. def rolloverSelectedIcon: Icon

  92. def rolloverSelectedIcon_=(b: Icon): Unit

  93. def selected: Boolean

  94. def selectedIcon: Icon

  95. def selectedIcon_=(i: Icon): Unit

  96. def selected_=(b: Boolean): Unit

  97. def self: Component

  98. def showing: Boolean

  99. def size: Dimension

  100. def size_=(xy: (Int, Int)): Unit

  101. def size_=(dim: Dimension): Unit

  102. def subscribe(listener: PartialFunction[Event, Unit]): Unit

  103. def text: String

  104. def text_=(s: String): Unit

  105. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: ComponentProxy ⇐ AnyRef ⇐ Any
  106. def toolkit: Toolkit

  107. def tooltip: String

  108. def tooltip_=(t: String): Unit

  109. def unsubscribe(listener: PartialFunction[Event, Unit]): Unit

  110. def verticalAlignment: Value

  111. def verticalAlignment_=(a: Value): Unit

  112. def verticalTextPosition: Value

  113. def verticalTextPosition_=(a: Value): Unit

  114. def visible: Boolean

  115. def visible_=(b: Boolean): Unit

  116. def xLayoutAlignment: Double

    Used by certain layout managers, e

    Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.

    definition classes: Component
  117. def xLayoutAlignment_=(x: Double): Unit

  118. def yLayoutAlignment: Double

  119. def yLayoutAlignment_=(y: Double): Unit

Instance constructors

  1. new CheckBox()

  2. new CheckBox(text: String)