public class VisualizationTask extends Object implements Cloneable, Result, Comparable<VisualizationTask>
Modifier and Type | Field and Description |
---|---|
(package private) VisualizerContext |
context
The active context
|
boolean |
default_visibility
Flag to signal default visibility of a visualizer.
|
(package private) VisFactory |
factory
The factory
|
boolean |
hasoptions
Indicate whether this task has options.
|
double |
height
Height
|
int |
level
Meta data key: Level for visualizer ordering
Returns an integer indicating the "height" of this Visualizer.
|
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
|
(package private) String |
name
Name
|
boolean |
nodetail
Mark as not having a (sensible) detail view.
|
boolean |
noembed
Flag to signal the visualizer should not be embedded.
|
boolean |
noexport
Flag to signal the visualizer should not be exported.
|
(package private) Projection |
proj
The current projection
|
(package private) Relation<?> |
relation
The main representation
|
(package private) Result |
result
The result we are attached to
|
(package private) SVGPlot |
svgp
The plot to draw onto
|
boolean |
thumbnail
Flag to signal there is no thumbnail needed.
|
static String |
THUMBNAIL
Constant for using thumbnail
|
static String |
THUMBNAIL_RESOLUTION
Thumbnail size
|
int |
thumbsize
Thumbnail size
|
boolean |
tool
Flag to mark the visualizer as tool.
|
boolean |
visible
Flag to control visibility.
|
double |
width
Width
|
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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> |
getProj() |
<R extends Relation<?>> |
getRelation() |
<R extends Result> |
getResult() |
String |
getShortName()
A short name for the result, useful for file names.
|
double |
getWidth() |
int |
hashCode() |
void |
initDefaultVisibility(boolean vis)
Init the default visibility of a task.
|
String |
toString() |
public static final String THUMBNAIL
public static final String THUMBNAIL_RESOLUTION
public int level
public boolean visible
public boolean thumbnail
public boolean nodetail
public boolean noexport
public boolean noembed
public boolean default_visibility
public boolean tool
public boolean hasoptions
public static final int LEVEL_BACKGROUND
public static final int LEVEL_DATA
public static final int LEVEL_STATIC
public static final int LEVEL_FOREGROUND
public static final int LEVEL_INTERACTIVE
String name
VisualizerContext context
VisFactory factory
Result result
Projection proj
Relation<?> relation
SVGPlot svgp
public double width
public double height
public int thumbsize
public VisualizationTask(String name, Result result, Relation<?> relation, VisFactory factory)
name
- Nameresult
- Resultrelation
- Relation to usefactory
- Factorypublic VisualizationTask(String name, VisualizerContext context, Result result, Relation<?> relation, VisFactory factory, Projection proj, SVGPlot svgp, double width, double height)
name
- Namecontext
- Contextresult
- Resultrelation
- Representationfactory
- Factoryproj
- Projectionsvgp
- Plotwidth
- Widthheight
- Heightpublic VisualizerContext getContext()
public VisFactory getFactory()
public <R extends Result> R getResult()
public <P extends Projection> P getProj()
public <R extends Relation<?>> R getRelation()
public SVGPlot getPlot()
public double getWidth()
public double getHeight()
public void initDefaultVisibility(boolean vis)
vis
- Visibility.public VisualizationTask clone()
public VisualizationTask clone(SVGPlot newplot, VisualizerContext context)
newplot
- Replacement plot to usecontext
- Visualizer contextpublic VisualizationTask clone(SVGPlot plot, VisualizerContext context, Projection p, double width, double height)
plot
- new plotp
- Projection to usewidth
- Widthheight
- Heightpublic String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result
public int compareTo(VisualizationTask other)
compareTo
in interface Comparable<VisualizationTask>