本文整理了Java中com.mxgraph.view.mxGraph.getDropTarget()
方法的一些代码示例,展示了mxGraph.getDropTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getDropTarget()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getDropTarget
[英]Returns the given cell if it is a drop target for the given cells or the nearest ancestor that may be used as a drop target for the given cells. If the given array contains a swimlane and swimlaneNesting is false then this always returns null. If no cell is given, then the bottommost swimlane at the location of the given event is returned. This function should only be used if isDropEnabled returns true.
[中]如果给定单元格是丢弃目标,或者最近的祖先可能用作给定单元格的丢弃目标,则返回给定单元格。如果给定数组包含泳道,且泳道嵌套为false,则该数组始终返回null。如果没有给出单元格,则返回给定事件位置最底部的泳道。仅当IsDrupEnabled返回true时,才应使用此函数。
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the drop target for the given transferable and location.
*/
protected Object getDropTarget(mxGraphComponent graphComponent,
mxGraphTransferable gt)
{
Object[] cells = gt.getCells();
Object target = null;
// Finds the target cell at the given location and checks if the
// target is not already the parent of the first imported cell
if (location != null)
{
target = graphComponent.getGraph().getDropTarget(cells, location,
graphComponent.getCellAt(location.x, location.y));
if (cells.length > 0
&& graphComponent.getGraph().getModel().getParent(cells[0]) == target)
{
target = null;
}
}
return target;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the drop target for the given transferable and location.
*/
protected Object getDropTarget(mxGraphComponent graphComponent,
mxGraphTransferable gt)
{
Object[] cells = gt.getCells();
Object target = null;
// Finds the target cell at the given location and checks if the
// target is not already the parent of the first imported cell
if (location != null)
{
target = graphComponent.getGraph().getDropTarget(cells, location,
graphComponent.getCellAt(location.x, location.y));
if (cells.length > 0
&& graphComponent.getGraph().getModel().getParent(cells[0]) == target)
{
target = null;
}
}
return target;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
dropTarget = graph.getDropTarget(
new Object[] { vertex }, e.getPoint(),
graphComponent.getCellAt(e.getX(), e.getY()));
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
Object[] cells = (isLocal) ? graph.getSelectionCells()
: dragCells;
cell = graph.getDropTarget(cells, e.getPoint(), cell);
代码示例来源:origin: org.activecomponents.jadex/jadex-editor-bpmn
cell = graph.getDropTarget(cells, e.getPoint(), cell);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
dropTarget = graph.getDropTarget(
new Object[] { vertex }, e.getPoint(),
graphComponent.getCellAt(e.getX(), e.getY()));
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
Object[] cells = (isLocal) ? graph.getSelectionCells()
: dragCells;
cell = graph.getDropTarget(cells, e.getPoint(), cell);
内容来源于网络,如有侵权,请联系作者删除!