trait LayoutContainer extends Wrapper
A container that associates layout constraints of member type
Constraints with its children.
See GridBagPanel for an example container with custom constraints.
- Note
[Java Swing] In scala.swing, panels and layout managers are combined into subclasses of this base class. This approach allows for typed component constraints.
- Alphabetic
- By Inheritance
- LayoutContainer
- Wrapper
- Container
- UIElement
- LazyPublisher
- Publisher
- Reactor
- Proxy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
Abstract Value Members
- abstract def add(comp: Component, c: Constraints): Unit
Adds a component with the given constraints to the underlying layout manager and the component peer.
Adds a component with the given constraints to the underlying layout manager and the component peer. This method needs to interact properly with method
constraintsFor, i.e., it might need to remove previously held components in order to maintain layout consistency. SeeBorderPanelfor an example.- Attributes
- protected
- abstract def areValid(c: Constraints): (Boolean, String)
Checks whether the given constraints are valid.
Checks whether the given constraints are valid. Additionally returns an error string that is only fetched if the constraints aren't valid.
- Attributes
- protected
- abstract def constraintsFor(c: Component): Constraints
Obtains the constraints for the given component from the underlying Swing layout manager.
Obtains the constraints for the given component from the underlying Swing layout manager.
- Attributes
- protected
- abstract def peer: JComponent
The underlying Swing peer.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _contents: Content
- Attributes
- protected
- Definition Classes
- Wrapper
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def background: Color
- Definition Classes
- UIElement
- def background_=(c: Color): Unit
- Definition Classes
- UIElement
- def bounds: Rectangle
- Definition Classes
- UIElement
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def componentOrientation: ComponentOrientation
- Definition Classes
- UIElement
- def componentOrientation_=(x: ComponentOrientation): Unit
- Definition Classes
- UIElement
- def contents: collection.Seq[Component]
The child components of this container.
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- Proxy → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- Proxy → Any
- def ignoreRepaint: Boolean
- Definition Classes
- UIElement
- def ignoreRepaint_=(b: Boolean): Unit
- Definition Classes
- UIElement
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def layout: Map[Component, Constraints]
A map of components to the associated layout constraints.
A map of components to the associated layout constraints. Any element in this map is automatically added to the contents of this panel. Therefore, specifying the layout of a component via
layout(myComponent) = myConstraints
also ensures that myComponent is properly added to this container.
- def listenTo(ps: Publisher*): Unit
Listen to the given publisher as long as
deafToisn't called for them.Listen to the given publisher as long as
deafToisn't called for them.- Definition Classes
- Reactor
- val listeners: RefSet[Reaction]
- Attributes
- protected
- Definition Classes
- Publisher
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onFirstSubscribe(): Unit
- Attributes
- protected
- Definition Classes
- UIElement → LazyPublisher
- def onLastUnsubscribe(): Unit
- Attributes
- protected
- Definition Classes
- UIElement → LazyPublisher
- 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 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Proxy → Any
- def toolkit: Toolkit
- Definition Classes
- UIElement
- 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
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()