scala.swing

LayoutContainer

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.

Linear Supertypes
Wrapper, Container, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LayoutContainer
  2. Wrapper
  3. Container
  4. UIElement
  5. LazyPublisher
  6. Publisher
  7. Reactor
  8. Proxy
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Constraints <: AnyRef

    The type of component constraints for this container.

  2. class Content extends BufferWrapper[Component]

    Attributes
    protected
    Definition Classes
    Wrapper

Abstract Value Members

  1. 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. See BorderPanel for an example.

    Attributes
    protected
  2. 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
  3. 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
  4. abstract def peer: JComponent

    The underlying Swing peer.

    The underlying Swing peer.

    Definition Classes
    WrapperUIElement

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val _contents: Content

    Attributes
    protected
    Definition Classes
    Wrapper
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def background: Color

    Definition Classes
    UIElement
  7. def background_=(c: Color): Unit

    Definition Classes
    UIElement
  8. def bounds: java.awt.Rectangle

    Definition Classes
    UIElement
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def contents: Seq[Component]

    The child components of this container.

    The child components of this container.

    Definition Classes
    WrapperContainer
  11. def cursor: Cursor

    Definition Classes
    UIElement
  12. def cursor_=(c: Cursor): Unit

    Definition Classes
    UIElement
  13. 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
  14. def displayable: Boolean

    Definition Classes
    UIElement
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(that: Any): Boolean

    Definition Classes
    Proxy → Any
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def font: Font

    Definition Classes
    UIElement
  19. def font_=(f: Font): Unit

    Definition Classes
    UIElement
  20. def foreground: Color

    Definition Classes
    UIElement
  21. def foreground_=(c: Color): Unit

    Definition Classes
    UIElement
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    Proxy → Any
  24. def ignoreRepaint: Boolean

    Definition Classes
    UIElement
  25. def ignoreRepaint_=(b: Boolean): Unit

    Definition Classes
    UIElement
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. 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.

  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. val listeners: RefSet[Reaction] { val underlying: scala.collection.mutable.HashSet[scala.ref.Reference[scala.swing.Reactions.Reaction]] }

    Attributes
    protected
    Definition Classes
    Publisher
  30. def locale: Locale

    Definition Classes
    UIElement
  31. def location: java.awt.Point

    Definition Classes
    UIElement
  32. def locationOnScreen: java.awt.Point

    Definition Classes
    UIElement
  33. def maximumSize: java.awt.Dimension

    Definition Classes
    UIElement
  34. def maximumSize_=(x: Dimension): Unit

    Definition Classes
    UIElement
  35. def minimumSize: java.awt.Dimension

    Definition Classes
    UIElement
  36. def minimumSize_=(x: Dimension): Unit

    Definition Classes
    UIElement
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  40. def onFirstSubscribe(): Unit

    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  41. def onLastUnsubscribe(): Unit

    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  42. def preferredSize: java.awt.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 self: java.awt.Component

    Definition Classes
    UIElement → Proxy
  49. def showing: Boolean

    Definition Classes
    UIElement
  50. def size: java.awt.Dimension

    Definition Classes
    UIElement
  51. def subscribe(listener: Reaction): Unit

    Definition Classes
    LazyPublisher → Publisher
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  53. def toString(): String

    Definition Classes
    Proxy → Any
  54. def toolkit: Toolkit

    Definition Classes
    UIElement
  55. def unsubscribe(listener: Reaction): Unit

    Definition Classes
    LazyPublisher → Publisher
  56. def visible: Boolean

    Definition Classes
    UIElement
  57. def visible_=(b: Boolean): Unit

    Definition Classes
    UIElement
  58. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )