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 componentOrientation: ComponentOrientation

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

    Definition Classes
    UIElement
  12. def contents: Seq[Component]

    The child components of this container.

    The child components of this container.

    Definition Classes
    WrapperContainer
  13. def cursor: Cursor

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

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

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

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

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

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

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

    Definition Classes
    UIElement
  22. def foreground: Color

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

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

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

    Definition Classes
    Proxy → Any
  26. def ignoreRepaint: Boolean

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

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

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

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

    Attributes
    protected
    Definition Classes
    Publisher
  32. def locale: Locale

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  42. def onFirstSubscribe(): Unit

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

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

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

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

    Notify all registered reactions.

    Notify all registered reactions.

    Definition Classes
    Publisher
  47. val reactions: Reactions

    All reactions of this reactor.

    All reactions of this reactor.

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

    Definition Classes
    UIElement
  49. def repaint(): Unit

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

    Definition Classes
    UIElement → Proxy
  51. def showing: Boolean

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

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

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

    Definition Classes
    AnyRef
  55. def toString(): String

    Definition Classes
    Proxy → Any
  56. def toolkit: Toolkit

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

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

    Definition Classes
    UIElement
  59. def visible: Boolean

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. 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