Visual Content
An Introduction |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
An EM Wave
The Eye
The (Linear) Color Cube
A Translation of (25,25)
A Rotation of \(- \pi / 6\) Radians
A Scaling of (1.5, 1.5)
A Reflection About the Horizontal Axis
JComponent
Class:
paint(java.awt.Graphics)
method is called and is passed a rendering engine
JComponent
paint()
methodAn Example
JComponent
can be added
to the content pane of a MultimediaApplication
or MultimediaApplet
A Common Design
A Design with a Problem
A Better Design
A Design that Satisfies Almost All of the Requirements
"Enhancing" the View with Specialization
A Good Design
SimpleContent
Interface
Visualization
ClassSkeleton:
javaexamples/visual/Visualization.java (Fragment: 1)Content Management:
javaexamples/visual/Visualization.java (Fragment: content)View Management:
javaexamples/visual/Visualization.java (Fragment: views)Forcing Rendering:
javaexamples/visual/Visualization.java (Fragment: repaint)
VisualizationView
ClassSkeleton:
javaexamples/visual/VisualizationView.java (Fragment: skeleton)Rendering:
javaexamples/visual/VisualizationView.java (Fragment: render)
PlainVisualizationRenderer
Class
ScaledVisualizationRenderer
ClassSkeleton:
javaexamples/visual/ScaledVisualizationRenderer.java (Fragment: skeleton)Before Rendering:
javaexamples/visual/ScaledVisualizationRenderer.java (Fragment: preRendering)After Rendering:
javaexamples/visual/ScaledVisualizationRenderer.java (Fragment: postRendering)
PartialVisualizationRenderer
ClassSkeleton:
javaexamples/visual/PartialVisualizationRenderer.java (Fragment: skeleton)Before Rendering:
javaexamples/visual/PartialVisualizationRenderer.java (Fragment: preRendering)After Rendering:
javaexamples/visual/PartialVisualizationRenderer.java (Fragment: postRendering)Transformation
class that contains
the necessary attributes and behaviorsSimpleContent
Adding Transformations using a Helper
Adding Transformations using Stand-Alone Interfaces
Adding Transformations using Individual Interfaces
The Best Way to Add Transformations
AbstractTransformableContent
Class