scala.swing

Menu

class Menu extends MenuItem with Wrapper

A menu. Contains menu items. Being a menu item itself, menus can be nested.

Inherits

  1. Wrapper
  2. Wrapper
  3. SequentialContainer
  4. Container
  5. MenuItem
  6. AbstractButton
  7. Trigger
  8. Component
  9. UIElement
  10. LazyPublisher
  11. Publisher
  12. Reactor
  13. Proxy
  14. AnyRef
  15. 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 borderPainted_=(b: Boolean): Unit

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

  10. def bounds: Rectangle

  11. def contentAreaFilled: Boolean

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

  13. val contents: Buffer[Component]

    The child components of this container

    The child components of this container.

    definition classes: WrapperWrapperSequentialContainerContainer
  14. def cursor: Cursor

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

  16. 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
  17. def disabledIcon: Icon

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

  19. def disabledSelectedIcon: Icon

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

  21. def displayable: Boolean

  22. def displayedMnemonicIndex: Int

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

  24. def doClick(times: Int): Unit

  25. def doClick(): Unit

  26. def enabled: Boolean

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

  28. 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
  29. def focusPainted: Boolean

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

  31. def focusable: Boolean

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

  33. def font: Font

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

  35. def foreground: Color

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

  37. def hasFocus: Boolean

  38. 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
  39. def horizontalAlignment: Value

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

  41. def horizontalTextPosition: Value

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

  43. def icon: Icon

  44. def iconTextGap: Int

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

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

  47. def ignoreRepaint: Boolean

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

  49. var initP: JComponent

  50. def inputVerifier: (Menu.this.type) ⇒ Boolean

  51. def inputVerifier_=(v: (Menu.this.type) ⇒ Boolean): Unit

  52. object keys extends Publisher

  53. 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
  54. def locale: Locale

  55. def location: Point

  56. def locationOnScreen: Point

  57. def margin: Insets

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

  59. def maximumSize: Dimension

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

  61. def minimumSize: Dimension

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

  63. def mnemonic: Value

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

  65. object mouse extends AnyRef

    Contains publishers for various mouse events

  66. def multiClickThreshold: Long

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

  68. def onFirstSubscribe(): Unit

  69. def onLastUnsubscribe(): Unit

  70. def opaque: Boolean

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

  72. def paint(g: Graphics2D): Unit

  73. var peer: JMenu

    The underlying Swing peer

    The underlying Swing peer.

  74. def preferredSize: Dimension

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

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

  77. def pressedIcon: Icon

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

  79. def publish(e: Event): Unit

    Notify all registered reactions

    Notify all registered reactions.

    definition classes: Publisher
  80. val reactions: Reactions

    All reactions of this reactor

    All reactions of this reactor.

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

  82. def repaint(): Unit

  83. def requestFocus(): Unit

  84. def requestFocusInWindow(): Boolean

  85. def revalidate(): Unit

  86. def rolloverEnabled: Boolean

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

  88. def rolloverIcon: Icon

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

  90. def rolloverSelectedIcon: Icon

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

  92. def selected: Boolean

  93. def selectedIcon: Icon

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

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

  96. def self: Component

  97. def showing: Boolean

  98. def size: Dimension

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

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

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

  102. def text: String

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

  104. 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
  105. def toolkit: Toolkit

  106. def tooltip: String

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

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

  109. def verticalAlignment: Value

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

  111. def verticalTextPosition: Value

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

  113. def visible: Boolean

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

  115. 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
  116. def xLayoutAlignment_=(x: Double): Unit

  117. def yLayoutAlignment: Double

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

Instance constructors

  1. new Menu(title0: String)

  2. new Menu(a: Action)

  3. new Menu()