Search this API

y.view
Class HitInfoFactories.BackwardCompatibilityHitInfoFactory

java.lang.Object
  extended by y.view.HitInfoFactories.BackwardCompatibilityHitInfoFactory
All Implemented Interfaces:
HitInfoFactory
Enclosing class:
HitInfoFactories

public static class HitInfoFactories.BackwardCompatibilityHitInfoFactory
extends java.lang.Object
implements HitInfoFactory

This hit info factory implements the pre-yFiles for Java 2.8 hit info behavior. If there is a query for just the first hit of any type, then in addition to the drawing order the type precedence port, bend, edge label, edge, node, node label is used.

See Also:
HitInfo.HitInfo(Graph2DView, double, double, boolean, int, int, int, int, int, int, int)
 

Constructor Summary
HitInfoFactories.BackwardCompatibilityHitInfoFactory(Graph2DView view)
           
 
Method Summary
 HitInfo createHitInfo(double x, double y, int types, boolean firstHitOnly)
          Creates a hit information object for a given type of graph elements at the specified location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HitInfoFactories.BackwardCompatibilityHitInfoFactory

public HitInfoFactories.BackwardCompatibilityHitInfoFactory(Graph2DView view)
Method Detail

createHitInfo

public HitInfo createHitInfo(double x,
                             double y,
                             int types,
                             boolean firstHitOnly)
Description copied from interface: HitInfoFactory
Creates a hit information object for a given type of graph elements at the specified location. A hit info provides information on the graph elements at the given world coordinates.

Specified by:
createHitInfo in interface HitInfoFactory
Parameters:
x - x world coordinate
y - y world coordinate
types - a bitwise combination of the type masks provided by Graph2DTraversal or Graph2DTraversal.ALL.
firstHitOnly - if true only the hit info only considers the first graph element at the specified coordinates
Returns:
a hit info

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.