本文整理了Java中com.mxgraph.view.mxGraph.getCellStyle()
方法的一些代码示例,展示了mxGraph.getCellStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getCellStyle()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getCellStyle
[英]Returns an array of key, value pairs representing the cell style for the given cell. If no string is defined in the model that specifies the style, then the default style for the cell is returned or , if not style can be found.
[中]返回表示给定单元格样式的键值对数组。如果在指定样式的模型中没有定义字符串,则返回单元格的默认样式,如果没有,则可以找到样式。
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Creates and returns a cell state for the given cell.
*
* @param cell
* Cell for which a new state should be created.
* @return Returns a new state for the given cell.
*/
public mxCellState createState(Object cell)
{
return new mxCellState(this, cell, graph.getCellStyle(cell));
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Creates and returns a cell state for the given cell.
*
* @param cell
* Cell for which a new state should be created.
* @return Returns a new state for the given cell.
*/
public mxCellState createState(Object cell)
{
return new mxCellState(this, cell, graph.getCellStyle(cell));
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the constant true. This does not use the cloneable field to
* return a value for a given cell, it is simply a hook for subclassers
* to disallow cloning of individual cells.
*/
public boolean isCellCloneable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsCloneable()
&& mxUtils.isTrue(style, mxConstants.STYLE_CLONEABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the constant true. This does not use the cloneable field to
* return a value for a given cell, it is simply a hook for subclassers
* to disallow cloning of individual cells.
*/
public boolean isCellCloneable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsCloneable()
&& mxUtils.isTrue(style, mxConstants.STYLE_CLONEABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is movable. This implementation always
* returns true.
*
* @param cell Cell whose movable state should be returned.
* @return Returns true if the cell is movable.
*/
public boolean isCellDeletable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsDeletable()
&& mxUtils.isTrue(style, mxConstants.STYLE_DELETABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the size of the given cell should automatically be
* updated after a change of the label. This implementation returns
* autoSize for all given cells or checks if the cell style does specify
* mxConstants.STYLE_AUTOSIZE to be 1.
*
* @param cell Cell that should be resized.
* @return Returns true if the size of the given cell should be updated.
*/
public boolean isAutoSizeCell(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isAutoSizeCells()
|| mxUtils.isTrue(style, mxConstants.STYLE_AUTOSIZE, false);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is expandable. This implementation
* returns true if the cell has at least one child and its style
* does not specify mxConstants.STYLE_FOLDABLE to be 0.
*
* @param cell <mxCell> whose expandable state should be returned.
* @return Returns true if the given cell is expandable.
*/
public boolean isCellFoldable(Object cell, boolean collapse)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return model.getChildCount(cell) > 0
&& mxUtils.isTrue(style, mxConstants.STYLE_FOLDABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is movable. This implementation always
* returns true.
*
* @param cell Cell whose movable state should be returned.
* @return Returns true if the cell is movable.
*/
public boolean isCellDeletable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsDeletable()
&& mxUtils.isTrue(style, mxConstants.STYLE_DELETABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the size of the given cell should automatically be
* updated after a change of the label. This implementation returns
* autoSize for all given cells or checks if the cell style does specify
* mxConstants.STYLE_AUTOSIZE to be 1.
*
* @param cell Cell that should be resized.
* @return Returns true if the size of the given cell should be updated.
*/
public boolean isAutoSizeCell(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isAutoSizeCells()
|| mxUtils.isTrue(style, mxConstants.STYLE_AUTOSIZE, false);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is expandable. This implementation
* returns true if the cell has at least one child and its style
* does not specify mxConstants.STYLE_FOLDABLE to be 0.
*
* @param cell <mxCell> whose expandable state should be returned.
* @return Returns true if the given cell is expandable.
*/
public boolean isCellFoldable(Object cell, boolean collapse)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return model.getChildCount(cell) > 0
&& mxUtils.isTrue(style, mxConstants.STYLE_FOLDABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is movable. This implementation returns editable.
*
* @param cell Cell whose editable state should be returned.
* @return Returns true if the cell is editable.
*/
public boolean isCellEditable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsEditable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is movable. This implementation returns editable.
*
* @param cell Cell whose editable state should be returned.
* @return Returns true if the cell is editable.
*/
public boolean isCellEditable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsEditable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is movable. This implementation
* returns movable.
*
* @param cell Cell whose movable state should be returned.
* @return Returns true if the cell is movable.
*/
public boolean isCellMovable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsMovable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_MOVABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is movable. This implementation
* returns movable.
*
* @param cell Cell whose movable state should be returned.
* @return Returns true if the cell is movable.
*/
public boolean isCellMovable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsMovable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_MOVABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is resizable. This implementation returns
* cellsSizable for all cells.
*
* @param cell Cell whose resizable state should be returned.
* @return Returns true if the cell is sizable.
*/
public boolean isCellResizable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsResizable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_RESIZABLE, true);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is bendable. This implementation returns
* bendable. This is used in mxElbowEdgeHandler to determine if the middle
* handle should be shown.
*
* @param cell Cell whose bendable state should be returned.
* @return Returns true if the cell is bendable.
*/
public boolean isCellBendable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsBendable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_BENDABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is resizable. This implementation returns
* cellsSizable for all cells.
*
* @param cell Cell whose resizable state should be returned.
* @return Returns true if the cell is sizable.
*/
public boolean isCellResizable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsResizable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_RESIZABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is bendable. This implementation returns
* bendable. This is used in mxElbowEdgeHandler to determine if the middle
* handle should be shown.
*
* @param cell Cell whose bendable state should be returned.
* @return Returns true if the cell is bendable.
*/
public boolean isCellBendable(Object cell)
{
mxCellState state = view.getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: getCellStyle(cell);
return isCellsBendable() && !isCellLocked(cell)
&& mxUtils.isTrue(style, mxConstants.STYLE_BENDABLE, true);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is horizontal. If the given cell is not a
* swimlane, then the <horizontal> value is returned.
*/
protected boolean isCellHorizontal(Object cell)
{
if (graph.isSwimlane(cell))
{
mxCellState state = graph.getView().getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: graph.getCellStyle(cell);
return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true);
}
return !isHorizontal();
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is horizontal. If the given cell is not a
* swimlane, then the <horizontal> value is returned.
*/
protected boolean isCellHorizontal(Object cell)
{
if (graph.isSwimlane(cell))
{
mxCellState state = graph.getView().getState(cell);
Map<String, Object> style = (state != null) ? state.getStyle()
: graph.getCellStyle(cell);
return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true);
}
return !isHorizontal();
}
内容来源于网络,如有侵权,请联系作者删除!