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.

Source
LayoutContainer.scala
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
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
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
Implicitly
  1. by StringAdd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to StringAdd[LayoutContainer] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (LayoutContainer, B)

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to ArrowAssoc[LayoutContainer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. val _contents: Content

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

    Definition Classes
    Any
  10. def background: Color

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

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

    Definition Classes
    UIElement
  13. def clone(): AnyRef

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

    The child components of this container.

    The child components of this container.

    Definition Classes
    WrapperContainer
  15. def cursor: Cursor

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

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

    Definition Classes
    UIElement
  19. def ensuring(cond: (LayoutContainer) ⇒ Boolean, msg: ⇒ Any): LayoutContainer

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to Ensuring[LayoutContainer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (LayoutContainer) ⇒ Boolean): LayoutContainer

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to Ensuring[LayoutContainer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): LayoutContainer

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to Ensuring[LayoutContainer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): LayoutContainer

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to Ensuring[LayoutContainer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    UIElement
  28. def foreground: Color

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

    Definition Classes
    UIElement
  30. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to StringFormat[LayoutContainer] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  31. final def getClass(): Class[_]

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

    Definition Classes
    Proxy → Any
  33. def ignoreRepaint: Boolean

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

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

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

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

    Attributes
    protected
    Definition Classes
    Publisher
  39. def locale: Locale

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  49. def onFirstSubscribe(): Unit

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

    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  51. def preferredSize: java.awt.Dimension

    Definition Classes
    UIElement
  52. def preferredSize_=(x: Dimension): Unit

    Definition Classes
    UIElement
  53. def publish(e: Event): Unit

    Notify all registered reactions.

    Notify all registered reactions.

    Definition Classes
    Publisher
  54. val reactions: Reactions

    All reactions of this reactor.

    All reactions of this reactor.

    Definition Classes
    Reactor
  55. def repaint(rect: Rectangle): Unit

    Definition Classes
    UIElement
  56. def repaint(): Unit

    Definition Classes
    UIElement
  57. def self: java.awt.Component

    Definition Classes
    UIElementProxy
  58. def showing: Boolean

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

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

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

    Definition Classes
    AnyRef
  62. def toString(): String

    Definition Classes
    Proxy → Any
  63. def toolkit: Toolkit

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

    Definition Classes
    LazyPublisher → Publisher
  65. def visible: Boolean

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. def [B](y: B): (LayoutContainer, B)

    Implicit information
    This member is added by an implicit conversion from LayoutContainer to ArrowAssoc[LayoutContainer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Wrapper

Inherited from Container

Inherited from UIElement

Inherited from LazyPublisher

Inherited from Publisher

Inherited from Reactor

Inherited from Proxy

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from LayoutContainer to StringAdd[LayoutContainer]

Inherited by implicit conversion StringFormat from LayoutContainer to StringFormat[LayoutContainer]

Inherited by implicit conversion Ensuring from LayoutContainer to Ensuring[LayoutContainer]

Inherited by implicit conversion ArrowAssoc from LayoutContainer to ArrowAssoc[LayoutContainer]

Ungrouped