Scala Swing 2.7.2.RC1 API

This document is the API specification for Scala Swing Library

Class Summary
abstract class AbstractButton extends Component with Trigger
Base class of all button-like widgets, such as push buttons, check boxes, and radio buttons.
abstract class Action (title0 : java.lang.String) extends AnyRef
Not every action component will honor every property of its action. An action itself can generally be configured so that certain properties should be ignored and instead taken from the component directly. In the end, it is up to a component, which property it uses in which way.
abstract class Applet extends javax.swing.JApplet with AnyRef
Clients should implement the ui field. See the SimpleApplet demo for an example. Note: Applet extends javax.swing.JApplet to satisfy Java's applet loading mechanism. The usual component wrapping scheme doesn't work here.
class BorderPanel extends Panel with LayoutContainer
class BoxPanel (orientation : scala.Enumeration.Value) extends Panel with Wrapper
A panel that lays out its contents one after the other, either horizontally or vertically.
protected[swing] abstract class BufferWrapper [A] extends scala.collection.mutable.Buffer[A]
Default partial implementation for buffer adapters.
class Button (text0 : java.lang.String) extends AbstractButton
A button that can be pushed, usually to perfrom some action.
class ButtonGroup (initialButtons : AbstractButton*) extends AnyRef
A button mutex. At most one of its associated buttons is selected at a time.
class CheckBox (text : java.lang.String) extends ToggleButton
Two state button that can be either be checked or not.
class CheckMenuItem (title0 : java.lang.String) extends MenuItem
class ComboBox [A](items : scala.Seq[A]) extends Component
Has built-in default editor and renderer that cannot be exposed. They are set by the look and feel (LaF). Unfortunately, this design in inherently broken, since custom editors will almost always look differently. The border of the built-in text field editor, e.g., is drawn by the LaF. In a custom text field editor we have no way to mirror that. This combo box has to be initialized with a valid selected value. Otherwise it will fail.
abstract class Component extends UIElement with Publisher
Base class for all UI elements that can be displayed in a window.
trait Container extends UIElement
A UI element that can contain Components, such as windows, panels, and menus.
class FileChooser (dir : java.io.File) extends AnyRef
Used to open file dialogs.
class FlowPanel (alignment : scala.Enumeration.Value) extends Panel with Wrapper
A panel that lays out its contents horizontally, one after the other. If they don't fit, this panel will try to insert line breaks.
class FormattedTextField (format : java.text.Format) extends TextComponent
class Frame extends UIElement with RootPanel with Publisher
A decorated window.
class GUIApplication extends AnyRef
class GridBagPanel extends Panel with LayoutContainer
A panel that lays out its children in a grid. Layout details can be given for each cell of the grid.
class GridPanel (rows0 : Int, cols0 : Int) extends Panel with Wrapper
A panel that lays out its contents in a uniform grid.
class Label (text0 : java.lang.String) extends Component
A label component.
trait LayoutContainer extends Wrapper
A container that associates layout constraints with its children. See GridBagPanel for an example.
class ListView [A] extends Component
A component that displays its elements in a list. Named ListView to avoid a clash with the frequently used scala.List
class MainFrame extends Frame
A frame that can be used for main application windows. Quits the application on close.
class Menu (title0 : java.lang.String) extends MenuItem with Wrapper
class MenuBar extends Wrapper
class MenuItem (title0 : java.lang.String) extends AbstractButton
trait Orientable extends Oriented
An Oriented whose orientation can be changed.
trait Oriented extends AnyRef
Something that can have an orientation.
abstract class Panel extends Wrapper
A component that can contain other components, such as layout panels.
class PasswordField (text0 : java.lang.String, columns0 : Int) extends TextField
class ProgressBar extends Component with Orientable
trait Publisher extends Reactor
Notifies subscribed observers when a event is published.
class RadioButton (text0 : java.lang.String) extends ToggleButton
A two state button that is usually used in a ButtonGroup together with other RadioButtons, in order to indicate that at most one of them can be selected.
class RadioMenuItem (title0 : java.lang.String) extends MenuItem
abstract class Reactions extends scala.PartialFunction[Event, Unit]
trait Reactor extends AnyRef
abstract class RefBuffer [A <: AnyRef] extends scala.collection.mutable.Buffer[A] with scala.swing.SingleRefCollection[A]
trait RootPanel extends Container with AnyRef
The root of a component hierarchy. Contains at most one component.
class ScrollPane extends Component with Container
Can have at most a single child that is put inside a canvas that can be scrolled.
trait Scrollable extends Component
A component that specially suitable for being placed inside a ScrollPane.
class Separator (o : scala.Enumeration.Value) extends Component with Oriented
A bar that can be used a separator, most commonly in menus.
trait SequentialContainer extends Container
A container that contains children in a certain order.
abstract class SimpleGUIApplication extends GUIApplication
class Slider extends Component with Orientable
Fires a ValueChanged event whenever the slider's value changes and when the knob is released.
class SplitPane (o : scala.Enumeration.Value, left : Component, right : Component) extends Component with Container with Orientable
class TabbedPane extends Component
class Table extends Scrollable
class TextArea (text0 : java.lang.String, rows0 : Int, columns0 : Int) extends HasColumns with HasRows
A text component that allows multiline text input and display.
class TextComponent extends Component
A component that allows some kind of text input and display.
class TextField (text0 : java.lang.String, columns0 : Int) extends HasColumns
A text component that allows single line text input and display.
class ToggleButton (text0 : java.lang.String) extends AbstractButton
A two state button with a push button like UI. Usually used in tool bars.
trait UIElement extends scala.Proxy
The base trait of all user interface elements.
Object Summary
object Action extends AnyRef
object Alignment extends scala.Enumeration
Horizontal and vertical alignments. We sacrifice a bit of type-safety for simplicity here.
object BorderPanel extends AnyRef
object ComboBox extends AnyRef
object Component extends AnyRef
object Container extends AnyRef
object Dialog extends AnyRef
object FileChooser extends AnyRef
object FlowPanel extends AnyRef
object GridBagPanel extends AnyRef
object GridPanel extends AnyRef
object Key extends scala.Enumeration
object ListView extends AnyRef
object Orientation extends scala.Enumeration
object Reactions extends AnyRef
object SequentialContainer extends AnyRef
object Swing extends AnyRef
Helpers for this package.
object TabbedPane extends AnyRef
object Table extends AnyRef
object TextComponent extends AnyRef