Packages

class Tree[A] extends Component with CellView[A] with EditableCells[A] with RenderableCells[A] with Wrapper

Wrapper for a JTree. The tree model is represented by a lazy child expansion function that may or may not terminate in leaf nodes.

The tree publishes structural events, such as nodes being added or removed, on its main publisher, whereas selection changes are published to the dedicated Tree#selection object.

Self Type
Tree[A]
See also

javax.swing.JTree

Linear Supertypes
Wrapper, Scrollable, RenderableCells[A], EditableCells[A], CellView[A], Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tree
  2. Wrapper
  3. Scrollable
  4. RenderableCells
  5. EditableCells
  6. CellView
  7. Component
  8. UIElement
  9. LazyPublisher
  10. Publisher
  11. Reactor
  12. Proxy
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Tree()(implicit arg0: ClassTag[A])
  2. new Tree(treeDataModel: TreeModel[A])(implicit arg0: ClassTag[A])

Type Members

  1. trait CellSelection extends Publisher

    Provides common functionality for the selection object found in CellView implementation.

    Provides common functionality for the selection object found in CellView implementation. Each will have one or more selection sets based on different types of cell coordinate, such as row, column, index or tree path. All events published from selection objects will derive from scala.swing.event.SelectionEvent.

    Definition Classes
    CellView
  2. trait SuperMixin extends JComponent
    Attributes
    protected
    Definition Classes
    Component

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def background: Color
    Definition Classes
    UIElement
  6. def background_=(c: Color): Unit
    Definition Classes
    UIElement
  7. def blockIncrement(visibleRect: Rectangle, orientation: scala.swing.Orientation.Value, direction: Int): Int
    Definition Classes
    Wrapper → Scrollable
  8. def border: Border
    Definition Classes
    Component
  9. def border_=(b: Border): Unit
    Definition Classes
    Component
  10. def bounds: Rectangle
    Definition Classes
    UIElement
  11. def cancelEditing(): Unit
  12. def cellValues: Iterator[A]
    Definition Classes
    TreeCellView
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def collapseAll(): Unit

    Collapses all visible rows.

  15. def collapsePath(path: Path[A]): Unit
  16. def collapseRow(row: Int): Unit
  17. val companion: Tree.type
    Definition Classes
    TreeRenderableCellsEditableCells
  18. def componentOrientation: ComponentOrientation
    Definition Classes
    UIElement
  19. def componentOrientation_=(x: ComponentOrientation): Unit
    Definition Classes
    UIElement
  20. def cursor: Cursor
    Definition Classes
    UIElement
  21. def cursor_=(c: Cursor): Unit
    Definition Classes
    UIElement
  22. def deafTo(ps: Publisher*): Unit
    Definition Classes
    Reactor
  23. def displayable: Boolean
    Definition Classes
    UIElement
  24. def dragEnabled: Boolean
  25. def dragEnabled_=(b: Boolean): Unit
  26. def editable: Boolean
    Definition Classes
    TreeCellView
  27. def editable_=(b: Boolean): Unit
  28. def editingPath: Option[Path[A]]
  29. def editor: Tree.Editor[A]
    Definition Classes
    TreeEditableCells
  30. def editor_=(r: Tree.Editor[A]): Unit
    Definition Classes
    TreeEditableCells
  31. def enabled: Boolean
    Definition Classes
    Component
  32. def enabled_=(b: Boolean): Unit
    Definition Classes
    Component
  33. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. def equals(that: Any): Boolean
    Definition Classes
    Proxy → Any
  35. def expandAll(): Unit

    Expands every row.

    Expands every row. Will not terminate if the tree is of infinite depth.

  36. def expandPath(path: Path[A]): Unit
  37. def expandRow(row: Int): Unit
  38. def expandsSelectedPaths: Boolean
  39. def expandsSelectedPaths_=(b: Boolean): Unit
  40. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  41. def focusable: Boolean
    Definition Classes
    Component
  42. def focusable_=(b: Boolean): Unit
    Definition Classes
    Component
  43. def font: Font
    Definition Classes
    UIElement
  44. def font_=(f: Font): Unit
    Definition Classes
    UIElement
  45. def foreground: Color
    Definition Classes
    UIElement
  46. def foreground_=(c: Color): Unit
    Definition Classes
    UIElement
  47. implicit def genericEditor[B]: Tree.Editor[B] { ... /* 2 definitions in type refinement */ }

    Implicit method to produce a generic editor.

    Implicit method to produce a generic editor. This lives in the Tree class rather than the companion object because it requires an actual javax.swing.JTree instance to be initialised.

  48. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  49. def getClosestPathForLocation(x: Int, y: Int): Option[Path[A]]
  50. def getClosestRowForLocation(x: Int, y: Int): Int
  51. def getRowForLocation(x: Int, y: Int): Int
  52. def getRowForPath(path: Path[A]): Int
  53. def hasFocus: Boolean
    Definition Classes
    Component
  54. def hashCode(): Int
    Definition Classes
    Proxy → Any
  55. def ignoreRepaint: Boolean
    Definition Classes
    UIElement
  56. def ignoreRepaint_=(b: Boolean): Unit
    Definition Classes
    UIElement
  57. def inputVerifier: (Component) => Boolean
    Definition Classes
    Component
  58. def inputVerifier_=(v: (Component) => Boolean): Unit
    Definition Classes
    Component
  59. def isCollapsed(path: Path[A]): Boolean
  60. def isEditing: Boolean
  61. def isExpanded(path: Path[A]): Boolean
  62. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  63. def isVisible(path: Path[A]): Boolean
  64. def largeModel: Boolean
  65. def lineStyle: Tree.LineStyle.Value
  66. def lineStyle_=(style: Tree.LineStyle.Value): Unit
  67. def listenTo(ps: Publisher*): Unit
    Definition Classes
    Reactor
  68. val listeners: RefSet[Reaction]
    Attributes
    protected
    Definition Classes
    Publisher
  69. def locale: Locale
    Definition Classes
    UIElement
  70. def location: Point
    Definition Classes
    UIElement
  71. def locationOnScreen: Point
    Definition Classes
    UIElement
  72. def makeVisible(path: Path[A]): Unit
  73. def maximumSize: Dimension
    Definition Classes
    UIElement
  74. def maximumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  75. def minimumSize: Dimension
    Definition Classes
    UIElement
  76. def minimumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  77. def model: TreeModel[A]
  78. val modelListener: TreeModelListener
    Attributes
    protected
  79. def model_=(tm: TreeModel[A]): Unit
  80. def name: String
    Definition Classes
    Component
  81. def name_=(s: String): Unit
    Definition Classes
    Component
  82. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  83. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  84. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  85. def onFirstSubscribe(): Unit
    Attributes
    protected
    Definition Classes
    Component → UIElement → LazyPublisher
  86. def onLastUnsubscribe(): Unit
    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  87. def opaque: Boolean
    Definition Classes
    Component
  88. def opaque_=(b: Boolean): Unit
    Definition Classes
    Component
  89. def paint(g: Graphics2D): Unit
    Definition Classes
    Component
  90. def paintBorder(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  91. def paintChildren(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  92. def paintComponent(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  93. implicit def pathToTreePath(p: Path[A]): TreePath

    Implicitly converts Tree.Path[A] lists to TreePath objects understood by the underlying peer JTree.

    Implicitly converts Tree.Path[A] lists to TreePath objects understood by the underlying peer JTree. In addition to the objects in the list, the JTree's hidden root node must be prepended.

  94. lazy val peer: JTree
    Definition Classes
    Tree → Component → UIElement
  95. def preferredSize: Dimension
    Definition Classes
    UIElement
  96. def preferredSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  97. def preferredViewportSize: Dimension
    Definition Classes
    Wrapper → Scrollable
  98. def publish(e: Event): Unit
    Definition Classes
    Publisher
  99. val reactions: Reactions
    Definition Classes
    Reactor
  100. def renderer: Tree.Renderer[A]
    Definition Classes
    TreeRenderableCells
  101. def renderer_=(r: Tree.Renderer[A]): Unit
    Definition Classes
    TreeRenderableCells
  102. def repaint(rect: Rectangle): Unit
    Definition Classes
    UIElement
  103. def repaint(): Unit
    Definition Classes
    UIElement
  104. def requestFocus(): Unit
    Definition Classes
    Component
  105. def requestFocusInWindow(): Boolean
    Definition Classes
    Component
  106. def revalidate(): Unit
    Definition Classes
    Component
  107. def rowCount: Int
  108. def rowHeight: Int
  109. def scrollablePeer: JTree
    Attributes
    protected
    Definition Classes
    Tree → Wrapper
  110. def scrollableTracksViewportHeight: Boolean
  111. def selectInterval(first: Int, last: Int): Unit
  112. def selectPaths(paths: Path[A]*): Unit
  113. def selectRows(rows: Int*): Unit
  114. def self: Any
    Definition Classes
    UIElement → Proxy
  115. def showing: Boolean
    Definition Classes
    UIElement
  116. def showsRootHandles: Boolean
  117. def showsRootHandles_=(b: Boolean): Unit
  118. def size: Dimension
    Definition Classes
    UIElement
  119. def startEditingAtPath(path: Path[A]): Unit
  120. def stopEditing(): Boolean
  121. def subscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  122. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  123. def toString(): String
    Definition Classes
    Component → Proxy → AnyRef → Any
  124. def toolkit: Toolkit
    Definition Classes
    UIElement
  125. def tooltip: String
    Definition Classes
    Component
  126. def tooltip_=(t: String): Unit
    Definition Classes
    Component
  127. def tracksViewportHeight: Boolean
    Definition Classes
    Wrapper → Scrollable
  128. def tracksViewportWidth: Boolean
    Definition Classes
    Wrapper → Scrollable
  129. implicit def treePathToPath(tp: TreePath): Path[A]

    Implicitly converts javax.swing.tree.TreePath objects to Tree.Path[A] lists recognised in Scala Swing.

    Implicitly converts javax.swing.tree.TreePath objects to Tree.Path[A] lists recognised in Scala Swing. TreePaths will include the underlying JTree's hidden root node, which is omitted for Tree.Paths.

  130. def unitIncrement(visibleRect: Rectangle, orientation: scala.swing.Orientation.Value, direction: Int): Int
    Definition Classes
    Wrapper → Scrollable
  131. def unsubscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  132. def validate(): Unit
    Definition Classes
    UIElement
  133. def visible: Boolean
    Definition Classes
    UIElement
  134. def visibleRowCount: Int
  135. def visibleRowCount_=(rows: Int): Unit
  136. def visible_=(b: Boolean): Unit
    Definition Classes
    UIElement
  137. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  138. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  139. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  140. def xLayoutAlignment: Double
    Definition Classes
    Component
  141. def xLayoutAlignment_=(x: Double): Unit
    Definition Classes
    Component
  142. def yLayoutAlignment: Double
    Definition Classes
    Component
  143. def yLayoutAlignment_=(y: Double): Unit
    Definition Classes
    Component
  144. object selection extends CellSelection

    Selection model for Tree.

    Selection model for Tree.

    To observe tree selections, make the reactor listen to this publishing object which will then dispatch instances of scalaswingcontrib.event.TreePathSelected.

    Definition Classes
    TreeCellView

Inherited from Wrapper

Inherited from Scrollable

Inherited from RenderableCells[A]

Inherited from EditableCells[A]

Inherited from CellView[A]

Inherited from Component

Inherited from UIElement

Inherited from LazyPublisher

Inherited from Publisher

Inherited from Reactor

Inherited from Proxy

Inherited from AnyRef

Inherited from Any

Ungrouped