Class

cogdebugger.ui.fieldvisualizations.matrix

MatrixMemoryView

Related Doc: package matrix

Permalink

class MatrixMemoryView extends BorderPanel with EventDrivenViewer with ZoomProperty with RestorableState with ToolbarItems

A panel for graphically displaying a Matrix field. Each Matrix is displayed as a grayscale image of size rows x columns, with one entry in the image for each element in the matrix.

The mapping of matrix element value to grayscale value depends on the current state of the "Floating Max" toggle button in this viewer's toolbar. When toggled off (the default state), the smallest value ever recorded by the viewer (absMin) is rendered as black, the largest value ever recored (absMax) is white, and intermediate data values display as gray proportionate to where they lie between absMin and absMax. If the toggle is on, the ends of the scale are determined by the values of the current step only (stepMin and stepMax).

The display also shows the grayscale encoding to help interpret the view, which looks roughly like this for a sequence of three output elements, each with two inputs:


     +-+              +-+
     |*| = -3.62      | | = 3.62
     +-+              +-+


     +---------+   +---------+   +---------+
     |         |   |         |   |         |
     |  image  |   |  image  |   |  image  |
     |         |   |         |   |         |
     +---------+   +---------+   +---------+
     +---------+   +---------+   +---------+
     |         |   |         |   |         |
     |  image  |   |  image  |   |  image  |
     |         |   |         |   |         |
     +---------+   +---------+   +---------+

Linear Supertypes
ToolbarItems, RestorableState, ZoomProperty, Zoomable, EventDrivenViewer, ProbeListener, Viewer, BorderPanel, LayoutContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatrixMemoryView
  2. ToolbarItems
  3. RestorableState
  4. ZoomProperty
  5. Zoomable
  6. EventDrivenViewer
  7. ProbeListener
  8. Viewer
  9. BorderPanel
  10. LayoutContainer
  11. Panel
  12. Wrapper
  13. Container
  14. Component
  15. UIElement
  16. LazyPublisher
  17. Publisher
  18. Reactor
  19. Proxy
  20. AnyRef
  21. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MatrixMemoryView(target: AnyRef, fieldShape: libcog.Shape, tensorShape: libcog.Shape)

    Permalink

    target

    The MatrixField to be displayed

    fieldShape

    The shape of the matrixField

    tensorShape

    The shape of tensors within the field

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 MatrixLayerPanel extends GridBagPanel

    Permalink
  4. trait SuperMixin extends JComponent

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  5. class Worker extends SwingWorker[Unit, Unit]

    Permalink
    Definition Classes
    EventDrivenViewer

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 FloatingMaxProperty: BooleanProperty

    Permalink
  5. val InvertProperty: BooleanProperty

    Permalink
  6. val ZoomProperty: FloatProperty

    Permalink
    Definition Classes
    ZoomProperty
  7. val _contents: Content

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  8. var absMax: Float

    Permalink
    Attributes
    protected
  9. var absMin: Float

    Permalink
    Attributes
    protected
  10. def add(c: Component, l: Constraints): Unit

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

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

    Permalink
    Definition Classes
    Any
  13. def background: Color

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

    Permalink
    Definition Classes
    UIElement
  15. def border: Border

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

    Permalink
    Definition Classes
    Component
  17. def bounds: Rectangle

    Permalink
    Definition Classes
    UIElement
  18. var busy: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventDrivenViewer
  19. val centerPanel: WrapPanel

    Permalink
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. val columns: Int

    Permalink
  22. def constraintsFor(comp: Component): scala.swing.BorderPanel.Position.Value

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

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

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

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

    Permalink
    Definition Classes
    Reactor
  27. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  28. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  29. def enabled: Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  36. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  38. def forEachMatrixIn(field: libcog.MatrixFieldReader)(f: (libcog.Matrix) ⇒ Unit): Unit

    Permalink
    Attributes
    protected
  39. def foreground: Color

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  42. def getToolTipText(fieldLayer: Int, fieldRow: Int, fieldCol: Int, row: Int, col: Int): String

    Permalink
    Attributes
    protected
  43. def hasFocus: Boolean

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

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

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

    Permalink
    Definition Classes
    UIElement
  47. var initP: JComponent

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

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

    Permalink
    Definition Classes
    Component
  50. def isBusy: Boolean

    Permalink
    Definition Classes
    EventDrivenViewerProbeListener
  51. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  52. var lastData: libcog.MatrixFieldReader

    Permalink
    Attributes
    protected
  53. val layerPanels: Array[MatrixLayerPanel]

    Permalink
  54. val layers: Int

    Permalink
  55. def layout: Map[Component, Constraints]

    Permalink
    Definition Classes
    LayoutContainer
  56. def layoutManager: BorderLayout

    Permalink
    Definition Classes
    BorderPanel
  57. def listenTo(ps: Publisher*): Unit

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

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

    Permalink
    Definition Classes
    UIElement
  60. def location: Point

    Permalink
    Definition Classes
    UIElement
  61. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  62. val matrixCols: Int

    Permalink
  63. val matrixPanels: Array[DoubleBufferedImagePanel { ... /* 7 definitions in type refinement */ }]

    Permalink
  64. val matrixRows: Int

    Permalink
  65. def max: Float

    Permalink
    Attributes
    protected
  66. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  68. def min: Float

    Permalink
    Attributes
    protected
  69. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  71. object mouse

    Permalink
    Definition Classes
    Component
  72. def name: String

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

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

    Permalink
    Definition Classes
    AnyRef
  75. def notify(event: ProbeEvent): Unit

    Permalink
    Definition Classes
    EventDrivenViewerProbeListener
  76. final def notify(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    UIElement
  89. val properties: ArrayBuffer[Property[_]]

    Permalink

    A list of properties that should be persisted when the app closes, and restored the next time it's launched.

    A list of properties that should be persisted when the app closes, and restored the next time it's launched. A common example of a persistent is the zoom/magnification level of the viewer. Be sure to add any relevenant properties to this list in your Viewer subclasses!

    Definition Classes
    Viewer
  90. def propertiesTag: NodeSeq

    Permalink

    Returns the XML representation of this viewer's properties, suitable for saving into a file.

    Returns the XML representation of this viewer's properties, suitable for saving into a file.

    Definition Classes
    Viewer
  91. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  92. val reactions: Reactions

    Permalink
    Definition Classes
    Reactor
  93. def repaint(rect: Rectangle): Unit

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

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

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

    Permalink
    Definition Classes
    Component
  97. def reset(): Unit

    Permalink

    Reset the visualization.

    Reset the visualization. An optional operation; subclasses must override this method or else it does nothing.

    Definition Classes
    Viewer
  98. def restore(node: Node): Unit

    Permalink

    Restore this object to the state described in the given XML node.

    Restore this object to the state described in the given XML node.

    Definition Classes
    MatrixMemoryViewRestorableState
  99. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  100. val rows: Int

    Permalink
  101. def save: Elem

    Permalink

    Encode the state of this object into an XML node.

    Encode the state of this object into an XML node.

    Definition Classes
    MatrixMemoryViewRestorableState
  102. def scaleValue(f: Float): Float

    Permalink

    Maps a float value to a (grayscale) shade based on the current values of min and max.

    Maps a float value to a (grayscale) shade based on the current values of min and max. This respects the Invert image button which transposes black and white.

    Attributes
    protected
  103. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  105. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  106. var stepMax: Float

    Permalink
    Attributes
    protected
  107. var stepMin: Float

    Permalink
    Attributes
    protected
  108. def subscribe(listener: Reaction): Unit

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

    Permalink
    Definition Classes
    AnyRef
  110. def targets: Set[AnyRef]

    Permalink

    The (Cog4) fields this viewer is visualizing.

  111. val tmpMatrix: Matrix

    Permalink
  112. def toString(): String

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  113. def toolbarComponents: Seq[ComponentGroup]

    Permalink

    A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar).

    A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar). These components may be controls (buttons, combo boxes, spinners etc.) or small labels/displays (e.g. min/max, color key).

    Definition Classes
    MatrixMemoryViewToolbarItems
  114. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  115. def tooltip: String

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

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

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  118. def update(src: AnyRef, data: libcog.MatrixFieldReader): Unit

    Permalink

    Updates the visualization based on the contents of data.

  119. def update(src: AnyRef, data: libcog.AbstractFieldMemory, time: Long): Unit

    Permalink

    Updates the visualization based on the contents of data.

    Updates the visualization based on the contents of data.

    The src argument was orignally meant to reference the kernel/field/object that generated the data, in order to support composite visualizations (that is, viewers that produce a visual based on the data from several different sources), but launching such viewers in the current UI is clunky at beset, so this feature isn't used. Viewers that only visualize a single field's data can probably safely ignore this arument (and indeed, most of the current ones do).

    src

    The field or object that generated the data argument

    data

    New field data that needs to be rendered by this viewer

    Definition Classes
    MatrixMemoryViewViewer
  120. def visible: Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  127. def xmlToProperties(node: Node): Unit

    Permalink

    Parses the XML tag produced by the propertiesTag method and restores any saved valued to this Viewer.

    Parses the XML tag produced by the propertiesTag method and restores any saved valued to this Viewer.

    Definition Classes
    Viewer
  128. def yLayoutAlignment: Double

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

    Permalink
    Definition Classes
    Component
  130. def zoomIn(): Unit

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  131. val zoomIncrement: Float

    Permalink

    Default zoom increment.

    Default zoom increment.

    Definition Classes
    MatrixMemoryViewZoomProperty
  132. def zoomLevel: Float

    Permalink
    Definition Classes
    ZoomProperty
  133. def zoomLevel_=(value: Float): Unit

    Permalink
    Definition Classes
    ZoomProperty
  134. def zoomOut(): Unit

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  135. var zoomType: ZoomType

    Permalink

    Controls how zDelta is applied to the current zoom level.

    Controls how zDelta is applied to the current zoom level. In Additive, a delta is added to the current zoom level; in Multiplicative mode, the zoom level is multiplied by delta when zooming in, and by its reciprocal when zooming out.

    Default zoom type is additive. If you change it to multiplicative, you should probably ensure that the default zDelta is something other than 1f, as multiplying by one probably won't do anything.

    Definition Classes
    ZoomProperty

Inherited from ToolbarItems

Inherited from RestorableState

Inherited from ZoomProperty

Inherited from Zoomable

Inherited from EventDrivenViewer

Inherited from ProbeListener

Inherited from Viewer

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