Package elki.visualization.gui.overview
Class LayerMap
- java.lang.Object
-
- elki.visualization.gui.overview.LayerMap
-
public class LayerMap extends java.lang.Object
Class to help keeping track of the materialized layers of the different visualizations.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<Pair<PlotItem,VisualizationTask>,Pair<org.w3c.dom.Element,Visualization>>
map
The actual map
-
Constructor Summary
Constructors Constructor Description LayerMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear a mapPair<org.w3c.dom.Element,Visualization>
get(PlotItem it, VisualizationTask task)
Get a pair from the maporg.w3c.dom.Element
getContainer(PlotItem item, VisualizationTask task)
Get the container element referenced by a item/key combination.Visualization
getVisualization(PlotItem item, VisualizationTask task)
Get the visualization referenced by a item/key combination.private Pair<PlotItem,VisualizationTask>
key(PlotItem item, VisualizationTask task)
Helper function for building a key objectvoid
put(PlotItem it, VisualizationTask task, Pair<org.w3c.dom.Element,Visualization> pair)
Put a new item into the visualizationsvoid
put(PlotItem it, VisualizationTask task, org.w3c.dom.Element elem, Visualization vis)
Put a new combination into the map.Pair<org.w3c.dom.Element,Visualization>
remove(PlotItem it, VisualizationTask task)
Remove a combination.private Pair<org.w3c.dom.Element,Visualization>
value(org.w3c.dom.Element elem, Visualization vis)
Helper function to build a value pairjava.lang.Iterable<Pair<org.w3c.dom.Element,Visualization>>
values()
Iterate over values
-
-
-
Field Detail
-
map
private java.util.HashMap<Pair<PlotItem,VisualizationTask>,Pair<org.w3c.dom.Element,Visualization>> map
The actual map
-
-
Method Detail
-
key
private Pair<PlotItem,VisualizationTask> key(PlotItem item, VisualizationTask task)
Helper function for building a key object- Parameters:
item
- Plot itemtask
- Visualization Task- Returns:
- Key
-
value
private Pair<org.w3c.dom.Element,Visualization> value(org.w3c.dom.Element elem, Visualization vis)
Helper function to build a value pair- Parameters:
elem
- Container elementvis
- Visualization- Returns:
- Value object
-
getVisualization
public Visualization getVisualization(PlotItem item, VisualizationTask task)
Get the visualization referenced by a item/key combination.- Parameters:
item
- Plot ttemtask
- Visualization task- Returns:
- Visualization
-
getContainer
public org.w3c.dom.Element getContainer(PlotItem item, VisualizationTask task)
Get the container element referenced by a item/key combination.- Parameters:
item
- Plot itemtask
- Visualization task- Returns:
- Container element
-
values
public java.lang.Iterable<Pair<org.w3c.dom.Element,Visualization>> values()
Iterate over values- Returns:
- Value iterable
-
clear
public void clear()
Clear a map
-
put
public void put(PlotItem it, VisualizationTask task, org.w3c.dom.Element elem, Visualization vis)
Put a new combination into the map.- Parameters:
it
- Plot itemtask
- Visualization Taskelem
- Container elementvis
- Visualization
-
remove
public Pair<org.w3c.dom.Element,Visualization> remove(PlotItem it, VisualizationTask task)
Remove a combination.- Parameters:
it
- Plot itemtask
- Visualization task- Returns:
- Previous value
-
put
public void put(PlotItem it, VisualizationTask task, Pair<org.w3c.dom.Element,Visualization> pair)
Put a new item into the visualizations- Parameters:
it
- Plot itemtask
- Visualization taskpair
- Pair object
-
get
public Pair<org.w3c.dom.Element,Visualization> get(PlotItem it, VisualizationTask task)
Get a pair from the map- Parameters:
it
- Plot itemtask
- Visualization task- Returns:
- Pair object
-
-