public class VisualizationTask extends java.lang.Object implements VisualizationItem, java.lang.Comparable<VisualizationTask>
Modifier and Type | Class and Description |
---|---|
static class |
VisualizationTask.RenderFlag
Rendering flags enum.
|
static class |
VisualizationTask.UpdateFlag
Update flags enum.
|
Modifier and Type | Field and Description |
---|---|
private VisFactory |
factory
The factory
|
private int |
flags
Render capabilities
|
private 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
|
private java.lang.String |
name
Name
|
private Relation<?> |
relation
The main representation
|
private double |
reqheight
Height request
|
private double |
reqwidth
Width request
|
private java.lang.Object |
result
The result we are attached to
|
private boolean |
tool
Flag to mark the visualizer as tool.
|
private int |
updatemask
The update event mask.
|
private boolean |
visible
Flag to control visibility.
|
Constructor and Description |
---|
VisualizationTask(VisFactory factory,
java.lang.String name,
java.lang.Object result,
Relation<?> relation)
Visualization task.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VisualizationTask other) |
boolean |
equals(java.lang.Object o) |
VisFactory |
getFactory()
Get the visualizer factory.
|
java.lang.String |
getMenuName()
Name to display in the menu.
|
<R extends Relation<?>> |
getRelation() |
double |
getRequestedHeight()
Get the requested height.
|
double |
getRequestedWidth()
Get the requested width.
|
<R> R |
getResult() |
boolean |
has(VisualizationTask.RenderFlag f)
Update if any oft these flags is set.
|
boolean |
has(VisualizationTask.UpdateFlag f)
Update if any oft these bits is set.
|
int |
hashCode() |
boolean |
isTool()
Get the "tool" flag of the visualizer.
|
boolean |
isVisible()
Get the visibility flag.
|
int |
level()
Get the level (priority) of the visualization.
|
VisualizationTask |
level(int level)
Set the level (priority) of a visualization.
|
VisualizationTask |
requestSize(double w,
double h)
Set the size request.
|
VisualizationTask |
tool(boolean t)
Flag as tool visualizer.
|
java.lang.String |
toString() |
VisualizationTask |
visibility(boolean vis)
Init the default visibility of a task.
|
VisualizationTask |
with(VisualizationTask.RenderFlag f)
Set a task flag.
|
VisualizationTask |
with(VisualizationTask.UpdateFlag f)
Set (OR) the update flags.
|
private int level
private boolean visible
private int flags
private int updatemask
private boolean tool
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
private java.lang.String name
private VisFactory factory
private java.lang.Object result
private Relation<?> relation
private double reqwidth
private double reqheight
public VisualizationTask(VisFactory factory, java.lang.String name, java.lang.Object result, Relation<?> relation)
factory
- Factoryname
- Nameresult
- Resultrelation
- Relation to usepublic VisualizationTask with(VisualizationTask.UpdateFlag f)
f
- update flagthis
, for method chaining.public boolean has(VisualizationTask.UpdateFlag f)
f
- update flagtrue
if any bit is set.public VisualizationTask with(VisualizationTask.RenderFlag f)
f
- render flagthis
, for method chaining.public boolean has(VisualizationTask.RenderFlag f)
f
- render flagtrue
if any bit is set.public VisualizationTask level(int level)
level
- Levelthis
, for method chaining.public int level()
public VisualizationTask tool(boolean t)
t
- Tool flagthis
, for method chaining.public boolean isTool()
public VisualizationTask visibility(boolean vis)
vis
- Visibility.this
, for method chaining.public boolean isVisible()
public VisualizationTask requestSize(double w, double h)
w
- Widthh
- Heightthis
, for method chaining.public double getRequestedWidth()
public double getRequestedHeight()
public VisFactory getFactory()
public <R> R getResult()
public <R extends Relation<?>> R getRelation()
public java.lang.String getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
public int compareTo(VisualizationTask other)
compareTo
in interface java.lang.Comparable<VisualizationTask>
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.