abstract class Component extends UIElement

Base class for all UI elements that can be displayed in a window. Components are publishers that fire the following event classes: ComponentEvent, FocusEvent, FontChanged, ForegroundChanged, BackgroundChanged.

Note

[Java Swing] Unlike in Java Swing, not all components are also containers.

See also

http://java.sun.com/products/jfc/tsc/articles/painting/ for the component painting mechanism

javax.swing.JComponent

Linear Supertypes
UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Component
  2. UIElement
  3. LazyPublisher
  4. Publisher
  5. Reactor
  6. Proxy
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Component()

Value Members

  1. def background: Color
    Definition Classes
    UIElement
  2. def background_=(c: Color): Unit
    Definition Classes
    UIElement
  3. def border: Border
  4. def border_=(b: Border): Unit
  5. def bounds: Rectangle
    Definition Classes
    UIElement
  6. def componentOrientation: ComponentOrientation
    Definition Classes
    UIElement
  7. def componentOrientation_=(x: ComponentOrientation): Unit
    Definition Classes
    UIElement
  8. def cursor: Cursor
    Definition Classes
    UIElement
  9. def cursor_=(c: Cursor): Unit
    Definition Classes
    UIElement
  10. 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
  11. def displayable: Boolean
    Definition Classes
    UIElement
  12. def enabled: Boolean
  13. def enabled_=(b: Boolean): Unit
  14. def equals(that: Any): Boolean
    Definition Classes
    Proxy → Any
  15. def focusable: Boolean
  16. def focusable_=(b: Boolean): Unit
  17. def font: Font
    Definition Classes
    UIElement
  18. def font_=(f: Font): Unit
    Definition Classes
    UIElement
  19. def foreground: Color
    Definition Classes
    UIElement
  20. def foreground_=(c: Color): Unit
    Definition Classes
    UIElement
  21. def hasFocus: Boolean
  22. def hashCode(): Int
    Definition Classes
    Proxy → Any
  23. def ignoreRepaint: Boolean
    Definition Classes
    UIElement
  24. def ignoreRepaint_=(b: Boolean): Unit
    Definition Classes
    UIElement
  25. var initP: JComponent
  26. def inputVerifier: (Component) ⇒ Boolean
  27. def inputVerifier_=(v: (Component) ⇒ Boolean): Unit
  28. 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
  29. def locale: Locale
    Definition Classes
    UIElement
  30. def location: Point
    Definition Classes
    UIElement
  31. def locationOnScreen: Point
    Definition Classes
    UIElement
  32. def maximumSize: Dimension
    Definition Classes
    UIElement
  33. def maximumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  34. def minimumSize: Dimension
    Definition Classes
    UIElement
  35. def minimumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  36. def name: String
  37. def name_=(s: String): Unit
  38. def opaque: Boolean
  39. def opaque_=(b: Boolean): Unit
  40. def paint(g: Graphics2D): Unit
  41. lazy val peer: JComponent

    The underlying Swing peer.

    The underlying Swing peer.

    Definition Classes
    ComponentUIElement
  42. def preferredSize: Dimension
    Definition Classes
    UIElement
  43. def preferredSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  44. def publish(e: Event): Unit

    Notify all registered reactions.

    Notify all registered reactions.

    Definition Classes
    Publisher
  45. val reactions: Reactions

    All reactions of this reactor.

    All reactions of this reactor.

    Definition Classes
    Reactor
  46. def repaint(rect: Rectangle): Unit
    Definition Classes
    UIElement
  47. def repaint(): Unit
    Definition Classes
    UIElement
  48. def requestFocus(): Unit
  49. def requestFocusInWindow(): Boolean
  50. def revalidate(): Unit
  51. def self: java.awt.Component
    Definition Classes
    UIElement → Proxy
  52. def showing: Boolean
    Definition Classes
    UIElement
  53. def size: Dimension
    Definition Classes
    UIElement
  54. def subscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  55. def toString(): String
    Definition Classes
    Component → Proxy → AnyRef → Any
  56. def toolkit: Toolkit
    Definition Classes
    UIElement
  57. def tooltip: String
  58. def tooltip_=(t: String): Unit
  59. def unsubscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  60. def validate(): Unit
    Definition Classes
    UIElement
  61. def visible: Boolean
    Definition Classes
    UIElement
  62. def visible_=(b: Boolean): Unit
    Definition Classes
    UIElement
  63. def xLayoutAlignment: Double

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

  64. def xLayoutAlignment_=(x: Double): Unit
  65. def yLayoutAlignment: Double
  66. def yLayoutAlignment_=(y: Double): Unit
  67. object keys extends Publisher
  68. object mouse

    Contains publishers for various mouse events.

    Contains publishers for various mouse events. They are separated for efficiency reasons.