Class

cogdebugger.ui.fieldvisualizations.complex

PolarCoordinatesSubpanel

Related Doc: package complex

Permalink

class PolarCoordinatesSubpanel extends TileBasedFieldPanel[libcog.ComplexFieldReader] with Viewer with RestorableState with ToolbarItems

Subpanel which displays each number in a complex field in polar coordinates (as an arrow).

There are two modes here.

************************************************************** MODE 1: Standard complex number representation in an (x, y) plane.

This assumes a conventional (x, y) right-handed coordinate system for displaying each individual complex number. This means that:

  1. Complex(1, 0) will point right

2. Complex(0, 1) with point up

3. Complex(-1, 0) will point left

4. Complex(0, -1) will point down

************************************************************** MODE 2: As pseudo vectors in the (row, column) plane.

It is sometimes useful to use complex numbers as tiny vectors in a 2D field. You must be careful in doing that, though, because Cog uses a left-handed (row, column) coordinate system. In this mode, the real part of the number as treated as a row coordinate, and the imaginary part is treated as the columns coordinate. This means that:

  1. Complex(1, 0) will point down

2. Complex(0, 1) with point right

3. Complex(-1, 0) will point up

4. Complex(0, -1) will point left

Linear Supertypes
ToolbarItems, RestorableState, Viewer, TileBasedFieldPanel[libcog.ComplexFieldReader], ZoomProperty, Zoomable, FlowPanel, Wrapper, SequentialContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PolarCoordinatesSubpanel
  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 PolarCoordinatesSubpanel(fieldShape: libcog.Shape, asPseudoVectors: Boolean)

    Permalink

    fieldShape

    The shape of the complex field to be displayed.

    asPseudoVectors

    If true, display in MODE 2 as pseudo vectors in a (row, column) plane; if false, display is MODE 1 in polar coordinates assuming a conventional x, y plane.

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.ComplexFieldReader]

    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.ComplexFieldReader, g: Graphics2D): Unit

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

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

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

    Permalink
    Definition Classes
    TileBasedFieldPanel
  28. def drawElement(data: libcog.ComplexFieldReader, 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
    PolarCoordinatesSubpanelTileBasedFieldPanel
  29. def drawElements(data: libcog.ComplexFieldReader, 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 forEachComplexIn(data: libcog.ComplexFieldReader)(op: (libcog.Complex) ⇒ Unit): Unit

    Permalink
    Attributes
    protected
  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 hGap: Int

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

    Permalink
    Definition Classes
    FlowPanel
  46. def hasFocus: Boolean

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

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

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

    Permalink
    Definition Classes
    UIElement
  50. var initP: JComponent

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

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

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

    Permalink
    Definition Classes
    Any
  54. def layerHeight: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  55. def layerWidth: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  56. val layers: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  57. val layersInARow: Int

    Permalink
    Definition Classes
    TileBasedFieldPanel
  58. def listenTo(ps: Publisher*): Unit

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

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

    Permalink
    Definition Classes
    UIElement
  61. def location: Point

    Permalink
    Definition Classes
    UIElement
  62. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  63. var margin: Int

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

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

    Permalink
    Definition Classes
    UIElement
  66. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  68. object mouse

    Permalink
    Definition Classes
    Component
  69. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Publisher
  88. val reactions: Reactions

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  96. val rows: Int

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

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

    Permalink
    Definition Classes
    UIElement
  100. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  101. var stroke: BasicStroke

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

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

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

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

    Permalink

    Toolbar for controlling view of complex field.

    Toolbar for controlling view of complex field.

    Definition Classes
    PolarCoordinatesSubpanelToolbarItems
  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.

    src

    The field or object that generated the data argument

    data

    New field data that needs to be rendered by this viewer

    Definition Classes
    PolarCoordinatesSubpanelViewer
  111. def update(target: AnyRef, data: libcog.ComplexFieldReader): 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.ComplexFieldReader): Unit

    Permalink

    Compute any needed statistics on your data (for display or to help draw later).

    Compute any needed statistics on your data (for display or to help draw later). Called after new data has been received (in updateData) and before drawing begins for that new data.

    Definition Classes
    PolarCoordinatesSubpanelTileBasedFieldPanel
  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