Class/Object

cogdebugger.ui.structure

GraphViewer

Related Docs: object GraphViewer | package structure

Permalink

class GraphViewer extends BorderPanel

Presents a graphical representation of the structure of a Cog ComputeGraph, i.e. a display of its fields and their inputs and outputs.

Each (probed) field in the compute graph is represented as a single vertex in a directed graph. Each field is then connected to its inputs and outputs via directed edges. Forward edges in the graph are rendered in one color, while recurrence or "backward" edges are rendered in another.

Clicking a field vertex or edge raises an cogdebugger.ui.structure.InteractiveGraphEvent that other debugger components (such as cogdebugger.ui.Desktop) may react to.

The graph viewer operates in one of two modes: the default simple mode simply shows everything at once - each vertex represents a (probed) field, every input/ouput it has is represented by an incoming/outgoing edge. The second mode, referred to as the Drill-Down view, tries to compact the visual presentation by taking advantage of any module structure defined in the input Compute Graph.

The module hierarchy of a cmpute graph is implied from the organization of its fields and other classes. Essentially, each class instance that contains fields is considered a module, including the top-level compute graph instance itself (for many of the short example apps, this top-level module is the only module). The name of a module is not based on the class name, but rather the val/var name to which it is first bound. Consider the following pseudo-code:

class ModuleExample extends ComputeGraph {
  class ModuleA() {
    val aField = ScalarField(...)
  }
  val modA = new ModuleA()
  probeAll
}

The above code defines a ScalarField aField within a ModuleA instance modA, which is itself within a ComputeGraph instance. Keep in mind that modules and fieldsa are named after the val/var to which they are bound. The long name of a field includes its path in the app's module structure. The full name of the singular field in the above compute graph is 'modA.aField'.

In the Drill-Down view, only a single module is "in focus" at a time. The children of that module (fields and other modules) are displayed as well as inputs and outputs to the module. Clicking a field raises an event as in the simple graph viewer, but clicking a module makes that module the new focus and redraws the display. A toolbar at the top of the display allows for focusing the parent of the current module or jumping back to the top level.

Linear Supertypes
BorderPanel, LayoutContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GraphViewer
  2. BorderPanel
  3. LayoutContainer
  4. Panel
  5. Wrapper
  6. Container
  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 GraphViewer(computeGraph: libcog.ComputeGraph)

    Permalink

    computeGraph

    The compute graph being debugged.

Type Members

  1. type Constraints = scala.swing.BorderPanel.Position.Value

    Permalink
    Definition Classes
    BorderPanel → LayoutContainer
  2. class Content extends BufferWrapper[Component]

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  3. class GraphViewerToolBar extends ToolBar

    Permalink

    Implements the toolbar for cogdebugger.ui.structure.GraphViewer.

    Implements the toolbar for cogdebugger.ui.structure.GraphViewer. Includes buttons for chossing between a horizontal or vertical layout, and for switching between the simple graph view or the Drill-Down view.

  4. 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. val _contents: Content

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  5. def add(c: Component, l: Constraints): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BorderPanel → LayoutContainer
  6. def areValid(c: Constraints): (Boolean, String)

    Permalink
    Attributes
    protected
    Definition Classes
    BorderPanel → LayoutContainer
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def background: Color

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

    Permalink
    Definition Classes
    UIElement
  10. def border: Border

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

    Permalink
    Definition Classes
    Component
  12. def bounds: Rectangle

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def constraintsFor(comp: Component): scala.swing.BorderPanel.Position.Value

    Permalink
    Attributes
    protected
    Definition Classes
    BorderPanel → LayoutContainer
  15. def contents: Seq[Component]

    Permalink
    Definition Classes
    Wrapper → Container
  16. def cursor: Cursor

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

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

    Permalink
    Definition Classes
    Reactor
  19. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  20. def doAction(value: AnyRef, leftClick: Boolean = true): Unit

    Permalink

    Take action in response to the user clicking something in our displayed graph.

    Take action in response to the user clicking something in our displayed graph.

    value

    The object associated with the clicked graph element (a vertex or edge)

    leftClick

    True if the user left-clicked the graph, false otherwise

    Attributes
    protected
  21. lazy val drilldown: DrillDownGraphViewer

    Permalink
  22. def edgeLeftClick(value: AnyRef): Unit

    Permalink
  23. def edgeRightClick(value: AnyRef): Unit

    Permalink
  24. def enabled: Boolean

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

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

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

    Permalink
    Definition Classes
    Proxy → Any
  28. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    Component
  31. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  33. def foreground: Color

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

    Permalink
    Definition Classes
    UIElement
  35. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  36. val graph: Graph

    Permalink
  37. val graphPanel: GraphPanel

    Permalink
  38. def hasFocus: Boolean

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

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

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

    Permalink
    Definition Classes
    UIElement
  42. var initP: JComponent

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

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

    Permalink
    Definition Classes
    Component
  45. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  46. def layout: Map[Component, Constraints]

    Permalink
    Definition Classes
    LayoutContainer
  47. def layoutManager: BorderLayout

    Permalink
    Definition Classes
    BorderPanel
  48. def leftClick(cell: mxCell, value: AnyRef): Unit

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

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

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

    Permalink
    Definition Classes
    UIElement
  52. def location: Point

    Permalink
    Definition Classes
    UIElement
  53. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  54. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  56. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  58. object mouse

    Permalink
    Definition Classes
    Component
  59. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  72. lazy val peer: JPanel with SuperMixin

    Permalink
    Definition Classes
    BorderPanel → Panel → Wrapper → Component → UIElement
  73. def preferredSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  75. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  76. val reactions: Reactions

    Permalink
    Definition Classes
    Reactor
  77. def relayout(orientation: Int): Unit

    Permalink

    Re-execute the layout algorithm on the currently displayed graph view.

    Re-execute the layout algorithm on the currently displayed graph view. This method has no effect if the graph's current layout engine is not an com.mxgraph.layout.hierarchical.mxHierarchicalLayout.

    Attributes
    protected
  78. def repaint(rect: Rectangle): Unit

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

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

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

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

    Permalink
    Definition Classes
    Component
  83. def rightClick(value: AnyRef): Unit

    Permalink
  84. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  86. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  87. def subscribe(listener: Reaction): Unit

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

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

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  90. val toolbar: GraphViewerToolBar

    Permalink
  91. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  92. def tooltip: String

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

    Permalink
    Definition Classes
    Component
  94. def unsubscribe(listener: Reaction): Unit

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  95. def visible: Boolean

    Permalink
    Definition Classes
    UIElement
  96. def visible_=(b: Boolean): Unit

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  100. val wrappedGraphPanel: Component

    Permalink
  101. def xLayoutAlignment: Double

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

    Permalink
    Definition Classes
    Component
  103. def yLayoutAlignment: Double

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

    Permalink
    Definition Classes
    Component

Inherited from BorderPanel

Inherited from LayoutContainer

Inherited from Panel

Inherited from Wrapper

Inherited from Container

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