public class OverviewPlot extends Object implements ResultListener, VisualizationListener
Modifier and Type | Class and Description |
---|---|
class |
OverviewPlot.SelectPlotEvent
Event when a plot was selected.
|
Modifier and Type | Field and Description |
---|---|
private ArrayList<ActionListener> |
actionListeners
Action listeners for this plot.
|
private VisualizerContext |
context
Visualizer context
|
private static boolean |
DEBUG_LAYOUT
Draw red borders around items.
|
private EventListener |
hoverer
React to mouse hover events
|
private Element |
hoverlayer
Layer for hover elements
|
private static Logging |
LOG
Our logging class
|
static String |
OVERVIEW_REFRESHED
Event when the overview plot was refreshed.
|
static String |
OVERVIEW_REFRESHING
Event when the overview plot started refreshing.
|
(package private) AtomicReference<Runnable> |
pendingRefresh
Pending refresh, for lazy refreshing
|
private VisualizationPlot |
plot
The SVG plot object.
|
private Element |
plotlayer
Layer for plot thumbnail
|
protected RectangleArranger<PlotItem> |
plotmap
Map of coordinates to plots.
|
private double |
ratio
Screen ratio
|
private boolean |
reinitOnRefresh
Reinitialize on refresh
|
int |
screenheight
Screen size (used for thumbnail sizing)
|
int |
screenwidth
Screen size (used for thumbnail sizing)
|
private CSSClass |
selcss
The CSS class used on "selectable" rectangles.
|
private boolean |
single
Single view mode
|
private LayerMap |
vistoelem
Lookup
|
Constructor and Description |
---|
OverviewPlot(VisualizerContext context,
boolean single)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener actionListener)
Adds an
ActionListener to the plot. |
private RectangleArranger<PlotItem> |
arrangeVisualizations(double width,
double height)
Recompute the layout of visualizations.
|
void |
destroy()
Destroy this overview plot.
|
private Visualization |
embedOrThumbnail(int thumbsize,
PlotItem it,
VisualizationTask task,
Element parent)
Produce thumbnail for a visualizer.
|
SVGPlot |
getPlot()
Get the SVGPlot object.
|
double |
getRatio() |
void |
initialize(double ratio)
Initialize the plot.
|
private void |
initializePlot()
Initialize the SVG plot.
|
void |
lazyRefresh()
Trigger a redraw, but avoid excessive redraws.
|
DetailView |
makeDetailView(PlotItem it)
Event triggered when a plot was selected.
|
private void |
recalcViewbox()
Recompute the view box of the plot.
|
(package private) void |
refresh()
Do a refresh (when visibilities have changed).
|
private void |
reinitialize()
Refresh the overview plot.
|
void |
resultAdded(Result child,
Result parent)
A new derived result was added.
|
void |
resultChanged(Result current)
Notify that the current result has changed substantially.
|
void |
resultRemoved(Result child,
Result parent)
A result was removed.
|
void |
setRatio(double ratio) |
protected void |
triggerSubplotSelectEvent(PlotItem it)
When a subplot was selected, forward the event to listeners.
|
protected boolean |
visibleInOverview(VisualizationTask task)
Test whether a task should be displayed in the overview plot.
|
void |
visualizationChanged(VisualizationItem child)
Visualization has changed.
|
private static final Logging LOG
public static final String OVERVIEW_REFRESHING
public static final String OVERVIEW_REFRESHED
private static final boolean DEBUG_LAYOUT
private VisualizerContext context
private VisualizationPlot plot
protected RectangleArranger<PlotItem> plotmap
private ArrayList<ActionListener> actionListeners
private boolean single
public int screenwidth
public int screenheight
private EventListener hoverer
private LayerMap vistoelem
private Element plotlayer
private Element hoverlayer
private CSSClass selcss
private double ratio
AtomicReference<Runnable> pendingRefresh
private boolean reinitOnRefresh
public OverviewPlot(VisualizerContext context, boolean single)
context
- Visualizer contextsingle
- Single view modeprivate RectangleArranger<PlotItem> arrangeVisualizations(double width, double height)
width
- Initial widthheight
- Initial heightpublic void initialize(double ratio)
ratio
- Initial ratioprivate void reinitialize()
private void initializePlot()
private Visualization embedOrThumbnail(int thumbsize, PlotItem it, VisualizationTask task, Element parent)
thumbsize
- Thumbnail sizeit
- Plot itemtask
- Taskparent
- Parent element to draw tovoid refresh()
protected boolean visibleInOverview(VisualizationTask task)
task
- Task to displayprivate void recalcViewbox()
public DetailView makeDetailView(PlotItem it)
it
- Plot item selectedpublic void addActionListener(ActionListener actionListener)
ActionListener
to the plot.actionListener
- the ActionListener
to be addedprotected void triggerSubplotSelectEvent(PlotItem it)
it
- PlotItem selectedpublic void destroy()
public SVGPlot getPlot()
public double getRatio()
public void setRatio(double ratio)
ratio
- the ratio to setpublic final void lazyRefresh()
public void resultAdded(Result child, Result parent)
ResultListener
resultAdded
in interface ResultListener
child
- New child result addedparent
- Parent result that was added topublic void resultChanged(Result current)
ResultListener
resultChanged
in interface ResultListener
current
- Result that has changed.public void resultRemoved(Result child, Result parent)
ResultListener
resultRemoved
in interface ResultListener
child
- result that was removedparent
- Parent result that was removed frompublic void visualizationChanged(VisualizationItem child)
VisualizationListener
visualizationChanged
in interface VisualizationListener
child
- Changed visualizationCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.