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
javax.swing.JComponent
http://java.sun.com/products/jfc/tsc/articles/painting/ for the component painting mechanism
- Alphabetic
- By Inheritance
- Component
- UIElement
- LazyPublisher
- Publisher
- Reactor
- Proxy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Component()
Value Members
- def background: Color
- Definition Classes
- UIElement
- def background_=(c: Color): Unit
- Definition Classes
- UIElement
- def border: Border
- def border_=(b: Border): Unit
- def bounds: Rectangle
- Definition Classes
- UIElement
- def componentOrientation: ComponentOrientation
- Definition Classes
- UIElement
- def componentOrientation_=(x: ComponentOrientation): Unit
- Definition Classes
- UIElement
- def cursor: Cursor
- Definition Classes
- UIElement
- def cursor_=(c: Cursor): Unit
- Definition Classes
- UIElement
- 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
- def displayable: Boolean
- Definition Classes
- UIElement
- def enabled: Boolean
- def enabled_=(b: Boolean): Unit
- def equals(that: Any): Boolean
- Definition Classes
- Proxy → Any
- def focusable: Boolean
- def focusable_=(b: Boolean): Unit
- def font: Font
- Definition Classes
- UIElement
- def font_=(f: Font): Unit
- Definition Classes
- UIElement
- def foreground: Color
- Definition Classes
- UIElement
- def foreground_=(c: Color): Unit
- Definition Classes
- UIElement
- def hasFocus: Boolean
- def hashCode(): Int
- Definition Classes
- Proxy → Any
- def ignoreRepaint: Boolean
- Definition Classes
- UIElement
- def ignoreRepaint_=(b: Boolean): Unit
- Definition Classes
- UIElement
- def inputVerifier: (Component) => Boolean
- def inputVerifier_=(v: (Component) => Boolean): Unit
- 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
- def locale: Locale
- Definition Classes
- UIElement
- def location: Point
- Definition Classes
- UIElement
- def locationOnScreen: Point
- Definition Classes
- UIElement
- def maximumSize: Dimension
- Definition Classes
- UIElement
- def maximumSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def minimumSize: Dimension
- Definition Classes
- UIElement
- def minimumSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def name: String
- def name_=(s: String): Unit
- def opaque: Boolean
- def opaque_=(b: Boolean): Unit
- def paint(g: Graphics2D): Unit
- lazy val peer: JComponent
The underlying Swing peer.
- def preferredSize: Dimension
- Definition Classes
- UIElement
- def preferredSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def publish(e: Event): Unit
Notify all registered reactions.
Notify all registered reactions.
- Definition Classes
- Publisher
- val reactions: Reactions
All reactions of this reactor.
All reactions of this reactor.
- Definition Classes
- Reactor
- def repaint(rect: Rectangle): Unit
- Definition Classes
- UIElement
- def repaint(): Unit
- Definition Classes
- UIElement
- def requestFocus(): Unit
- def requestFocusInWindow(): Boolean
- def revalidate(): Unit
- def self: Any
- Definition Classes
- UIElement → Proxy
- def showing: Boolean
- Definition Classes
- UIElement
- def size: Dimension
- Definition Classes
- UIElement
- def subscribe(listener: Reaction): Unit
- Definition Classes
- LazyPublisher → Publisher
- def toString(): String
- Definition Classes
- Component → Proxy → AnyRef → Any
- def toolkit: Toolkit
- Definition Classes
- UIElement
- def tooltip: String
- def tooltip_=(t: String): Unit
- def unsubscribe(listener: Reaction): Unit
- Definition Classes
- LazyPublisher → Publisher
- def validate(): Unit
- Definition Classes
- UIElement
- def visible: Boolean
- Definition Classes
- UIElement
- def visible_=(b: Boolean): Unit
- Definition Classes
- UIElement
- def xLayoutAlignment: Double
Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.
- def xLayoutAlignment_=(x: Double): Unit
- def yLayoutAlignment: Double
- def yLayoutAlignment_=(y: Double): Unit
- object keys extends Publisher
- object mouse
Contains publishers for various mouse events.
Contains publishers for various mouse events. They are separated for efficiency reasons.