Search in sources :

Example 1 with ObjectWrapper

use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent.ObjectWrapper in project binnavi by google.

the class ZyGraphDragAndDropSupport method handleDragOver.

private void handleDragOver(final Point location) {
    final DragOverState state = getDragOverState(graph, location);
    final NaviNode node = state.getNode();
    if (node != null && state.getDragOverObject() != null) {
        final Object object = state.getDragOverObject().getObject();
        if (object instanceof INaviOperandTreeNode && ((INaviOperandTreeNode) object).getType() == ExpressionType.REGISTER) {
            final int row = node.positionToRow(graph.getView().toWorldCoordY(location.y) - node.getY());
            if (row != -1) {
                clearHighlighting(node);
                lastRow = row;
                final ObjectWrapper wrapper = state.getDragOverObject();
                node.setHighlighting(HIGHLIGHTING_LEVEL, row, wrapper.getStart(), wrapper.getLength(), HIGHLIGHTING_COLOR);
            }
        }
    } else {
        clearHighlighting(null);
    }
}
Also used : INaviOperandTreeNode(com.google.security.zynamics.binnavi.disassembly.INaviOperandTreeNode) ObjectWrapper(com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent.ObjectWrapper) Point(java.awt.Point)

Aggregations

INaviOperandTreeNode (com.google.security.zynamics.binnavi.disassembly.INaviOperandTreeNode)1 ObjectWrapper (com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent.ObjectWrapper)1 Point (java.awt.Point)1