Scala 2.7.2.final API

This document is the API specification for Scala 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
An abstract action to be performed in reaction to user input. 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
A container that arranges its children around a central component that takes most of the space. The other children are placed on one of four borders: north, east, south, west.
class BoxPanel (orientation : 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 Buffer[A]
Default partial implementation for buffer adapters.
class Button (text0 : java.lang.String) extends AbstractButton
A button that can be clicked, usually to perform 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 either be checked or unchecked.
class CheckMenuItem (title0 : java.lang.String) extends MenuItem
A menu item with a check box.
class ComboBox [A](items : Seq[A]) extends Component
Let's the user make a selection from a list of predefined items. Visually, this is implemented as a button-like component with a pull-down menu.
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 : Value) extends Panel with Wrapper
A panel that arranges 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
A text field with formatted input.
class Frame extends UIElement with RootPanel with Publisher
A window with decoration such as a title, border, and action buttons.
class GUIApplication extends AnyRef
class GridBagPanel extends Panel with LayoutContainer
A panel that arranges 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, icon0 : javax.swing.Icon, align : Value) extends Component
A label component that display either a text, an icon, or both.
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 a number of elements in a list. A list view does not support inline editing of items. If you need it, use a table view instead. 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. Shuts down the framework and quits the application when closed.
class Menu (title0 : java.lang.String) extends MenuItem with Wrapper
A menu. Contains menu items. Being a menu item itself, menus can be nested.
class MenuBar extends Wrapper
A menu bar. Each window can contain at most one. Contains a number of menus.
class MenuItem (title0 : java.lang.String) extends AbstractButton
A menu item that can be used in a menu.
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
A password field, that displays a replacement character for each character in the password.
class ProgressBar extends Component with Orientable
A bar indicating progress of some action. Can be in indeterminate mode, in which it indicates that the action is in progress (usually by some animation) but does not indicate the amount of work done or to be done.
trait Publisher extends Reactor
Notifies registered reactions when an event is published. Publishers are also reactors and listen to themselves per default as a convenience. In order to reduce memory leaks, reactions are weakly referenced by default, unless they implement Reactions.StronglyReferenced. That way, the lifetime of reactions are more easily bound to the registering object, which are reactors in common client code and hold strong references to their reactions. As a result, reactors can be garbage collected even though they still have reactions registered at some publisher, but not vice versa since reactors (strongly) reference publishers they are interested in.
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
A menu item with a radio button.
abstract class Reactions extends PartialFunction[Event, Unit]
Used by reactors to let clients register custom event reactions.
trait Reactor extends AnyRef
The counterpart to publishers. Listens to events from registered publishers.
abstract class RefBuffer [A <: AnyRef] extends 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 component, which will be put inside a canvas (the viewport) that can be scrolled.
trait Scrollable extends Component
A component that is specially suitable for being placed inside a ScrollPane.
class Separator (o : 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 specific sequential order.
abstract class SimpleGUIApplication extends GUIApplication
Extend this class for most simple UI applications. Clients need to implement the top method. Framework intialization is done by this class.
class Slider extends Component with Orientable
Lets users select a value from a given range. Visually, this is represented as a draggable knob on a horizontal or vertical bar. Fires a ValueChanged event whenever the slider's value changes and when the knob is released.
class SplitPane (o : Value, left : Component, right : Component) extends Component with Container with Orientable
A container with exactly two children. Arranges them side by side, either horizontally or vertically. Displays a draggable divider component between them that lets the user adjust the size ratio of the children.
class TabbedPane extends Component
Displays the contents of one of several pages at a time. For each page a tab is visible at all times. The user can click on one of these tabs to move the corresponding page to the front.
class Table extends Scrollable
Displays a matrix of items.
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 user interface. Usually used in tool bars.
trait UIElement extends Proxy
The base trait of all user interface elements. Subclasses belong to one of two groups: top-level elements such as windows and dialogs, or Components.
Object Summary
object Action extends AnyRef
object Alignment extends 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
Simple predefined dialogs.
object FileChooser extends AnyRef
object FlowPanel extends AnyRef
object FormattedTextField extends AnyRef
object GridBagPanel extends AnyRef
object GridPanel extends AnyRef
object Key extends Enumeration
object ListView extends AnyRef
object Orientation extends 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