Table

class Table extends Component with Wrapper

Displays a matrix of items.

Displays a matrix of items.

To obtain a scrollable table or row and columns headers, wrap the table in a scroll pane.

See also

javax.swing.JTable

Companion
object
trait Wrapper
class Component
trait PeerContainer
trait UIElement
trait LazyPublisher
trait Publisher
trait Reactor
trait Proxy
class Object
trait Matchable
class Any

Type members

Classlikes

object selection extends Publisher

Inherited classlikes

object keys
Inherited from
Component
object mouse

Contains publishers for various mouse events. They are separated for efficiency reasons.

Contains publishers for various mouse events. They are separated for efficiency reasons.

Inherited from
Component

Value members

Constructors

def this(rowData: Array[Array[Any]], columnNames: Seq[_])

Constructs a table component with static cell contents. The contents is editable.

Constructs a table component with static cell contents. The contents is editable.

Value Params
columnNames

objects that represent the column names. The names are derived by calling toString on the elements. The size of this sequence must correspond with the inner dimension of rowData.

rowData

the table contents, where the first dimension indexes rows, and the second dimension indexes columns.

def this(rows: Int, columns: Int)

Constructs a table component with a DefaultTableModel of the given dimensions.

Constructs a table component with a DefaultTableModel of the given dimensions.

def this(model0: TableModel)

Constructs a table component with a given model.

Constructs a table component with a given model.

Concrete methods

def apply(row: Int, column: Int): Any

Gets the current value of the given cell. The given cell coordinates are in view coordinates and thus not necessarily the same as for the model.

Gets the current value of the given cell. The given cell coordinates are in view coordinates and thus not necessarily the same as for the model.

If you have model coordinates, use model.getValueAt instead.

def autoCreateRowSorter: Boolean
def autoCreateRowSorter_=(value: Boolean): Unit
def autoResizeMode_=(x: Value): Unit
def gridColor_=(color: Color): Unit
def model: TableModel
def modelToViewColumn(idx: Int): Int
def modelToViewRow(idx: Int): Int
def model_=(x: TableModel): Unit
def rowCount: Int
def rowHeight: Int
def rowHeight_=(x: Int): Unit
def rowMargin: Int
def rowMargin_=(value: Int): Unit
def showGrid: Boolean
def showGrid_=(grid: Boolean): Unit
def sort(column: Int, ascending: Boolean): Unit

Programmatically sets the sorted column of the table view.

Programmatically sets the sorted column of the table view.

def update(row: Int, column: Int, value: Any): Unit

Changes the value of the given cell. The given cell coordinates are in view coordinates and thus not necessarily the same as for the model.

Changes the value of the given cell. The given cell coordinates are in view coordinates and thus not necessarily the same as for the model.

If you have model coordinates, use model.setValueAt instead.

def updateCell(row: Int, column: Int): Unit

Visually updates the given cell.

Visually updates the given cell.

def updateSelectionOnSort: Boolean
def updateSelectionOnSort_=(value: Boolean): Unit
def viewToModelColumn(idx: Int): Int
def viewToModelRow(idx: Int): Int

Inherited methods

Inherited from
UIElement
def background_=(c: Color): Unit
Inherited from
UIElement
def blockIncrement(visibleRect: Rectangle, orientation: Value, direction: Int): Int
Inherited from
Wrapper
def border: Border
Inherited from
Component
def border_=(b: Border): Unit
Inherited from
Component
Inherited from
UIElement
def componentOrientation: ComponentOrientation
Inherited from
UIElement
def componentOrientation_=(x: ComponentOrientation): Unit
Inherited from
UIElement
def cursor: Cursor
Inherited from
UIElement
def cursor_=(c: Cursor): Unit
Inherited from
UIElement
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.

Inherited from
Reactor
def displayable: Boolean
Inherited from
UIElement
def enabled: Boolean
Inherited from
Component
def enabled_=(b: Boolean): Unit
Inherited from
Component
override def equals(that: Any): Boolean
Definition Classes
Proxy -> Any
Inherited from
Proxy
def focusable: Boolean
Inherited from
Component
def focusable_=(b: Boolean): Unit
Inherited from
Component
def font: Font
Inherited from
UIElement
def font_=(f: Font): Unit
Inherited from
UIElement
Inherited from
UIElement
def foreground_=(c: Color): Unit
Inherited from
UIElement
def hasFocus: Boolean
Inherited from
Component
override def hashCode(): Int
Definition Classes
Proxy -> Any
Inherited from
Proxy
def ignoreRepaint: Boolean
Inherited from
UIElement
def ignoreRepaint_=(b: Boolean): Unit
Inherited from
UIElement
def inputVerifier: Component => Boolean
Inherited from
Component
def inputVerifier_=(v: Component => Boolean): Unit
Inherited from
Component
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.

Inherited from
Reactor
def locale: Locale
Inherited from
UIElement
Inherited from
UIElement
Inherited from
UIElement
Inherited from
UIElement
def maximumSize_=(x: Dimension): Unit
Inherited from
UIElement
Inherited from
UIElement
def minimumSize_=(x: Dimension): Unit
Inherited from
UIElement
def name: String
Inherited from
Component
def name_=(s: String): Unit
Inherited from
Component
def opaque: Boolean
Inherited from
Component
def opaque_=(b: Boolean): Unit
Inherited from
Component
def paint(g: Graphics2D): Unit
Inherited from
Component
Inherited from
UIElement
def preferredSize_=(x: Dimension): Unit
Inherited from
UIElement
def publish(e: Event): Unit

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def repaint(rect: Rectangle): Unit
Inherited from
UIElement
def repaint(): Unit
Inherited from
UIElement
def requestFocus(): Unit
Inherited from
Component
def requestFocusInWindow(): Boolean
Inherited from
Component
def revalidate(): Unit
Inherited from
Component
def self: Any
Inherited from
UIElement
def showing: Boolean
Inherited from
UIElement
Inherited from
UIElement
override def subscribe(listener: Reaction): Unit
Definition Classes
LazyPublisher -> Publisher
Inherited from
LazyPublisher
override def toString: String
Definition Classes
Component -> Proxy -> Any
Inherited from
Component
def toolkit: Toolkit
Inherited from
UIElement
def tooltip: String
Inherited from
Component
def tooltip_=(t: String): Unit
Inherited from
Component
def tracksViewportHeight: Boolean
Inherited from
Wrapper
def tracksViewportWidth: Boolean
Inherited from
Wrapper
def unitIncrement(visibleRect: Rectangle, orientation: Value, direction: Int): Int
Inherited from
Wrapper
override def unsubscribe(listener: Reaction): Unit
Definition Classes
LazyPublisher -> Publisher
Inherited from
LazyPublisher
def validate(): Unit
Inherited from
UIElement
def visible: Boolean
Inherited from
UIElement
def visible_=(b: Boolean): Unit
Inherited from
UIElement
def xLayoutAlignment: Double

Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.

Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.

Inherited from
Component
def xLayoutAlignment_=(x: Double): Unit
Inherited from
Component
def yLayoutAlignment: Double
Inherited from
Component
def yLayoutAlignment_=(y: Double): Unit
Inherited from
Component

Concrete fields

lazy override val peer: JTable

Inherited fields

protected val listeners: RefSet[Reaction]
Inherited from
Publisher

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor