|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization<NV> de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.SelectionToolCubeVisualization<NV>
NV
- Type of the NumberVector being visualized.public class SelectionToolCubeVisualization<NV extends NumberVector<NV,?>>
Tool-Visualization for the tool to select ranges
Nested Class Summary | |
---|---|
static class |
SelectionToolCubeVisualization.Factory<NV extends NumberVector<NV,?>>
Factory for tool visualizations for selecting ranges and the inclosed objects |
Field Summary | |
---|---|
private static String |
CSS_RANGEMARKER
Generic tag to indicate the type of element. |
private int |
dim
Dimension |
private Element |
etag
Element for the rectangle to add listeners |
protected static Logging |
logger
The logger for this class. |
private static String |
NAME
A short name characterizing this Visualizer. |
private Element |
rtag
Element for selection rectangle |
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization |
---|
proj, rel |
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization |
---|
context, layer, pendingRedraw, svgp, task |
Constructor Summary | |
---|---|
SelectionToolCubeVisualization(VisualizationTask task)
Constructor. |
Method Summary | |
---|---|
protected void |
addCSSClasses(SVGPlot svgp)
Adds the required CSS-Classes |
void |
contextChanged(ContextChangedEvent e)
Method called on context changes (e.g. projection changes). |
private void |
deleteChildren(Element container)
Delete the children of the element |
void |
destroy()
Destroy the visualization. |
boolean |
duringDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
Event evt,
boolean inside)
Method called during drags. |
boolean |
endDrag(org.w3c.dom.svg.SVGPoint startPoint,
org.w3c.dom.svg.SVGPoint dragPoint,
Event evt,
boolean inside)
Method called when a drag was ended. |
protected void |
redraw()
Perform a full redraw. |
boolean |
startDrag(org.w3c.dom.svg.SVGPoint startPoint,
Event evt)
Action to do on drag start. |
private void |
updateSelection(Projection proj,
org.w3c.dom.svg.SVGPoint p1,
org.w3c.dom.svg.SVGPoint p2)
Update the selection in the context. |
private void |
updateSelectionRectKoordinates(double x1,
double x2,
double y1,
double y2,
DoubleDoublePair[] ranges)
Set the selected ranges and the mask for the actual dimensions in the context |
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.P2DVisualization |
---|
setupCanvas |
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualization |
---|
getHeight, getLayer, getWidth, incrementalRedraw, resultAdded, resultChanged, resultRemoved, synchronizedRedraw, testRedraw |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logging logger
private static final String NAME
private static final String CSS_RANGEMARKER
private int dim
private Element rtag
private Element etag
Constructor Detail |
---|
public SelectionToolCubeVisualization(VisualizationTask task)
task
- TaskMethod Detail |
---|
public void destroy()
Visualization
destroy
in interface Visualization
destroy
in class AbstractVisualization
public void contextChanged(ContextChangedEvent e)
ContextChangeListener
contextChanged
in interface ContextChangeListener
contextChanged
in class AbstractVisualization
e
- Change eventprotected void redraw()
AbstractVisualization
redraw
in class AbstractVisualization
private void deleteChildren(Element container)
container
- SVG-Elementprivate void updateSelectionRectKoordinates(double x1, double x2, double y1, double y2, DoubleDoublePair[] ranges)
x1
- x-value of the first dimensionx2
- x-value of the second dimensiony1
- y-value of the first dimensiony2
- y-value of the second dimensionpublic boolean startDrag(org.w3c.dom.svg.SVGPoint startPoint, Event evt)
DragableArea.DragListener
startDrag
in interface DragableArea.DragListener
startPoint
- Point where the drag was started.evt
- The event object
true
to start the drag operationpublic boolean duringDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, Event evt, boolean inside)
DragableArea.DragListener
duringDrag
in interface DragableArea.DragListener
startPoint
- Drag starting pointdragPoint
- Drag end pointevt
- The event objectinside
- Inside the tracked element
true
to continue the dragpublic boolean endDrag(org.w3c.dom.svg.SVGPoint startPoint, org.w3c.dom.svg.SVGPoint dragPoint, Event evt, boolean inside)
DragableArea.DragListener
endDrag
in interface DragableArea.DragListener
startPoint
- Drag starting pointdragPoint
- Drag end pointevt
- The event objectinside
- Whether the end point was inside the area
true
to complete the dragprivate void updateSelection(Projection proj, org.w3c.dom.svg.SVGPoint p1, org.w3c.dom.svg.SVGPoint p2)
proj
- The projectionp1
- First Point of the selected rectanglep2
- Second Point of the selected rectangleprotected void addCSSClasses(SVGPlot svgp)
svgp
- SVG-Plot
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |