Class

cogdebugger.ui.fieldvisualizations

TileBasedFieldPanel

Related Doc: package fieldvisualizations

Permalink

abstract class TileBasedFieldPanel[T <: libcog.FieldReader] extends FlowPanel with ZoomProperty

Created with IntelliJ IDEA. User: gonzatob Date: 9/6/12 Time: 2:22 PM

This abstract class takes care of much of the drawing logic needed to render fields that can be visualized as a grid of distinct elements (such as vector fields or dyad fields). It supports pan, zoom, and save/restore functionality, and can handle 0D, 1D, 2D, and 3D fields.

Concrete viewer implementations will need to define three methods. The first is update, which runs before any drawing is done to allow a client to do such things as compute min/max values for normalization. The second is drawElement, where the client must supply the code to draw a single element of the field. Lastly is getXmlTagName, which just defines a name unique to this viewer type for use in the workspace configuration XML files.

Linear Supertypes
ZoomProperty, Zoomable, FlowPanel, Wrapper, SequentialContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TileBasedFieldPanel
  2. ZoomProperty
  3. Zoomable
  4. FlowPanel
  5. Wrapper
  6. SequentialContainer
  7. Panel
  8. Wrapper
  9. Container
  10. Component
  11. UIElement
  12. LazyPublisher
  13. Publisher
  14. Reactor
  15. Proxy
  16. AnyRef
  17. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TileBasedFieldPanel(fieldShape: libcog.Shape, antialiasing: Boolean = true, preserveLineThickness: Boolean = true)

    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

Abstract Value Members

  1. abstract def drawElement(data: T, 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: _*)
  2. abstract def updateStatistics(data: T): 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) but before drawing begins for that new data.

Concrete 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
  13. val cellSize: Int

    Permalink
  14. def clone(): AnyRef

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

    Permalink
  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[T]

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

    Permalink
    Definition Classes
    Reactor
  21. val dim: Int

    Permalink
  22. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  23. def displayable: Boolean

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

    Permalink
  25. def draw1D(data: T, g: Graphics2D): Unit

    Permalink
  26. def draw2D(data: T, g: Graphics2D): Unit

    Permalink
  27. def draw3D(data: T, g: Graphics2D): Unit

    Permalink
  28. def drawElements(data: T, g: Graphics2D): Unit

    Permalink
    Attributes
    protected
  29. var drawGrid: Boolean

    Permalink
  30. def enabled: Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    Component
  37. def font: Font

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

    Permalink
    Definition Classes
    UIElement
  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 hGap: Int

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

    Permalink
    Definition Classes
    FlowPanel
  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. var initP: JComponent

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

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

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

    Permalink
    Definition Classes
    Any
  52. def layerHeight: Int

    Permalink
  53. def layerWidth: Int

    Permalink
  54. val layers: Int

    Permalink
  55. val layersInARow: Int

    Permalink
  56. def listenTo(ps: Publisher*): Unit

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

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

    Permalink
    Definition Classes
    UIElement
  59. def location: Point

    Permalink
    Definition Classes
    UIElement
  60. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  61. var margin: Int

    Permalink
    Attributes
    protected
  62. def maximumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  64. def minimumSize: Dimension

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

    Permalink
    Definition Classes
    UIElement
  66. object mouse

    Permalink
    Definition Classes
    Component
  67. def name: String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    UIElement
  83. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  84. val reactions: Reactions

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

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

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

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

    Permalink
    Definition Classes
    Component
  89. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  90. val rows: Int

    Permalink
  91. def self: Component

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

    Permalink
    Definition Classes
    UIElement
  93. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  94. var stroke: BasicStroke

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

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

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

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  98. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  99. def tooltip: String

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

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

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  102. def update(target: AnyRef, data: T): Unit

    Permalink

    Update the data being viewed with new "data".

  103. def vGap: Int

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

    Permalink
    Definition Classes
    FlowPanel
  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 yLayoutAlignment: Double

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

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

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  115. 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
  116. def zoomLevel: Float

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

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

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

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