Scala Library
|
|
scala/swing/LayoutContainer.scala
]
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.
Type Summary | |
abstract type
|
Constraints
<: AnyRef
The type of component constraints for this container.
|
Values and Variables inherited from Wrapper | |
_contents |
Values and Variables inherited from Publisher | |
listeners |
Values and Variables inherited from Reactor | |
reactions |
Method Summary | |
protected abstract def
|
add
(comp : Component, c : Constraints) : Unit
Adds a component with the given constraints to the underlying layout
manager and the component peer.
|
protected abstract def
|
areValid
(c : Constraints) : (Boolean, java.lang.String)
Checks whether the given constraints are valid. Additionally returns
an error string that is only fetched if the constraints aren't valid.
|
protected abstract def
|
constraintsFor
(c : Component) : Constraints
Obtains the constraints for the given component from the underlying
Swing layout manager.
|
def
|
layout
: Map[Component, 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 add to this container.
|
Methods inherited from Wrapper | |
peer (abstract), contents |
Methods inherited from UIElement | |
self, foreground, foreground_=, background, background_=, minimumSize, minimumSize_=, maximumSize, maximumSize_=, preferredSize, preferredSize_=, preferredSize_=, font, font_=, locationOnScreen, location, bounds, size, size_=, size_=, locale, toolkit, cursor, cursor_=, visible, visible_=, showing, displayable, repaint, repaint, ignoreRepaint, ignoreRepaint_=, onFirstSubscribe, onLastUnsubscribe |
Methods inherited from scala.swing.LazyPublisher | |
scala.swing.LazyPublisher.subscribe, scala.swing.LazyPublisher.unsubscribe |
Methods inherited from Publisher | |
publish |
Methods inherited from Reactor | |
listenTo, deafTo |
Methods inherited from Proxy | |
hashCode, equals, toString |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Type Details |
Method Details |
protected abstract
def
constraintsFor(c : Component) : Constraints
protected abstract
def
areValid(c : Constraints) : (Boolean, java.lang.String)
protected abstract
def
add(comp : Component, c : Constraints) : Unit
def
layout : Map[Component, Constraints]
Scala Library
|
|