本文整理汇总了Java中org.jgraph.event.GraphModelEvent类的典型用法代码示例。如果您正苦于以下问题:Java GraphModelEvent类的具体用法?Java GraphModelEvent怎么用?Java GraphModelEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphModelEvent类属于org.jgraph.event包,在下文中一共展示了GraphModelEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
/**
* Refreshes the status bar and the errors, if the text on any of the cells
* has changed.
*/
@Override
public void graphChanged(GraphModelEvent e) {
boolean changed = e.getChange()
.getInserted() != null
|| e.getChange()
.getRemoved() != null
|| e.getChange()
.getAttributes() != null;
if (changed) {
updateStatus();
}
}
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:17,代码来源:GraphEditorTab.java
示例2: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
/**
* Updates the label list according to the change event.
*/
@Override
public void graphChanged(GraphModelEvent e) {
boolean changed = false;
GraphModelEvent.GraphModelChange change = e.getChange();
changed = processEdit(change, changed);
if (changed) {
updateTree();
}
}
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:13,代码来源:LabelTree.java
示例3: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
/**
* Updates the label list according to the change event.
*/
@Override
public void graphChanged(GraphModelEvent e) {
if (isModelStale()) {
updateModel();
} else {
super.graphChanged(e);
}
}
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:12,代码来源:TypeTree.java
示例4: TBoard
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
/**
* Creates a new <code>TBoard</code> with the specified initial
* <code>model</code>.
*
* @param model The specified initial <code>model</code>
*/
public TBoard(TBoardModel model) {
super();
// Set the Tolerance to 2 Pixel
setTolerance(2);
// Allows resize
setSizeable(true);
// Allows control-drag
setCloneable(false);
// Does not allow connections
setConnectable(false);
setDisconnectable(false);
setBendable(false);
// Does not allow in-place editing
setEditable(false);
// Set anti-aliased
setAntiAliased(true);
// Set layout cache
setGraphLayoutCache(new TBoardLayoutCache());
// Set model
model.addGraphModelListener(new GraphModelListener() {
public void graphChanged(GraphModelEvent e) {
// Check if model size has been modified and update the board
// minimum size
Map attributes = (Map)e.getChange().getAttributes();
if (attributes != null)
attributes = (Map)attributes.get(getModel());
if (attributes != null)
if (attributes.containsKey(TBoardConstants.SIZE))
setMinimumSize(TBoardConstants.getSize(attributes));
// Fire change
fireBoardChange();
}
});
setModel(model);
// Set minimum size
setMinimumSize(TBoardConstants.getSize(getAttributes(null)));
}
开发者ID:ProgettoRadis,项目名称:ArasuiteIta,代码行数:46,代码来源:TBoard.java
示例5: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
@Override
public void graphChanged(GraphModelEvent e) {
// listen for vertex moves to store the new position in DataBean
for (Object o : e.getChange().getChanged()) {
if (o instanceof GraphVertex) {
GraphVertex vertex = (GraphVertex) o;
DataBean bean = getBean(vertex);
if (bean != null) {
bean.setPosition(vertex.getX(), vertex.getY());
}
}
}
}
开发者ID:chipster,项目名称:chipster,代码行数:14,代码来源:MicroarrayGraph.java
示例6: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
@Override
public void graphChanged(GraphModelEvent e) {
refresh();
}
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:5,代码来源:AspectJGraph.java
示例7: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
@Override
public void graphChanged(GraphModelEvent e) {
getUI().cancelEdgeAdding();
}
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:5,代码来源:JGraph.java
示例8: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
public void graphChanged(GraphModelEvent e) {
editor.updateHistoryButtons();
// Update the editor ordered list
boolean updateCellList = false;
// Check if the ordered browseable component list has been modified
Map attributes = (Map)e.getChange().getAttributes();
Map modelAttributes;
if (attributes != null) {
// Check the model attributes
modelAttributes = (Map)attributes.get(getBoard().getModel());
if (modelAttributes != null)
if (modelAttributes.containsKey(TBoardConstants.ORDERED_CELL_LIST))
updateCellList = true;
// Check the component attributes
// For each modified component
Iterator componentIterator = attributes.entrySet().iterator();
while (componentIterator.hasNext()) {
Map.Entry entry = (Map.Entry)componentIterator.next();
if (entry.getKey() instanceof TComponent) {
TComponent component = (TComponent)entry.getKey();
AttributeMap componentAttributes = (AttributeMap)entry.getValue();
if (TBoardConstants.isBrowseable(component.getAttributes()) &&
componentAttributes.containsKey(TBoardConstants.ID))
updateCellList = true;
}
}
}
// Check if any grid or cell has been removed
Object[] removed = e.getChange().getRemoved();
if (removed != null)
for (int i = 0; i < removed.length && !updateCellList; i++) {
if (TBoardConstants.isBrowseable(((TComponent)removed[i])
.getAttributes()))
updateCellList = true;
}
if (updateCellList)
editor.updateCellOrderList();
editor.updateUI();
}
开发者ID:ProgettoRadis,项目名称:ArasuiteIta,代码行数:47,代码来源:TBoardContainer.java
示例9: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
public void graphChanged(GraphModelEvent e) {
reload();
}
开发者ID:robertocapuano,项目名称:jink,代码行数:4,代码来源:GraphTreeModel.java
示例10: graphChanged
import org.jgraph.event.GraphModelEvent; //导入依赖的package包/类
public void graphChanged(GraphModelEvent e) {
update();
repaint();
}
开发者ID:tdbear,项目名称:microba,代码行数:6,代码来源:Birdview.java
注:本文中的org.jgraph.event.GraphModelEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论