Class

cogdebugger.ui.fieldvisualizations.vector

VectorGeometricSubpanel

Related Doc: package vector

Permalink

class VectorGeometricSubpanel extends TileBasedFieldPanel[libcog.VectorFieldReader] with Viewer with RestorableState with ToolbarItems

Created with IntelliJ IDEA. User: gonzatob Date: 9/6/12 Time: 3:46 PM

A visualization for VectorFields that treats vector components as Cartesian components in two-dimensional space. Two components of each vector are treated as x and y and then displayed as directed lines on a grid.

For fields of three dimensions, each layer is sliced out into a separate grid. Each cell in the grid(s) renders a directed line representing a single vector. Lines originates from the center of their respective cells, and the visual length of all lines are normalized such that the longest line/vector in the field is fully contained in its cell.

Since this visual representation can only account for two components of vectors at a time, the toolbarComponents method will return a user control for picking which components to treat as 'x' and 'y' if the field contains vectors of three or more dimensions. This user control is not provided if the field contains vectors of exactly two dimensions - in that case, the first component is taken to be -y and the second component as x. This is the mapping between Cog's (row, column) indexing an a conventional Cartesian space with y increasing in the upward direction and x increasing to the right.

Linear Supertypes
ToolbarItems, RestorableState, Viewer, TileBasedFieldPanel[libcog.VectorFieldReader], ZoomProperty, Zoomable, FlowPanel, Wrapper, SequentialContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. VectorGeometricSubpanel
  2. ToolbarItems
  3. RestorableState
  4. Viewer
  5. TileBasedFieldPanel
  6. ZoomProperty
  7. Zoomable
  8. FlowPanel
  9. Wrapper
  10. SequentialContainer
  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 VectorGeometricSubpanel(fieldShape: libcog.Shape, tensorShape: libcog.Shape)

    Permalink

Type Members

  1. class Content extends BufferWrapper[Component]

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  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. val ZoomProperty: FloatProperty

    Permalink
    Definition Classes
    ZoomProperty
  5. val _contents: Content

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def background: Color

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

    Permalink
    Definition Classes
    UIElement
  9. def border: Border

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

    Permalink
    Definition Classes
    Component
  11. def bounds: Rectangle

    Permalink
    Definition Classes
    UIElement
  12. val canvas: Panel { ... /* 5 definitions in type refinement */ }

    Permalink
    Attributes
    protected
    Definition Classes
    TileBasedFieldPanel
  13. val cellSize: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  14. def clone(): AnyRef

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

    Permalink
    Definition Classes
    TileBasedFieldPanel
  16. val contents: Buffer[Component]

    Permalink
    Definition Classes
    Wrapper → Wrapper → SequentialContainer → Container
  17. def cursor: Cursor

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

    Permalink
    Definition Classes
    UIElement
  19. var data: Option[libcog.VectorFieldReader]

    Permalink
    Attributes
    protected
    Definition Classes
    TileBasedFieldPanel
  20. def deafTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  21. val dim: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  22. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  23. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  24. def draw0D(data: libcog.VectorFieldReader, g: Graphics2D): Unit

    Permalink
    Definition Classes
    TileBasedFieldPanel
  25. def draw1D(data: libcog.VectorFieldReader, g: Graphics2D): Unit

    Permalink
    Definition Classes
    TileBasedFieldPanel
  26. def draw2D(data: libcog.VectorFieldReader, g: Graphics2D): Unit

    Permalink
    Definition Classes
    TileBasedFieldPanel
  27. def draw3D(data: libcog.VectorFieldReader, g: Graphics2D): Unit

    Permalink
    Definition Classes
    TileBasedFieldPanel
  28. def drawElement(data: libcog.VectorFieldReader, g: Graphics2D, indices: Int*): Unit

    Permalink

    Draw the single field element at the given indices.

    Draw the single field element at the given indices.

    Called after the pen has been moved to the top-left corner of the cell to draw in. Clients should take care to draw within the bounds of the cell, which is a cellSize by cellSize square.

    It would be nice if we could give an element as an argument instead of a bunch of indices, but the Field class doesn't currently define any means to actually extract elements from the field; that's left to subclasses. Further complicating things, the panel classes don't know in advance how many dimensions the data field has, so we have to use a variable length indices parameter. If your field class has a read(indices: Int*) method, you can get the current element, regardless of field dimensions, like so:

    val element = read(indices: _*)
    Definition Classes
    VectorGeometricSubpanelTileBasedFieldPanel
  29. def drawElements(data: libcog.VectorFieldReader, g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TileBasedFieldPanel
  30. var drawGrid: Boolean

    Permalink
    Definition Classes
    TileBasedFieldPanel
  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 finalize(): Unit

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

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

    Permalink
    Definition Classes
    Component
  38. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  40. def foreground: Color

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  43. def hGap: Int

    Permalink
    Definition Classes
    FlowPanel
  44. def hGap_=(n: Int): Unit

    Permalink
    Definition Classes
    FlowPanel
  45. def hasFocus: Boolean

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

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

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

    Permalink
    Definition Classes
    UIElement
  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. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  53. def layerHeight: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  54. def layerWidth: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  55. val layers: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  56. val layersInARow: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  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. var margin: Int

    Permalink
    Attributes
    protected
    Definition Classes
    TileBasedFieldPanel
  63. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  65. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  67. object mouse

    Permalink
    Definition Classes
    Component
  68. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  81. lazy val peer: JPanel

    Permalink
    Definition Classes
    FlowPanel → Panel → Wrapper → Component → UIElement
  82. def preferredSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  84. 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
  85. 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
  86. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  87. val reactions: Reactions

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

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

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

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

    Permalink
    Definition Classes
    Component
  92. 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
  93. 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
    VectorGeometricSubpanelRestorableState
  94. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  95. val rows: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  96. 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
    VectorGeometricSubpanelRestorableState
  97. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  99. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  100. var stroke: BasicStroke

    Permalink
    Attributes
    protected
    Definition Classes
    TileBasedFieldPanel
  101. def subscribe(listener: Reaction): Unit

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

    Permalink
    Definition Classes
    AnyRef
  103. val tmpVector: Vector

    Permalink
  104. def toString(): String

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

    Permalink

    Produces a sequence of user controls and supplemental views, grouped into ComponentGroups by function.

    Produces a sequence of user controls and supplemental views, grouped into ComponentGroups by function.

    For this view, the first ComponentGroup contains a legend showing the minimum/maximum values in the field and the colors that map to them. If it isn't the case that both the field and the vectors within are of two dimensions, the sequence returned will have a second ComponentGroup with a control for selecting which vector component maps to x and y for the purposes of visualization.

    Definition Classes
    VectorGeometricSubpanelToolbarItems
  106. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  107. def tooltip: String

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

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

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  110. 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
    VectorGeometricSubpanelViewer
  111. def update(target: AnyRef, data: libcog.VectorFieldReader): Unit

    Permalink

    Update the data being viewed with new "data".

    Update the data being viewed with new "data".

    Definition Classes
    TileBasedFieldPanel
  112. def updateStatistics(data: libcog.VectorFieldReader): Unit

    Permalink

    A pre-rendering step.

    A pre-rendering step. Finds the minimum and maximum vector amplitudes in the field, which are needed for visually scaling the vector display. Also fires a ValueChanged event to signal interested parties (namely the legend UI component) that there are new values for min and max.

    Definition Classes
    VectorGeometricSubpanelTileBasedFieldPanel
  113. def vGap: Int

    Permalink
    Definition Classes
    FlowPanel
  114. def vGap_=(n: Int): Unit

    Permalink
    Definition Classes
    FlowPanel
  115. def visible: Boolean

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

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

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

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

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

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

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

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

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

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  126. val zoomIncrement: Float

    Permalink

    Default zoom/unzoom increment used by zoomIn and zoomOut.

    Default zoom/unzoom increment used by zoomIn and zoomOut. When the ZoomType is Additive, this value is added to or substracted from the current zoomLevel. In multiplicative mode, zoomLevel is multipled by zDelta on zooming in or by its reciprocal on zooming out.

    Definition Classes
    TileBasedFieldPanelZoomProperty
  127. def zoomLevel: Float

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

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

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

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

Inherited from ZoomProperty

Inherited from Zoomable

Inherited from FlowPanel

Inherited from Wrapper

Inherited from SequentialContainer

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