本文整理了Java中com.mxgraph.view.mxGraph.isOrthogonal()
方法的一些代码示例,展示了mxGraph.isOrthogonal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isOrthogonal()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isOrthogonal
[英]Returns true if perimeter points should be computed such that the resulting edge has only horizontal or vertical segments.
[中]如果应计算周长点,使生成的边只有水平或垂直线段,则返回true。
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Updates the absolute terminal point in the given state for the given
* start and end state, where start is the source if source is true.
*
* @param edge
* Cell state whose terminal point should be updated.
* @param start
* Cell state for the terminal on "this" side of the edge.
* @param end
* Cell state for the terminal on the other side of the edge.
* @param source
* Boolean indicating if start is the source terminal state.
*/
public void updateFloatingTerminalPoint(mxCellState edge,
mxCellState start, mxCellState end, boolean source)
{
start = getTerminalPort(edge, start, source);
mxPoint next = getNextPoint(edge, end, source);
double border = mxUtils.getDouble(edge.getStyle(),
mxConstants.STYLE_PERIMETER_SPACING);
border += mxUtils.getDouble(edge.getStyle(),
(source) ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING
: mxConstants.STYLE_TARGET_PERIMETER_SPACING);
mxPoint pt = getPerimeterPoint(start, next, graph.isOrthogonal(edge),
border);
edge.setAbsoluteTerminalPoint(pt, source);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Updates the absolute terminal point in the given state for the given
* start and end state, where start is the source if source is true.
*
* @param edge
* Cell state whose terminal point should be updated.
* @param start
* Cell state for the terminal on "this" side of the edge.
* @param end
* Cell state for the terminal on the other side of the edge.
* @param source
* Boolean indicating if start is the source terminal state.
*/
public void updateFloatingTerminalPoint(mxCellState edge,
mxCellState start, mxCellState end, boolean source)
{
start = getTerminalPort(edge, start, source);
mxPoint next = getNextPoint(edge, end, source);
double border = mxUtils.getDouble(edge.getStyle(),
mxConstants.STYLE_PERIMETER_SPACING);
border += mxUtils.getDouble(edge.getStyle(),
(source) ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING
: mxConstants.STYLE_TARGET_PERIMETER_SPACING);
mxPoint pt = getPerimeterPoint(start, next, graph.isOrthogonal(edge),
border);
edge.setAbsoluteTerminalPoint(pt, source);
}
内容来源于网络,如有侵权,请联系作者删除!