Scala 2.8.0.Beta1-RC1 API

This document is the API specification for Scala Library

Class Summary
abstract class AbstractButton extends Component with Trigger with Publisher
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.
trait Adjustable extends Oriented
abstract class Applet extends javax.swing.JApplet with AnyRef
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 with Publisher
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
Base class for all UI elements that can be displayed in a window. Components are publishers that fire the following event classes: ComponentEvent, FocusEvent, FontChanged, ForegroundChanged, BackgroundChanged.
trait Container extends UIElement
The base traits for UI elements that can contain Components.
class Dialog (owner : Window) extends RichWindow
A dialog window.
class EditorPane (contentType0 : java.lang.String, text0 : java.lang.String) extends TextComponent
A text component that allows multiline text input and display.
class FileChooser (dir : java.io.File) extends AnyRef
Used to open file dialogs.
class FlowPanel (alignment : Value, contents0 : Component*) 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 RichWindow
A window with decoration such as a title, border, and action buttons. An AWT window cannot be wrapped dynamically with this class, i.e., you cannot write something like new Window { def peer = myAWTWindow }
class GUIApplication extends AnyRef
Convenience class with utility methods for GUI applications.
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
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 Component with 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 Component with Wrapper
A component that can contain other components.
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 Wrapper
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
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]
sealed trait RichWindow extends Window
A window that adds some functionality to the plain Window class and serves as the common base class for frames and dialogs. Implementation note: this class is sealed since we need to know that a rich window is either a dialog or a frame at some point.
trait RootPanel extends Container with AnyRef
The root of a component hierarchy. Contains at most one component.
class ScrollBar extends Component with Wrapper with Wrapper
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 Wrapper
A bar that can be used a separator, most commonly in menus.
trait SequentialContainer extends Container
A container for which a sequential order of children makes sense, such as flow panels, or menus. Its contents are mutable.
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. In order to conform to Swing's threading policy, never implement top or any additional member that created Swing components as a value unless component creation happens on the EDT (see Swing.onEDT and Swing.onEDTWait). Lazy values are okay for the same reason if they are intialized on the EDT always.
abstract class SimpleSwingApplication extends SwingApplication
class Slider extends Component with Wrapper with Publisher
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 Wrapper
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.
trait SwingActor extends AnyRef
abstract class SwingApplication extends Reactor
abstract class SwingWorker extends Actor
class TabbedPane extends Component with Publisher
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 Wrapper
Displays a matrix of items. To obtain a scrollable table or row and columns headers, wrap the table in a scroll pane.
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 with Publisher
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 with scala.swing.LazyPublisher
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.
abstract class Window extends UIElement with RootPanel with Publisher
A window with decoration such as a title, border, and action buttons. An AWT window cannot be wrapped dynamically with this class, i.e., you cannot write something like new Window { def peer = myAWTWindow }
Object Summary
object Action extends AnyRef
object Adjustable 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 Button extends AnyRef
object ComboBox extends AnyRef
object Component extends AnyRef
Utility methods, mostly for wrapping components.
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 ListView extends AnyRef
object MenuBar extends AnyRef
object Orientable extends AnyRef
object Orientation extends Enumeration
object Oriented extends AnyRef
object Reactions extends AnyRef
object RichWindow extends AnyRef
object ScrollBar extends AnyRef
object ScrollPane extends AnyRef
object Scrollable extends AnyRef
object SequentialContainer extends AnyRef
object Swing extends AnyRef
Helpers for this package.
object SwingWorker extends AnyRef
object TabbedPane extends AnyRef
object Table extends AnyRef
object TextComponent extends AnyRef
object UIElement extends AnyRef
object package extends AnyRef