public class Visualization
extends java.lang.Object
Constructor and Description |
---|
Visualization()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(SimpleContent r)
Add a SimpleContent to the "front" of this Visualization.
|
void |
addKeyListener(java.awt.event.KeyListener kl)
Add a KeyListener.
|
void |
addMouseListener(java.awt.event.MouseListener ml)
Add a MouseListener.
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener mml)
Add a MouseMotionListener.
|
void |
addView(VisualizationView view)
Add a view to this Visualization.
|
void |
clear()
Clear this Visualization of all SimpleContent objects.
|
VisualizationView |
getView()
Get the "main" view (i.e., the "main" VisualizationView
that is used to present the SimpleContent objects) associated
with this Visualization.
|
java.util.Iterator<VisualizationView> |
getViews()
Get all of the views associated with this Visualization.
|
java.util.Iterator<SimpleContent> |
iterator()
Get an Iterator that contains all of the SimpleContent
objects.
|
void |
remove(SimpleContent r)
Remove the given SimpleContent from this Canvas.
|
void |
removeKeyListener(java.awt.event.KeyListener kl)
Remove a KeyListener.
|
void |
removeMouseListener(java.awt.event.MouseListener ml)
Remove a MouseListener.
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener mml)
Remove a MouseMotionListener.
|
void |
removeView(VisualizationView view)
Remove a view from this Visualization.
|
void |
repaint()
Repaint the view(s) associated with this Visualization.
|
void |
setBackground(java.awt.Color background)
Set the background color.
|
void |
setView(VisualizationView view)
Change the "main" view associated with this Visualization.
|
void |
toBack(SimpleContent r)
Move the given SimpleContent to the "back".
|
void |
toFront(SimpleContent r)
Move the given SimpleContent to the "front".
|
public void add(SimpleContent r)
r
- The SimpleContent to addpublic void addKeyListener(java.awt.event.KeyListener kl)
kl
- The listener to addpublic void addMouseListener(java.awt.event.MouseListener ml)
ml
- The listener to addpublic void addMouseMotionListener(java.awt.event.MouseMotionListener mml)
mml
- The listener to addpublic void addView(VisualizationView view)
view
- The view to addpublic void clear()
public VisualizationView getView()
Note: A visualization can actually have multiple views associated with it. This is a convenience method that can be used when there is only one such view.
public java.util.Iterator<VisualizationView> getViews()
public java.util.Iterator<SimpleContent> iterator()
public void remove(SimpleContent r)
r
- The SimpleContent to removepublic void removeKeyListener(java.awt.event.KeyListener kl)
kl
- The listener to removepublic void removeMouseListener(java.awt.event.MouseListener ml)
ml
- The listener to removepublic void removeMouseMotionListener(java.awt.event.MouseMotionListener mml)
mml
- The listener to removepublic void removeView(VisualizationView view)
view
- The view to removepublic void repaint()
public void setBackground(java.awt.Color background)
Note: If you want to have a background image just make it the first SimpleContent.
background
- The background colorpublic void setView(VisualizationView view)
Note: A visualization can actually have multiple views associated with it. This is a convenience method that can be used when there is only one such view.
view
- The new view to use as the "main" viewpublic void toBack(SimpleContent r)
Note: The SimpleContent must have already been added for this method to have an effect.
r
- The SimpleContent to move to the backpublic void toFront(SimpleContent r)
Note: The SimpleContent must have already been added for this method to have an effect.
r
- The SimpleContent to move to the front