本文整理了Java中com.mxgraph.view.mxGraph.isSplitEnabled()
方法的一些代码示例,展示了mxGraph.isSplitEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isSplitEnabled()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isSplitEnabled
[英]Affects the return values of isValidDropTarget to allow for edges as drop targets. The splitEdge method is called in mxGraphHandler if mxGraphComponent.isSplitEvent returns true for a given configuration.
[中]影响isValidDropTarget的返回值,以允许边作为放置目标。如果mxGraphComponent,则在mxGraphHandler中调用splitEdge方法。对于给定的配置,isSplitEvent返回true。
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is a valid drop target for the specified
* cells. This returns true if the cell is a swimlane, has children and is
* not collapsed, or if splitEnabled is true and isSplitTarget returns
* true for the given arguments
*
* @param cell Object that represents the possible drop target.
* @param cells Objects that are going to be dropped.
* @return Returns true if the cell is a valid drop target for the given
* cells.
*/
public boolean isValidDropTarget(Object cell, Object[] cells)
{
return cell != null
&& ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model
.isEdge(cell) && (isSwimlane(cell) || (model
.getChildCount(cell) > 0 && !isCellCollapsed(cell)))));
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is a valid drop target for the specified
* cells. This returns true if the cell is a swimlane, has children and is
* not collapsed, or if splitEnabled is true and isSplitTarget returns
* true for the given arguments
*
* @param cell Object that represents the possible drop target.
* @param cells Objects that are going to be dropped.
* @return Returns true if the cell is a valid drop target for the given
* cells.
*/
public boolean isValidDropTarget(Object cell, Object[] cells)
{
return cell != null
&& ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model
.isEdge(cell) && (isSwimlane(cell) || (model
.getChildCount(cell) > 0 && !isCellCollapsed(cell)))));
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Gets a drop target using getDropTarget and imports the cells using
* mxGraph.splitEdge or mxGraphComponent.importCells depending on the
* drop target and the return values of mxGraph.isSplitEnabled and
* mxGraph.isSplitTarget. Selects and returns the cells that have been
* imported.
*/
protected Object[] importCells(mxGraphComponent graphComponent,
mxGraphTransferable gt, double dx, double dy)
{
Object target = getDropTarget(graphComponent, gt);
mxGraph graph = graphComponent.getGraph();
Object[] cells = gt.getCells();
cells = graphComponent.getImportableCells(cells);
if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells))
{
graph.splitEdge(target, cells, dx, dy);
}
else
{
cells = graphComponent.importCells(cells, dx, dy, target, location);
graph.setSelectionCells(cells);
}
return cells;
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Gets a drop target using getDropTarget and imports the cells using
* mxGraph.splitEdge or mxGraphComponent.importCells depending on the
* drop target and the return values of mxGraph.isSplitEnabled and
* mxGraph.isSplitTarget. Selects and returns the cells that have been
* imported.
*/
protected Object[] importCells(mxGraphComponent graphComponent,
mxGraphTransferable gt, double dx, double dy)
{
Object target = getDropTarget(graphComponent, gt);
mxGraph graph = graphComponent.getGraph();
Object[] cells = gt.getCells();
cells = graphComponent.getImportableCells(cells);
if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells))
{
graph.splitEdge(target, cells, dx, dy);
}
else
{
cells = graphComponent.importCells(cells, dx, dy, target, location);
graph.setSelectionCells(cells);
}
return cells;
}
代码示例来源:origin: sc.fiji/TrackMate_
final Object target = ( targetState != null ) ? targetState.getCell() : null;
if ( lGraph.isSplitEnabled() && lGraph.isSplitTarget( target, cells ) )
代码示例来源:origin: fiji/TrackMate
final Object target = ( targetState != null ) ? targetState.getCell() : null;
if ( lGraph.isSplitEnabled() && lGraph.isSplitTarget( target, cells ) )
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
: null;
if (graph.isSplitEnabled()
&& graph.isSplitTarget(target, cells))
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
: null;
if (graph.isSplitEnabled()
&& graph.isSplitTarget(target, cells))
内容来源于网络,如有侵权,请联系作者删除!