• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GraphModelEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IndexStatistics类代码示例发布时间:2022-05-23
下一篇:
Java CopyProjectOperation类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap