|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<K,Object> de.lmu.ifi.dbs.elki.utilities.datastructures.AnyMap<String> de.lmu.ifi.dbs.elki.visualization.VisualizerContext
public class VisualizerContext
Map to store context information for the visualizer. This can be any data that should to be shared among plots, such as line colors, styles etc.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
static String |
CLUSTERING
Identifier for the primary clustering to use. |
static String |
CLUSTERING_FALLBACK
Identifier for a fallback (default) clustering. |
private Collection<VisFactory> |
factories
Factories to use |
private Pattern |
hideVisualizers
Visualizers to hide by default |
private EventListenerList |
listenerList
The event listeners for this context. |
private static Logging |
logger
Logger. |
private Collection<ProjectorFactory> |
projectors
Projectors to use |
private HierarchicalResult |
result
The full result object |
static String |
SELECTION
Identifier for the selection |
private static long |
serialVersionUID
Serial version. |
private StyleLibrary |
stylelib
The style library of this context |
static String |
VISUALIZER_LIST
Identifier for the visualizer list |
Constructor Summary | |
---|---|
VisualizerContext(HierarchicalResult result,
StyleLibrary stylelib,
Collection<ProjectorFactory> projectors,
Collection<VisFactory> factories,
Pattern hideVisualizers)
Constructor. |
Method Summary | |
---|---|
void |
addContextChangeListener(ContextChangeListener listener)
Add a context change listener. |
void |
addDataStoreListener(DataStoreListener l)
Adds a listener for the DataStoreEvent posted after the
content changes. |
void |
addResultListener(ResultListener listener)
Register a result listener. |
void |
contentChanged(DataStoreEvent e)
Proxy datastore event to child listeners. |
void |
fireContextChange(ContextChangedEvent e)
Trigger a context change event. |
private Clustering<Model> |
generateDefaultClustering()
Generate a default (fallback) clustering. |
ResultHierarchy |
getHierarchy()
Get the hierarchy object |
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus. |
Clustering<Model> |
getOrCreateDefaultClustering()
Convenience method to get the clustering to use, and fall back to a default "clustering". |
HierarchicalResult |
getResult()
Get the full result object |
DBIDSelection |
getSelection()
Get the current selection. |
String |
getShortName()
A short name for the result, useful for file names. |
StyleLibrary |
getStyleLibrary()
Get the style library |
IterableIterator<VisualizationTask> |
iterVisualizers()
Deprecated. Odd semantics: contains duplicates! |
private void |
processNewResult(HierarchicalResult baseResult,
Result newResult)
Process a particular result. |
void |
removeContextChangeListener(ContextChangeListener listener)
Remove a context change listener. |
void |
removeDataStoreListener(DataStoreListener l)
Removes a listener previously added with addDataStoreListener . |
void |
removeResultListener(ResultListener listener)
Remove a result listener. |
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 |
setSelection(DBIDSelection sel)
Set a new selection. |
void |
setVisualizationVisibility(VisualizationTask task,
boolean visibility)
Change a visualizers visibility. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.AnyMap |
---|
get, get, getGenerics |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
private static final long serialVersionUID
private static final Logging logger
private HierarchicalResult result
private EventListenerList listenerList
private StyleLibrary stylelib
private Collection<ProjectorFactory> projectors
private Collection<VisFactory> factories
private Pattern hideVisualizers
public static final String CLUSTERING
public static final String CLUSTERING_FALLBACK
public static final String VISUALIZER_LIST
public static final String SELECTION
Constructor Detail |
---|
public VisualizerContext(HierarchicalResult result, StyleLibrary stylelib, Collection<ProjectorFactory> projectors, Collection<VisFactory> factories, Pattern hideVisualizers)
result
- Resultstylelib
- Style libraryprojectors
- Projectors to usefactories
- Visualizer Factories to usehideVisualizers
- Pattern to hide visualizersMethod Detail |
---|
public HierarchicalResult getResult()
public ResultHierarchy getHierarchy()
public StyleLibrary getStyleLibrary()
public Clustering<Model> getOrCreateDefaultClustering()
private Clustering<Model> generateDefaultClustering()
public DBIDSelection getSelection()
public void setSelection(DBIDSelection sel)
sel
- Selectionpublic void setVisualizationVisibility(VisualizationTask task, boolean visibility)
task
- Visualization taskvisibility
- new visibilitypublic void addContextChangeListener(ContextChangeListener listener)
listener
- public void removeContextChangeListener(ContextChangeListener listener)
listener
- public void fireContextChange(ContextChangedEvent e)
e
- Eventpublic void addDataStoreListener(DataStoreListener l)
DataStoreEvent
posted after the
content changes.
l
- the listener to addremoveDataStoreListener(de.lmu.ifi.dbs.elki.database.datastore.DataStoreListener)
public void removeDataStoreListener(DataStoreListener l)
addDataStoreListener
.
l
- the listener to removeaddDataStoreListener(de.lmu.ifi.dbs.elki.database.datastore.DataStoreListener)
public void contentChanged(DataStoreEvent e)
contentChanged
in interface DataStoreListener
e
- the update eventprivate void processNewResult(HierarchicalResult baseResult, Result newResult)
baseResult
- Base ResultnewResult
- Newly added Result@Deprecated public IterableIterator<VisualizationTask> iterVisualizers()
public void addResultListener(ResultListener listener)
listener
- Result listener.public void removeResultListener(ResultListener listener)
listener
- Result listener.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 String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |