class Table extends Component with Wrapper
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
- Alphabetic
- By Inheritance
- Table
- Wrapper
- Scrollable
- Component
- UIElement
- LazyPublisher
- Publisher
- Reactor
- Proxy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Table(model0: TableModel)
Constructs a table component with a given model.
- new Table(rows: Int, columns: Int)
Constructs a table component with a
DefaultTableModel
of the given dimensions. - new Table(rowData: Array[Array[Any]], columnNames: collection.Seq[_])
Constructs a table component with static cell contents.
Constructs a table component with static cell contents. The contents is editable.
- rowData
the table contents, where the first dimension indexes rows, and the second dimension indexes columns.
- 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 ofrowData
.
- new Table()
Type Members
- trait SuperMixin extends JComponent
This trait is used to redirect certain calls from the peer to the wrapper and back.
This trait is used to redirect certain calls from the peer to the wrapper and back. Useful to expose methods that can be customized by overriding.
- Attributes
- protected
- Definition Classes
- Component
Value Members
- object keys extends Publisher
- Definition Classes
- Component
- object mouse
Contains publishers for various mouse events.
Contains publishers for various mouse events. They are separated for efficiency reasons.
- Definition Classes
- Component
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(row: Int, column: Int): Any
Gets the current value of the given cell.
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. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def autoCreateRowSorter: Boolean
- def autoCreateRowSorter_=(value: Boolean): Unit
- def autoResizeMode: Table.AutoResizeMode.Value
- def autoResizeMode_=(x: Table.AutoResizeMode.Value): Unit
- def background: Color
- Definition Classes
- UIElement
- def background_=(c: Color): Unit
- Definition Classes
- UIElement
- def blockIncrement(visibleRect: Rectangle, orientation: Orientation.Value, direction: Int): Int
- Definition Classes
- Wrapper → Scrollable
- def border: Border
- Definition Classes
- Component
- def border_=(b: Border): Unit
- Definition Classes
- Component
- def bounds: Rectangle
- Definition Classes
- UIElement
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def componentOrientation: ComponentOrientation
- Definition Classes
- UIElement
- def componentOrientation_=(x: ComponentOrientation): Unit
- Definition Classes
- UIElement
- def cursor: Cursor
- Definition Classes
- UIElement
- def cursor_=(c: Cursor): Unit
- Definition Classes
- 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.
- Definition Classes
- Reactor
- def displayable: Boolean
- Definition Classes
- UIElement
- def editor(row: Int, column: Int): TableCellEditor
- Attributes
- protected
- def enabled: Boolean
- Definition Classes
- Component
- def enabled_=(b: Boolean): Unit
- Definition Classes
- Component
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- Proxy → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def focusable: Boolean
- Definition Classes
- Component
- def focusable_=(b: Boolean): Unit
- Definition Classes
- Component
- def font: Font
- Definition Classes
- UIElement
- def font_=(f: Font): Unit
- Definition Classes
- UIElement
- def foreground: Color
- Definition Classes
- UIElement
- def foreground_=(c: Color): Unit
- Definition Classes
- UIElement
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def gridColor: Color
- def gridColor_=(color: Color): Unit
- def hasFocus: Boolean
- Definition Classes
- Component
- def hashCode(): Int
- Definition Classes
- Proxy → Any
- def ignoreRepaint: Boolean
- Definition Classes
- UIElement
- def ignoreRepaint_=(b: Boolean): Unit
- Definition Classes
- UIElement
- def inputVerifier: (Component) => Boolean
- Definition Classes
- Component
- def inputVerifier_=(v: (Component) => Boolean): Unit
- Definition Classes
- Component
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.- Definition Classes
- Reactor
- val listeners: RefSet[Reaction]
- Attributes
- protected
- Definition Classes
- Publisher
- def locale: Locale
- Definition Classes
- UIElement
- def location: Point
- Definition Classes
- UIElement
- def locationOnScreen: Point
- Definition Classes
- UIElement
- def maximumSize: Dimension
- Definition Classes
- UIElement
- def maximumSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def minimumSize: Dimension
- Definition Classes
- UIElement
- def minimumSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def model: TableModel
- val modelListener: TableModelListener
- Attributes
- protected
- def modelToViewColumn(idx: Int): Int
- def modelToViewRow(idx: Int): Int
- def model_=(x: TableModel): Unit
- def name: String
- Definition Classes
- Component
- def name_=(s: String): Unit
- Definition Classes
- Component
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onFirstSubscribe(): Unit
- def onLastUnsubscribe(): Unit
- Attributes
- protected
- Definition Classes
- UIElement → LazyPublisher
- def opaque: Boolean
- Definition Classes
- Component
- def opaque_=(b: Boolean): Unit
- Definition Classes
- Component
- def paint(g: Graphics2D): Unit
- Definition Classes
- Component
- def paintBorder(g: Graphics2D): Unit
- Attributes
- protected
- Definition Classes
- Component
- def paintChildren(g: Graphics2D): Unit
- Attributes
- protected
- Definition Classes
- Component
- def paintComponent(g: Graphics2D): Unit
For custom painting, users should usually override this method.
For custom painting, users should usually override this method.
- Attributes
- protected
- Definition Classes
- Component
- lazy val peer: JTable
The underlying Swing peer.
- def preferredSize: Dimension
- Definition Classes
- UIElement
- def preferredSize_=(x: Dimension): Unit
- Definition Classes
- UIElement
- def preferredViewportSize: Dimension
- Definition Classes
- Wrapper → Scrollable
- def preferredViewportSize_=(dim: Dimension): Unit
- def publish(e: Event): Unit
Notify all registered reactions.
Notify all registered reactions.
- Definition Classes
- Publisher
- val reactions: Reactions
All reactions of this reactor.
All reactions of this reactor.
- Definition Classes
- Reactor
- def rendererComponent(isSelected: Boolean, focused: Boolean, row: Int, column: Int): Component
Supplies a renderer component for a given cell.
Supplies a renderer component for a given cell.
- Attributes
- protected
- def repaint(rect: Rectangle): Unit
- Definition Classes
- UIElement
- def repaint(): Unit
- Definition Classes
- UIElement
- def requestFocus(): Unit
- Definition Classes
- Component
- def requestFocusInWindow(): Boolean
- Definition Classes
- Component
- def revalidate(): Unit
- Definition Classes
- Component
- def rowCount: Int
- def rowHeight: Int
- def rowHeight_=(x: Int): Unit
- def rowMargin: Int
- def rowMargin_=(value: Int): Unit
- def scrollablePeer: JTable
- def selectionBackground: Color
- def selectionBackground_=(c: Color): Unit
- def selectionForeground: Color
- def selectionForeground_=(c: Color): Unit
- def self: Any
- Definition Classes
- UIElement → Proxy
- def showGrid: Boolean
- def showGrid_=(grid: Boolean): Unit
- def showing: Boolean
- Definition Classes
- UIElement
- def size: Dimension
- Definition Classes
- UIElement
- def sort(column: Int, ascending: Boolean = true): Unit
Programmatically sets the sorted column of the table view.
- def subscribe(listener: Reaction): Unit
- Definition Classes
- LazyPublisher → Publisher
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Component → Proxy → AnyRef → Any
- def toolkit: Toolkit
- Definition Classes
- UIElement
- def tooltip: String
- Definition Classes
- Component
- def tooltip_=(t: String): Unit
- Definition Classes
- Component
- def tracksViewportHeight: Boolean
- Definition Classes
- Wrapper → Scrollable
- def tracksViewportWidth: Boolean
- Definition Classes
- Wrapper → Scrollable
- def unitIncrement(visibleRect: Rectangle, orientation: Orientation.Value, direction: Int): Int
- Definition Classes
- Wrapper → Scrollable
- def unsubscribe(listener: Reaction): Unit
- Definition Classes
- LazyPublisher → Publisher
- def update(row: Int, column: Int, value: Any): Unit
Changes the value of the given cell.
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.
- def updateSelectionOnSort: Boolean
- def updateSelectionOnSort_=(value: Boolean): Unit
- def validate(): Unit
- Definition Classes
- UIElement
- def viewToModelColumn(idx: Int): Int
- def viewToModelRow(idx: Int): Int
- def visible: Boolean
- Definition Classes
- UIElement
- def visible_=(b: Boolean): Unit
- Definition Classes
- UIElement
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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.
- Definition Classes
- Component
- def xLayoutAlignment_=(x: Double): Unit
- Definition Classes
- Component
- def yLayoutAlignment: Double
- Definition Classes
- Component
- def yLayoutAlignment_=(y: Double): Unit
- Definition Classes
- Component
- object selection extends Publisher