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: AnyRef): Boolean

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

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

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

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

    Definition Classes
    Any
  6. val _contents: Content

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

    Definition Classes
    Any
  8. def background: Color

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

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

    Definition Classes
    UIElement
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def componentOrientation: ComponentOrientation

    Definition Classes
    UIElement
  13. def componentOrientation_=(x: ComponentOrientation): Unit

    Definition Classes
    UIElement
  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. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    UIElement
  24. def foreground: Color

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

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

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

    Definition Classes
    Proxy → Any
  28. def ignoreRepaint: Boolean

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

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

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

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

    Attributes
    protected
    Definition Classes
    Publisher
  34. def locale: Locale

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  44. def onFirstSubscribe(): Unit

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

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

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

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

    Notify all registered reactions.

    Notify all registered reactions.

    Definition Classes
    Publisher
  49. val reactions: Reactions

    All reactions of this reactor.

    All reactions of this reactor.

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

    Definition Classes
    UIElement
  51. def repaint(): Unit

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

    Definition Classes
    UIElement → Proxy
  53. def showing: Boolean

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

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

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

    Definition Classes
    AnyRef
  57. def toString(): String

    Definition Classes
    Proxy → Any
  58. def toolkit: Toolkit

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

    Definition Classes
    LazyPublisher → Publisher
  60. def validate(): Unit

    Definition Classes
    UIElement
  61. def visible: Boolean

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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

Ungrouped