Class

cogdebugger.ui.fieldvisualizations.scalar

ScalarMemoryView

Related Doc: package scalar

Permalink

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

A panel for graphically displaying a Scalar field. Each layer in the field is displayed as a separate grayscale image with dimensions columns x rows, with each element in a layer represented by a single pixel.

The mapping from a value to a grayscale shade depends on the minimum and maximum values in the whole field (and not just the layer). By default, black represents a minimum and white a maximum, with a linear gradient representing values in-between. Toggling the 'Invert' property to true will reverse this gradient such that white represetns a minimum and black a maximum.

The minimum and maximum used for shading purposes are by default 'cumulative,' that is, they are the smallest and largest values seen in the field across all updates since the last reset. This behavior can be changed by toggling the 'Floating Max' property to true, which causes shading to be based on the minimum and maxmimum values present in the field only at the latest update, ignoring all previous updates.

All put together, it looks something like this for a three-dimensional scalar field with 6 layers:

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


     +---------+   +---------+   +---------+
     |         |   |         |   |         |
     | layer 0 |   | layer 1 |   | layer 2 |
     |         |   |         |   |         |
     +---------+   +---------+   +---------+
     +---------+   +---------+   +---------+
     |         |   |         |   |         |
     | layer 3 |   | layer 4 |   | layer 5 |
     |         |   |         |   |         |
     +---------+   +---------+   +---------+

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. ScalarMemoryView
  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 ScalarMemoryView(target: ProbedField)

    Permalink
  2. new ScalarMemoryView(fieldType: libcog.FieldType)

    Permalink

    fieldType

    The shape of the fields being visualized.

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. trait SuperMixin extends JComponent

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  4. 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

    Determines the value of min and max when shading.

    Determines the value of min and max when shading. When set to false (the default setting) min and max consider all values in the field since this view was reset. When set to true, min and max consider only the data in the latest update.

  5. val InvertProperty: BooleanProperty

    Permalink

    Determines the color mapping from values in the field to grayscale shades.

    Determines the color mapping from values in the field to grayscale shades. When set to false (the default), black represents a minimum and white a maximum. When true, white represents a minimum and black a maximum.

  6. object MinMax extends Publisher

    Permalink
  7. val ZoomProperty: FloatProperty

    Permalink
    Definition Classes
    ZoomProperty
  8. val _contents: Content

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

    Permalink
  10. var absMin: Float

    Permalink
  11. def add(c: Component, l: Constraints): Unit

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

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

    Permalink
    Definition Classes
    Any
  14. def background: Color

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

    Permalink
    Definition Classes
    UIElement
  16. def border: Border

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

    Permalink
    Definition Classes
    Component
  18. def bounds: Rectangle

    Permalink
    Definition Classes
    UIElement
  19. def buildImage(layer: Int): DoubleBufferedImagePanel { lazy val peer: javax.swing.JPanel with this.SuperMixin }

    Permalink

    Build an image into which to render a specific layer of a scalar field.

    Build an image into which to render a specific layer of a scalar field. Supplying the correct layer index is important for tooltips to work correctly.

    Attributes
    protected
  20. var busy: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventDrivenViewer
  21. def clone(): AnyRef

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

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

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

    Permalink
    Definition Classes
    Wrapper → Container
  25. val controlGroupIdx: Int

    Permalink

    Index of the ComponentGroup that contains the user controls, as returned by the toolbarComponents method.

  26. def cursor: Cursor

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

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

    Permalink
    Definition Classes
    Reactor
  29. val dimensions: Int

    Permalink
  30. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  31. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  32. def enabled: Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  39. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  41. def foreground: Color

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  44. def hasFocus: Boolean

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

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

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

    Permalink
    Definition Classes
    UIElement
  48. val imgPanels: Array[DoubleBufferedImagePanel { lazy val peer: javax.swing.JPanel with this.SuperMixin }]

    Permalink
  49. var initP: JComponent

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

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

    Permalink
    Definition Classes
    Component
  52. def isBusy: Boolean

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

    Permalink
    Definition Classes
    Any
  54. var lastData: AnyRef

    Permalink

    A reference to the data this viewer was last updated with.

    A reference to the data this viewer was last updated with. Sometimes its necessary to redraw the visualization between updates (e.g. in response to 'invert').

  55. val layers: Int

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

    Permalink
    Definition Classes
    LayoutContainer
  57. def layoutManager: BorderLayout

    Permalink
    Definition Classes
    BorderPanel
  58. val legendGroupIdx: Int

    Permalink

    Index of the ComponentGroup that contrains the color key, as returned by the toolbarComponents method.

  59. def listenTo(ps: Publisher*): Unit

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

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

    Permalink
    Definition Classes
    UIElement
  62. def location: Point

    Permalink
    Definition Classes
    UIElement
  63. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  64. def max: Float

    Permalink
  65. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  67. def min: Float

    Permalink
  68. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  70. object mouse

    Permalink
    Definition Classes
    Component
  71. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    BorderPanel → Panel → Wrapper → Component → UIElement
  86. def popupText(layer: Int, row: Int, column: Int): String

    Permalink
    Attributes
    protected
  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 render(data: Seq[Array[Array[Float]]]): Unit

    Permalink
    Attributes
    protected
  94. def render(data: libcog.ScalarFieldReader): Unit

    Permalink
    Attributes
    protected
  95. def repaint(rect: Rectangle): Unit

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

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

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

    Permalink
    Definition Classes
    Component
  99. 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
  100. def restore(savedState: 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
    ScalarMemoryViewRestorableState
  101. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  102. val rows: Int

    Permalink
  103. 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
    ScalarMemoryViewRestorableState
  104. 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
  105. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  107. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  108. var stepMax: Float

    Permalink
  109. var stepMin: Float

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

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

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

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

    Permalink

    Builds and returns a new collection of components that supplement this viewer (either user controls or additional displays) suitable for installation in a toolbar.

    Builds and returns a new collection of components that supplement this viewer (either user controls or additional displays) suitable for installation in a toolbar. Components are logically grouped into ComponentGroups based on their function (e.g. all the components responsible for showing the color key are collected into a single ComponentGroup).

    Definition Classes
    ScalarMemoryViewToolbarItems
  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. final def update(data: Seq[Array[Array[Float]]]): Unit

    Permalink
  119. final def update(src: AnyRef, data: libcog.ScalarFieldReader): Unit

    Permalink

    Updates the visualization based on the contents of data.

  120. final 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
    ScalarMemoryViewViewer
  121. def updateMinAndMax(data: Seq[Array[Array[Float]]]): Unit

    Permalink
    Attributes
    protected
  122. def updateMinAndMax(data: libcog.ScalarFieldReader): Unit

    Permalink

    Update absMin, absMax, stepMin, and stepMax according to the contents of data.

    Update absMin, absMax, stepMin, and stepMax according to the contents of data.

    Attributes
    protected
  123. def visible: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. val wrapPanel: WrapPanel

    Permalink
  129. def xLayoutAlignment: Double

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

    Permalink
    Definition Classes
    Component
  131. 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
  132. def yLayoutAlignment: Double

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

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

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  135. val zoomIncrement: Float

    Permalink

    Default zoom step size.

    Default zoom step size.

    Definition Classes
    ScalarMemoryViewZoomProperty
  136. def zoomLevel: Float

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

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

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  139. 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