Class/Object

scalaswingcontrib.tree

Tree

Related Docs: object Tree | package tree

Permalink

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

Instance Constructors

  1. new Tree(treeDataModel: TreeModel[A] = TreeModel.empty[A])

    Permalink

Type Members

  1. trait CellSelection extends Publisher

    Permalink

    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

    Permalink
    Attributes
    protected
    Definition Classes
    Component

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def background: Color

    Permalink
    Definition Classes
    UIElement
  6. def background_=(c: Color): Unit

    Permalink
    Definition Classes
    UIElement
  7. def blockIncrement(visibleRect: Rectangle, orientation: scala.swing.Orientation.Value, direction: Int): Int

    Permalink
    Definition Classes
    Wrapper → Scrollable
  8. def border: Border

    Permalink
    Definition Classes
    Component
  9. def border_=(b: Border): Unit

    Permalink
    Definition Classes
    Component
  10. def bounds: Rectangle

    Permalink
    Definition Classes
    UIElement
  11. def cancelEditing(): Unit

    Permalink
  12. def cellValues: Iterator[A]

    Permalink
    Definition Classes
    TreeCellView
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def collapseAll(): Unit

    Permalink

    Collapses all visible rows.

  15. def collapsePath(path: Path[A]): Unit

    Permalink
  16. def collapseRow(row: Int): Unit

    Permalink
  17. val companion: Tree.type

    Permalink
    Definition Classes
    TreeRenderableCellsEditableCells
  18. def componentOrientation: ComponentOrientation

    Permalink
    Definition Classes
    UIElement
  19. def componentOrientation_=(x: ComponentOrientation): Unit

    Permalink
    Definition Classes
    UIElement
  20. def cursor: Cursor

    Permalink
    Definition Classes
    UIElement
  21. def cursor_=(c: Cursor): Unit

    Permalink
    Definition Classes
    UIElement
  22. def deafTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  23. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  24. def dragEnabled: Boolean

    Permalink
  25. def dragEnabled_=(b: Boolean): Unit

    Permalink
  26. def editable: Boolean

    Permalink
    Definition Classes
    TreeCellView
  27. def editable_=(b: Boolean): Unit

    Permalink
  28. def editingPath: Option[Path[A]]

    Permalink
  29. def editor: Tree.Editor[A]

    Permalink
    Definition Classes
    TreeEditableCells
  30. def editor_=(r: Tree.Editor[A]): Unit

    Permalink
    Definition Classes
    TreeEditableCells
  31. def enabled: Boolean

    Permalink
    Definition Classes
    Component
  32. def enabled_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  33. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Proxy → Any
  35. def expandAll(): Unit

    Permalink

    Expands every row.

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

  36. def expandPath(path: Path[A]): Unit

    Permalink
  37. def expandRow(row: Int): Unit

    Permalink
  38. def expandsSelectedPaths: Boolean

    Permalink
  39. def expandsSelectedPaths_=(b: Boolean): Unit

    Permalink
  40. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  41. def focusable: Boolean

    Permalink
    Definition Classes
    Component
  42. def focusable_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  43. def font: Font

    Permalink
    Definition Classes
    UIElement
  44. def font_=(f: Font): Unit

    Permalink
    Definition Classes
    UIElement
  45. def foreground: Color

    Permalink
    Definition Classes
    UIElement
  46. def foreground_=(c: Color): Unit

    Permalink
    Definition Classes
    UIElement
  47. implicit def genericEditor[B]: Tree.Editor[B] { ... /* 2 definitions in type refinement */ }

    Permalink

    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[_]

    Permalink
    Definition Classes
    AnyRef → Any
  49. def getClosestPathForLocation(x: Int, y: Int): Option[Path[A]]

    Permalink
  50. def getClosestRowForLocation(x: Int, y: Int): Int

    Permalink
  51. def getRowForLocation(x: Int, y: Int): Int

    Permalink
  52. def getRowForPath(path: Path[A]): Int

    Permalink
  53. def hasFocus: Boolean

    Permalink
    Definition Classes
    Component
  54. def hashCode(): Int

    Permalink
    Definition Classes
    Proxy → Any
  55. def ignoreRepaint: Boolean

    Permalink
    Definition Classes
    UIElement
  56. def ignoreRepaint_=(b: Boolean): Unit

    Permalink
    Definition Classes
    UIElement
  57. var initP: JComponent

    Permalink
    Definition Classes
    Component
  58. def inputVerifier: (Component) ⇒ Boolean

    Permalink
    Definition Classes
    Component
  59. def inputVerifier_=(v: (Component) ⇒ Boolean): Unit

    Permalink
    Definition Classes
    Component
  60. def isCollapsed(path: Path[A]): Boolean

    Permalink
  61. def isEditing: Boolean

    Permalink
  62. def isExpanded(path: Path[A]): Boolean

    Permalink
  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. def isVisible(path: Path[A]): Boolean

    Permalink
  65. def largeModel: Boolean

    Permalink
  66. def lineStyle: Tree.LineStyle.Value

    Permalink
  67. def lineStyle_=(style: Tree.LineStyle.Value): Unit

    Permalink
  68. def listenTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  69. val listeners: RefSet[Reaction] { val underlying: scala.collection.mutable.HashSet[scala.ref.Reference[scala.swing.Reactions.Reaction]] }

    Permalink
    Attributes
    protected
    Definition Classes
    Publisher
  70. def locale: Locale

    Permalink
    Definition Classes
    UIElement
  71. def location: Point

    Permalink
    Definition Classes
    UIElement
  72. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  73. def makeVisible(path: Path[A]): Unit

    Permalink
  74. def maximumSize: Dimension

    Permalink
    Definition Classes
    UIElement
  75. def maximumSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  76. def minimumSize: Dimension

    Permalink
    Definition Classes
    UIElement
  77. def minimumSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  78. def model: TreeModel[A]

    Permalink
  79. val modelListener: TreeModelListener

    Permalink
    Attributes
    protected
  80. def model_=(tm: TreeModel[A]): Unit

    Permalink
  81. def name: String

    Permalink
    Definition Classes
    Component
  82. def name_=(s: String): Unit

    Permalink
    Definition Classes
    Component
  83. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  84. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  85. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  86. def onFirstSubscribe(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component → UIElement → LazyPublisher
  87. def onLastUnsubscribe(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  88. def opaque: Boolean

    Permalink
    Definition Classes
    Component
  89. def opaque_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  90. def paint(g: Graphics2D): Unit

    Permalink
    Definition Classes
    Component
  91. def paintBorder(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  92. def paintChildren(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  93. def paintComponent(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  94. implicit def pathToTreePath(p: Path[A]): TreePath

    Permalink

    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.

  95. lazy val peer: JTree

    Permalink
    Definition Classes
    Tree → Component → UIElement
  96. def preferredSize: Dimension

    Permalink
    Definition Classes
    UIElement
  97. def preferredSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  98. def preferredViewportSize: Dimension

    Permalink
    Definition Classes
    Wrapper → Scrollable
  99. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  100. val reactions: Reactions

    Permalink
    Definition Classes
    Reactor
  101. def renderer: Tree.Renderer[A]

    Permalink
    Definition Classes
    TreeRenderableCells
  102. def renderer_=(r: Tree.Renderer[A]): Unit

    Permalink
    Definition Classes
    TreeRenderableCells
  103. def repaint(rect: Rectangle): Unit

    Permalink
    Definition Classes
    UIElement
  104. def repaint(): Unit

    Permalink
    Definition Classes
    UIElement
  105. def requestFocus(): Unit

    Permalink
    Definition Classes
    Component
  106. def requestFocusInWindow(): Boolean

    Permalink
    Definition Classes
    Component
  107. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  108. def rowCount: Int

    Permalink
  109. def rowHeight: Int

    Permalink
  110. def scrollablePeer: JTree

    Permalink
    Attributes
    protected
    Definition Classes
    Tree → Wrapper
  111. def scrollableTracksViewportHeight: Boolean

    Permalink
  112. def selectInterval(first: Int, last: Int): Unit

    Permalink
  113. def selectPaths(paths: Path[A]*): Unit

    Permalink
  114. def selectRows(rows: Int*): Unit

    Permalink
  115. object selection extends CellSelection

    Permalink

    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
  116. def self: Component

    Permalink
    Definition Classes
    UIElement → Proxy
  117. def showing: Boolean

    Permalink
    Definition Classes
    UIElement
  118. def showsRootHandles: Boolean

    Permalink
  119. def showsRootHandles_=(b: Boolean): Unit

    Permalink
  120. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  121. def startEditingAtPath(path: Path[A]): Unit

    Permalink
  122. def stopEditing(): Boolean

    Permalink
  123. def subscribe(listener: Reaction): Unit

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  124. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  125. def toString(): String

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  126. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  127. def tooltip: String

    Permalink
    Definition Classes
    Component
  128. def tooltip_=(t: String): Unit

    Permalink
    Definition Classes
    Component
  129. def tracksViewportHeight: Boolean

    Permalink
    Definition Classes
    Wrapper → Scrollable
  130. def tracksViewportWidth: Boolean

    Permalink
    Definition Classes
    Wrapper → Scrollable
  131. implicit def treePathToPath(tp: TreePath): Path[A]

    Permalink

    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.

  132. def unitIncrement(visibleRect: Rectangle, orientation: scala.swing.Orientation.Value, direction: Int): Int

    Permalink
    Definition Classes
    Wrapper → Scrollable
  133. def unsubscribe(listener: Reaction): Unit

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  134. def validate(): Unit

    Permalink
    Definition Classes
    UIElement
  135. def visible: Boolean

    Permalink
    Definition Classes
    UIElement
  136. def visibleRowCount: Int

    Permalink
  137. def visibleRowCount_=(rows: Int): Unit

    Permalink
  138. def visible_=(b: Boolean): Unit

    Permalink
    Definition Classes
    UIElement
  139. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  140. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  141. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  142. def xLayoutAlignment: Double

    Permalink
    Definition Classes
    Component
  143. def xLayoutAlignment_=(x: Double): Unit

    Permalink
    Definition Classes
    Component
  144. def yLayoutAlignment: Double

    Permalink
    Definition Classes
    Component
  145. def yLayoutAlignment_=(y: Double): Unit

    Permalink
    Definition Classes
    Component

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