本文整理了Java中com.mxgraph.view.mxGraph.isCellDisconnectable()
方法的一些代码示例,展示了mxGraph.isCellDisconnectable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isCellDisconnectable()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isCellDisconnectable
[英]Returns true if the given cell is disconnectable from the source or target terminal. This returns for all given cells if does not return true for the given cell.
[中]如果给定单元格可与源或目标终端断开连接,则返回true。如果给定单元格未返回true,则返回所有给定单元格。
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
*
*/
public void mousePressed(MouseEvent e)
{
super.mousePressed(e);
boolean source = isSource(index);
if (source || isTarget(index))
{
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
Object terminal = model.getTerminal(state.getCell(), source);
if ((terminal == null && !graph.isTerminalPointMovable(
state.getCell(), source))
|| (terminal != null && !graph.isCellDisconnectable(
state.getCell(), terminal, source)))
{
first = null;
}
}
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
*
*/
public void mousePressed(MouseEvent e)
{
super.mousePressed(e);
boolean source = isSource(index);
if (source || isTarget(index))
{
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
Object terminal = model.getTerminal(state.getCell(), source);
if ((terminal == null && !graph.isTerminalPointMovable(
state.getCell(), source))
|| (terminal != null && !graph.isCellDisconnectable(
state.getCell(), terminal, source)))
{
first = null;
}
}
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
*
*/
protected Color getHandleFillColor(int index)
{
boolean source = isSource(index);
if (source || isTarget(index))
{
mxGraph graph = graphComponent.getGraph();
Object terminal = graph.getModel().getTerminal(state.getCell(),
source);
if (terminal == null
&& !graphComponent.getGraph().isTerminalPointMovable(
state.getCell(), source))
{
return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
}
else if (terminal != null)
{
return (graphComponent.getGraph().isCellDisconnectable(
state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR
: mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
}
}
return super.getHandleFillColor(index);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
*
*/
protected Color getHandleFillColor(int index)
{
boolean source = isSource(index);
if (source || isTarget(index))
{
mxGraph graph = graphComponent.getGraph();
Object terminal = graph.getModel().getTerminal(state.getCell(),
source);
if (terminal == null
&& !graphComponent.getGraph().isTerminalPointMovable(
state.getCell(), source))
{
return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
}
else if (terminal != null)
{
return (graphComponent.getGraph().isCellDisconnectable(
state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR
: mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
}
}
return super.getHandleFillColor(index);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
&& isCellDisconnectable(cells[i], src,
true))
&& isCellDisconnectable(cells[i], trg,
false))
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
&& isCellDisconnectable(cells[i], src,
true))
&& isCellDisconnectable(cells[i], trg,
false))
内容来源于网络,如有侵权,请联系作者删除!