Class/Object

cogdebugger.ui.fieldvisualizations.vector

VectorComponentsSubpanel

Related Docs: object VectorComponentsSubpanel | package vector

Permalink

class VectorComponentsSubpanel extends BorderPanel with Viewer with ZoomProperty with RestorableState with ToolbarItems

A display for VectorFields that breaks the vectors apart into their individual components and displays each set of components as a grayscale image - essentially, slicing each component out of the field as displaying it with a ScalarMemoryView.

Just as a vector is a linear collection of scalars, a VectorField can be thought of as a linear collection of ScalarFields, one for each component. This visualization treats the target VectorField just so, and essentially serves to translate the vector field into a multi-layer (3D) ScalarField and view it as such.

Each individual vector component is "sliced" out of the field to create a scalar field with the same dimensions as the original vector field. That scalar field is visually represented as a grayscale image, with a single pixel per field element. The default color mapping represents the minimum value for the vector component as black, the maximum as white, and intermediate values falling on a linear gradient between those two extremes. Thus, a vector field of n dimensions will be displayed as n grayscale images. Each image annotated with a title indicating the vector component it represents as well as a color key showing which colors correspond to the minimum and maximum values for that component, as well as the value of the minimum and maximums themselves.

As a rought example, a vector field with 50 rows and 100 columns containing two-dimensional vectors would look something like this:

   Component 0                 Component 1
+---------------+           +---------------+
|               |           |               |
| 100x50 image  |           | 100x50 image  |
|               |           |               |
+---------------+           +---------------+
[X] = <min> [ ] = <max>     [X] = <min> [ ] = <max>
Linear Supertypes
ToolbarItems, RestorableState, ZoomProperty, Zoomable, Viewer, BorderPanel, LayoutContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. VectorComponentsSubpanel
  2. ToolbarItems
  3. RestorableState
  4. ZoomProperty
  5. Zoomable
  6. Viewer
  7. BorderPanel
  8. LayoutContainer
  9. Panel
  10. Wrapper
  11. Container
  12. Component
  13. UIElement
  14. LazyPublisher
  15. Publisher
  16. Reactor
  17. Proxy
  18. AnyRef
  19. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new VectorComponentsSubpanel(fieldType: libcog.FieldType)

    Permalink

    fieldType

    A FieldType describing the shape of the field and its vectors.

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

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 ZoomProperty: FloatProperty

    Permalink
    Definition Classes
    ZoomProperty
  6. val _contents: Content

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  7. var _data: libcog.AbstractFieldMemory

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

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

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

    Permalink
    Definition Classes
    Any
  11. def background: Color

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

    Permalink
    Definition Classes
    UIElement
  13. def border: Border

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

    Permalink
    Definition Classes
    Component
  15. def bounds: Rectangle

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

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

    Permalink
  18. val componentDisplays: Array[BorderPanel]

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

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

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

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

    Permalink
    Definition Classes
    UIElement
  23. def data: libcog.VectorFieldReader

    Permalink
    Attributes
    protected
  24. def deafTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  25. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  26. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  27. def enabled: Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  34. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  36. def foreground: Color

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

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

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

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

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

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

    Permalink
    Definition Classes
    UIElement
  43. var initP: JComponent

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

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

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

    Permalink
    Definition Classes
    Any
  47. val layers: Int

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

    Permalink
    Definition Classes
    LayoutContainer
  49. def layoutManager: BorderLayout

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

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

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

    Permalink
    Definition Classes
    UIElement
  53. def location: Point

    Permalink
    Definition Classes
    UIElement
  54. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  55. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  57. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  59. object mouse

    Permalink
    Definition Classes
    Component
  60. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    UIElement
  76. 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
  77. 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
  78. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  79. val reactions: Reactions

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

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

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

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

    Permalink
    Definition Classes
    Component
  84. 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
  85. def restore(tag: 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
    VectorComponentsSubpanelRestorableState
  86. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  87. val rows: Int

    Permalink
  88. 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
    VectorComponentsSubpanelRestorableState
  89. val scalarPanels: Array[scalar.ScalarMemoryView]

    Permalink
  90. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  92. def size: Dimension

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

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

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

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  96. 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
    VectorComponentsSubpanelToolbarItems
  97. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  98. def tooltip: String

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

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

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

    Permalink
  102. 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
    VectorComponentsSubpanelViewer
  103. val vectorLength: Int

    Permalink
  104. val viewPanel: WrapPanel

    Permalink
  105. def visible: Boolean

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

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

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

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

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

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

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

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

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

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  116. var zoomIncrement: Float

    Permalink

    Default zoom increment.

    Default zoom increment.

    Definition Classes
    VectorComponentsSubpanelZoomProperty
  117. def zoomLevel: Float

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

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

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

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