de.lmu.ifi.dbs.elki.visualization
Class VisualizationTask

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,Object>
          extended by de.lmu.ifi.dbs.elki.utilities.datastructures.AnyMap<String>
              extended by de.lmu.ifi.dbs.elki.visualization.VisualizationTask
All Implemented Interfaces:
Result, Serializable, Cloneable, Comparable<VisualizationTask>, Map<String,Object>

public class VisualizationTask
extends AnyMap<String>
implements Cloneable, Result, Comparable<VisualizationTask>

Container class, with ugly casts to reduce generics crazyness.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
(package private)  VisualizerContext context
          The active context
(package private)  VisFactory factory
          The factory
 double height
          Height
static int LEVEL_BACKGROUND
          Background layer
static int LEVEL_DATA
          Data layer
static int LEVEL_FOREGROUND
          Passive foreground layer
static int LEVEL_INTERACTIVE
          Active foreground layer (interactive elements)
static int LEVEL_STATIC
          Static plot layer
static String META_LEVEL
          Meta data key: Level for visualizer ordering Returns an integer indicating the "temporal position" of this Visualizer.
static String META_NODETAIL
          Mark as not having a (sensible) detail view.
static String META_NOEXPORT
          Flag to signal the visualizer should not be exported.
static String META_NOTHUMB
          Flag to signal there is no thumbnail needed.
static String META_TOOL
          Flag to mark the visualizer as tool.
static String META_VISIBLE
          Flag to control visibility.
static String META_VISIBLE_DEFAULT
          Flag to signal default visibility of a visualizer.
(package private)  String name
          Name
(package private)  Projection proj
          The current projection
(package private)  Relation<?> relation
          The main representation
(package private)  Result result
          The result we are attached to
private static long serialVersionUID
          Serial number
(package private)  SVGPlot svgp
          The plot to draw onto
static String THUMBNAIL
          Constant for using thumbnail
static String THUMBNAIL_RESOLUTION
          Thumbnail size
 double width
          Width
 
Constructor Summary
VisualizationTask(String name, Result result, Relation<?> relation, VisFactory factory)
          Visualization task.
VisualizationTask(String name, VisualizerContext context, Result result, Relation<?> relation, VisFactory factory, Projection proj, SVGPlot svgp, double width, double height)
          Constructor
 
Method Summary
 VisualizationTask clone()
           
 VisualizationTask clone(SVGPlot newplot, VisualizerContext context)
          Special clone operation that replaces the target plot.
 VisualizationTask clone(SVGPlot plot, VisualizerContext context, Projection p, double width, double height)
          Special clone operation to set projection and size.
 int compareTo(VisualizationTask other)
           
 boolean equals(Object o)
           
 VisualizerContext getContext()
          Get the visualizer context.
 VisFactory getFactory()
          Get the visualizer factory.
 double getHeight()
           
 String getLongName()
          A "pretty" name for the result, for use in titles, captions and menus.
 SVGPlot getPlot()
           
<P extends Projection>
P
getProj()
           
<R extends Relation<?>>
R
getRelation()
           
<R extends Result>
R
getResult()
           
 String getShortName()
          A short name for the result, useful for file names.
 double getWidth()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.AnyMap
get, get, getGenerics
 
Methods inherited from class java.util.HashMap
clear, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial number

See Also:
Constant Field Values

THUMBNAIL

public static final String THUMBNAIL
Constant for using thumbnail

See Also:
Constant Field Values

THUMBNAIL_RESOLUTION

public static final String THUMBNAIL_RESOLUTION
Thumbnail size

See Also:
Constant Field Values

META_LEVEL

public static final String META_LEVEL
Meta data key: Level for visualizer ordering Returns an integer indicating the "temporal position" of this Visualizer. It is intended to impose an ordering on the execution of Visualizers as a Visualizer may depend on another Visualizer running earlier.
Lower numbers should result in a earlier use of this Visualizer, while higher numbers should result in a later use. If more Visualizers have the same level, no ordering is guaranteed.
Note that this value is only a recommendation, as it is totally up to the framework to ignore it. Type: Integer

See Also:
Constant Field Values

META_VISIBLE

public static final String META_VISIBLE
Flag to control visibility. Type: Boolean

See Also:
Constant Field Values

META_NOTHUMB

public static final String META_NOTHUMB
Flag to signal there is no thumbnail needed. Type: Boolean

See Also:
Constant Field Values

META_NODETAIL

public static final String META_NODETAIL
Mark as not having a (sensible) detail view.

See Also:
Constant Field Values

META_NOEXPORT

public static final String META_NOEXPORT
Flag to signal the visualizer should not be exported. Type: Boolean

See Also:
Constant Field Values

META_VISIBLE_DEFAULT

public static final String META_VISIBLE_DEFAULT
Flag to signal default visibility of a visualizer. Type: Boolean

See Also:
Constant Field Values

META_TOOL

public static final String META_TOOL
Flag to mark the visualizer as tool. Type: Boolean

See Also:
Constant Field Values

LEVEL_BACKGROUND

public static final int LEVEL_BACKGROUND
Background layer

See Also:
Constant Field Values

LEVEL_DATA

public static final int LEVEL_DATA
Data layer

See Also:
Constant Field Values

LEVEL_STATIC

public static final int LEVEL_STATIC
Static plot layer

See Also:
Constant Field Values

LEVEL_FOREGROUND

public static final int LEVEL_FOREGROUND
Passive foreground layer

See Also:
Constant Field Values

LEVEL_INTERACTIVE

public static final int LEVEL_INTERACTIVE
Active foreground layer (interactive elements)

See Also:
Constant Field Values

name

String name
Name


context

VisualizerContext context
The active context


factory

VisFactory factory
The factory


result

Result result
The result we are attached to


proj

Projection proj
The current projection


relation

Relation<?> relation
The main representation


svgp

SVGPlot svgp
The plot to draw onto


width

public double width
Width


height

public double height
Height

Constructor Detail

VisualizationTask

public VisualizationTask(String name,
                         Result result,
                         Relation<?> relation,
                         VisFactory factory)
Visualization task.

Parameters:
name - Name
result - Result
relation - Relation to use
factory - Factory

VisualizationTask

public VisualizationTask(String name,
                         VisualizerContext context,
                         Result result,
                         Relation<?> relation,
                         VisFactory factory,
                         Projection proj,
                         SVGPlot svgp,
                         double width,
                         double height)
Constructor

Parameters:
name - Name
context - Context
result - Result
relation - Representation
factory - Factory
proj - Projection
svgp - Plot
width - Width
height - Height
Method Detail

getContext

public VisualizerContext getContext()
Get the visualizer context.

Returns:
context

getFactory

public VisFactory getFactory()
Get the visualizer factory.

Returns:
Visualizer factory

getResult

public <R extends Result> R getResult()

getProj

public <P extends Projection> P getProj()

getRelation

public <R extends Relation<?>> R getRelation()

getPlot

public SVGPlot getPlot()

getWidth

public double getWidth()

getHeight

public double getHeight()

clone

public VisualizationTask clone()
Overrides:
clone in class HashMap<String,Object>

clone

public VisualizationTask clone(SVGPlot newplot,
                               VisualizerContext context)
Special clone operation that replaces the target plot.

Parameters:
newplot - Replacement plot to use
context - Visualizer context
Returns:
clone with different plot

clone

public VisualizationTask clone(SVGPlot plot,
                               VisualizerContext context,
                               Projection p,
                               double width,
                               double height)
Special clone operation to set projection and size.

Parameters:
plot - new plot
p - Projection to use
width - Width
height - Height
Returns:
clone with different plot

getLongName

public String getLongName()
Description copied from interface: Result
A "pretty" name for the result, for use in titles, captions and menus.

Specified by:
getLongName in interface Result
Returns:
result name

getShortName

public String getShortName()
Description copied from interface: Result
A short name for the result, useful for file names.

Specified by:
getShortName in interface Result
Returns:
result name

compareTo

public int compareTo(VisualizationTask other)
Specified by:
compareTo in interface Comparable<VisualizationTask>

toString

public String toString()
Overrides:
toString in class AbstractMap<String,Object>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class AbstractMap<String,Object>

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class AbstractMap<String,Object>

Release 0.4.0 (2011-09-20_1324)