scala.swing

Table

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.

Inherits

  1. Wrapper
  2. Scrollable
  3. Component
  4. UIElement
  5. LazyPublisher
  6. Publisher
  7. Reactor
  8. Proxy
  9. AnyRef
  10. Any

Value Members

  1. var Mouse: mouse

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

    Get the current value of the given cell

    Get 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.

  3. def autoResizeMode: Value

  4. def autoResizeMode_=(x: Value): Unit

  5. def background: Color

  6. def background_=(c: Color): Unit

  7. def blockIncrement(visibleRect: Rectangle, orientation: Value, direction: Int): Int

  8. def border: Border

  9. def border_=(b: Border): Unit

  10. def bounds: Rectangle

  11. def cursor: Cursor

  12. def cursor_=(c: Cursor): Unit

  13. 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
  14. def displayable: Boolean

  15. def enabled: Boolean

  16. def enabled_=(b: Boolean): Unit

  17. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  18. def focusable: Boolean

  19. def focusable_=(b: Boolean): Unit

  20. def font: Font

  21. def font_=(f: Font): Unit

  22. def foreground: Color

  23. def foreground_=(c: Color): Unit

  24. def gridColor: Color

  25. def gridColor_=(color: Color): Unit

  26. def hasFocus: Boolean

  27. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  28. def ignoreRepaint: Boolean

  29. def ignoreRepaint_=(b: Boolean): Unit

  30. var initP: JComponent

  31. def inputVerifier: (Table.this.type) ⇒ Boolean

  32. def inputVerifier_=(v: (Table.this.type) ⇒ Boolean): Unit

  33. object keys extends Publisher

  34. 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
  35. def locale: Locale

  36. def location: Point

  37. def locationOnScreen: Point

  38. def maximumSize: Dimension

  39. def maximumSize_=(x: Dimension): Unit

  40. def minimumSize: Dimension

  41. def minimumSize_=(x: Dimension): Unit

  42. def model: TableModel

  43. def modelToViewColumn(idx: Int): Int

  44. def model_=(x: TableModel): Unit

  45. object mouse extends AnyRef

    Contains publishers for various mouse events

  46. def onFirstSubscribe(): Unit

  47. def onLastUnsubscribe(): Unit

  48. def opaque: Boolean

  49. def opaque_=(b: Boolean): Unit

  50. def paint(g: Graphics2D): Unit

  51. var peer: JTable

    The underlying Swing peer

    The underlying Swing peer.

  52. def preferredSize: Dimension

  53. def preferredSize_=(xy: (Int, Int)): Unit

  54. def preferredSize_=(x: Dimension): Unit

  55. def preferredViewportSize: Dimension

  56. def preferredViewportSize_=(dim: Dimension): Unit

  57. def publish(e: Event): Unit

    Notify all registered reactions

    Notify all registered reactions.

    definition classes: Publisher
  58. val reactions: Reactions

    All reactions of this reactor

    All reactions of this reactor.

    definition classes: Reactor
  59. def repaint(rect: Rectangle): Unit

  60. def repaint(): Unit

  61. def requestFocus(): Unit

  62. def requestFocusInWindow(): Boolean

  63. def revalidate(): Unit

  64. def rowCount: Int

  65. def rowHeight: Int

  66. def rowHeight_=(x: Int): Unit

  67. object selection extends Publisher

  68. def selectionBackground: Color

  69. def selectionBackground_=(c: Color): Unit

  70. def selectionForeground: Color

  71. def selectionForeground_=(c: Color): Unit

  72. def self: Component

  73. def showGrid: Boolean

  74. def showGrid_=(grid: Boolean): Unit

  75. def showing: Boolean

  76. def size: Dimension

  77. def size_=(xy: (Int, Int)): Unit

  78. def size_=(dim: Dimension): Unit

  79. def subscribe(listener: PartialFunction[Event, Unit]): Unit

  80. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: ComponentProxy ⇐ AnyRef ⇐ Any
  81. def toolkit: Toolkit

  82. def tooltip: String

  83. def tooltip_=(t: String): Unit

  84. def tracksViewportHeight: Boolean

  85. def tracksViewportWidth: Boolean

  86. def unitIncrement(visibleRect: Rectangle, orientation: Value, direction: Int): Int

  87. def unsubscribe(listener: PartialFunction[Event, Unit]): Unit

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

    Change the value of the given cell

    Change the value of the given cell.

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

    Visually update the given cell

    Visually update the given cell.

  90. def viewToModelColumn(idx: Int): Int

  91. def visible: Boolean

  92. def visible_=(b: Boolean): Unit

  93. def xLayoutAlignment: Double

    Used by certain layout managers, e

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

    definition classes: Component
  94. def xLayoutAlignment_=(x: Double): Unit

  95. def yLayoutAlignment: Double

  96. def yLayoutAlignment_=(y: Double): Unit

Instance constructors

  1. new Table(rows: Int, columns: Int)

  2. new Table(rowData: Array[Array[Any]], columnNames: Seq[Any])

  3. new Table()