< prev index next >
application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/charts/IChartInfoVisitor.java
Print this page
@@ -38,11 +38,11 @@
import org.openjdk.jmc.common.IDisplayable;
/**
* Visitor interface to gather information about values displayed in charts, typically in the
- * vicinity of some coordinates. Suitable for tooltips, highlighting or snapping.
+ * vicinity of some coordinates. Suitable for tooltips, highlighting, hovering or snapping.
*/
public interface IChartInfoVisitor {
public abstract class Adapter implements IChartInfoVisitor {
@Override
@@ -53,10 +53,14 @@
@Override
public void leaveScope() {
}
@Override
+ public void hover(Object data) {
+ }
+
+ @Override
public void visit(IBucket bucket) {
}
@Override
public void visit(IPoint point) {
@@ -172,10 +176,20 @@
boolean enterScope(String context, boolean fullyShown);
void leaveScope();
/**
+ * Deliver supplementary information about the hovered rendered item to the Visitor.
+ * <p>
+ * To be used in conjunction with an rendered item's {@code infoAt()} to
+ * deliver supplementary information about the currently hovered object to the Visitor.
+ *
+ * @param data
+ */
+ void hover(Object data);
+
+ /**
* Visit a bucket in a histogram.
* <p>
* Note that the provided {@link IBucket} instance may be reused and thus cannot be directly
* saved by the visitor. Visitors wishing to delay processing of {@link IBucket}s, can do so by
* requesting an instance that will remain valid at least until the chart changes state, through
< prev index next >