scala.swing

class Component

[source: scala/swing/Component.scala]

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.
Notes
[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
Direct Known Subclasses:
AbstractButton, ComboBox, Label, ListView, MenuBar, Panel, ProgressBar, ScrollBar, ScrollPane, Scrollable.Wrapper, Scrollable, Separator, Slider, SplitPane, TabbedPane, Table, TextComponent

Value Summary
lazy val Mouse : mouse
var initP : javax.swing.JComponent
override lazy val peer : javax.swing.JComponent
The underlying Swing peer.
Values and Variables inherited from Publisher
listeners
Values and Variables inherited from Reactor
reactions
Method Summary
def border : javax.swing.border.Border
def border_= (b : javax.swing.border.Border) : Unit
def enabled : Boolean
def enabled_= (b : Boolean) : Unit
def focusable : Boolean
def focusable_= (b : Boolean) : Unit
def hasFocus : Boolean
def inputVerifier : (Component) => Boolean
def inputVerifier_= (v : (Component) => Boolean) : Unit
override def onFirstSubscribe : Unit
def opaque : Boolean
def opaque_= (b : Boolean) : Unit
def paint (g : java.awt.Graphics2D) : Unit
protected def paintBorder (g : java.awt.Graphics2D) : Unit
protected def paintChildren (g : java.awt.Graphics2D) : Unit
protected def paintComponent (g : java.awt.Graphics2D) : Unit
For custom painting, users should usually override this method.
def requestFocus : Unit
def requestFocusInWindow : Boolean
def revalidate : Unit
override def toString : java.lang.String
Returns a string representation of the object.
def tooltip : java.lang.String
def tooltip_= (t : java.lang.String) : Unit
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
Methods inherited from UIElement
self, foreground, foreground_=, background, background_=, minimumSize, minimumSize_=, maximumSize, maximumSize_=, preferredSize, preferredSize_=, preferredSize_=, font, font_=, locationOnScreen, location, bounds, size, size_=, size_=, locale, toolkit, cursor, cursor_=, visible, visible_=, showing, displayable, repaint, repaint, ignoreRepaint, ignoreRepaint_=, onLastUnsubscribe
Methods inherited from scala.swing.LazyPublisher
scala.swing.LazyPublisher.subscribe, scala.swing.LazyPublisher.unsubscribe
Methods inherited from Publisher
publish
Methods inherited from Reactor
listenTo, deafTo
Methods inherited from Proxy
hashCode, equals
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Class Summary
protected trait SuperMixin extends javax.swing.JComponent with AnyRef
This trait is used to redirect certain calls from the peer to the wrapper and back. Useful to expose methods that can be customized by overriding.
Object Summary
object keys extends Publisher
object mouse extends AnyRef
Contains publishers for various mouse events. They are separated for efficiency reasons.
Value Details
override lazy val peer : javax.swing.JComponent
The underlying Swing peer.
Overrides
UIElement.peer

var initP : javax.swing.JComponent

lazy val Mouse : mouse

Method Details
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

def border : javax.swing.border.Border

def border_=(b : javax.swing.border.Border) : Unit

def opaque : Boolean

def opaque_=(b : Boolean) : Unit

def enabled : Boolean

def enabled_=(b : Boolean) : Unit

def tooltip : java.lang.String

def tooltip_=(t : java.lang.String) : Unit

def inputVerifier : (Component) => Boolean

def inputVerifier_=(v : (Component) => Boolean) : Unit

def focusable : Boolean

def focusable_=(b : Boolean) : Unit

def requestFocus : Unit

def requestFocusInWindow : Boolean

def hasFocus : Boolean

override def onFirstSubscribe : Unit
Overrides
UIElement.onFirstSubscribe

def revalidate : Unit

protected def paintComponent(g : java.awt.Graphics2D) : Unit
For custom painting, users should usually override this method.

protected def paintBorder(g : java.awt.Graphics2D) : Unit

protected def paintChildren(g : java.awt.Graphics2D) : Unit

def paint(g : java.awt.Graphics2D) : Unit

override def toString : java.lang.String
Returns a string representation of the object.

The default representation is platform dependent.

Returns
a string representation of the object.