• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EditPartListener类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.eclipse.gef.EditPartListener的典型用法代码示例。如果您正苦于以下问题:Java EditPartListener类的具体用法?Java EditPartListener怎么用?Java EditPartListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

EditPartListener类属于org.eclipse.gef包,在下文中一共展示了EditPartListener类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: activate

点赞 3

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
@Override
public void activate(){
	super.activate();
	addEditPartListener(new EditPartListener.Stub(){
		@Override
		public void selectedStateChanged(EditPart part){
			ClassElementEditPart c = (ClassElementEditPart)part;
			if(c.getSelected() != EditPart.SELECTED_NONE){
				((ClassDiagramEditPart)c.getParent()).addToSelection(c);
			}
			else{
				((ClassDiagramEditPart)c.getParent()).removeFromSelection(c);
			}
		}
	});
}
 

开发者ID:SERESLab,
项目名称:OnionUmlVisualization,
代码行数:17,
代码来源:ClassElementEditPart.java

示例2: addSelectionListener

点赞 2

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Adds an EditPartListener to the host to observe selection/focus changes.
 */
protected void addSelectionListener() {
	selectionListener = new EditPartListener.Stub() {
		public void selectedStateChanged(EditPart part) {
			setSelectedState(part.getSelected());
			setFocus(part.hasFocus());
		}
	};
	getHost().addEditPartListener(selectionListener);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:13,
代码来源:SelectionEditPolicy.java

示例3: createListener

点赞 2

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * creates the EditPartListener for observing when children are added to the
 * host.
 * 
 * @return EditPartListener
 */
protected EditPartListener createListener() {
	return new EditPartListener.Stub() {
		public void childAdded(EditPart child, int index) {
			decorateChild(child);
		}
	};
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:14,
代码来源:LayoutEditPolicy.java

示例4: fireActivated

点赞 2

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Notifies <code>EditPartListeners</code> that this EditPart has been
 * activated.
 */
protected void fireActivated() {
	Iterator listeners = getEventListeners(EditPartListener.class);
	while (listeners.hasNext())
		((EditPartListener) listeners.next()).partActivated(this);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:10,
代码来源:AbstractEditPart.java

示例5: fireDeactivated

点赞 2

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Notifies <code>EditPartListeners </code> that this EditPart has been
 * deactivated.
 */
protected void fireDeactivated() {
	Iterator listeners = getEventListeners(EditPartListener.class);
	while (listeners.hasNext())
		((EditPartListener) listeners.next()).partDeactivated(this);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:10,
代码来源:AbstractEditPart.java

示例6: fireSelectionChanged

点赞 2

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Notifies <code>EditPartListeners</code> that the selection has changed.
 */
protected void fireSelectionChanged() {
	Iterator listeners = getEventListeners(EditPartListener.class);
	while (listeners.hasNext())
		((EditPartListener) listeners.next()).selectedStateChanged(this);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:9,
代码来源:AbstractEditPart.java

示例7: setListener

点赞 1

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Sets the EditPartListener used to decorate new children. If the listener
 * is currently set, it will be unhooked. If the new value is not
 * <code>null</code>, it will be hooked.
 * <P>
 * The listener must be remembered in case this EditPolicy is removed from
 * the host and replaced with another LayoutEditPolicy.
 * 
 * @param listener
 *            <code>null</code> or the listener.
 */
protected void setListener(EditPartListener listener) {
	if (this.listener != null)
		getHost().removeEditPartListener(this.listener);
	this.listener = listener;
	if (this.listener != null)
		getHost().addEditPartListener(this.listener);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:19,
代码来源:LayoutEditPolicy.java

示例8: addEditPartListener

点赞 1

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Adds an EditPartListener.
 * 
 * @param listener
 *            the listener
 */
public void addEditPartListener(EditPartListener listener) {
	eventListeners.addListener(EditPartListener.class, listener);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:10,
代码来源:AbstractEditPart.java

示例9: fireChildAdded

点赞 1

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Notifies <code>EditPartListeners</code> that a child has been added.
 * 
 * @param child
 *            <code>EditPart</code> being added as child.
 * @param index
 *            Position child is being added into.
 */
protected void fireChildAdded(EditPart child, int index) {
	Iterator listeners = getEventListeners(EditPartListener.class);
	while (listeners.hasNext())
		((EditPartListener) listeners.next()).childAdded(child, index);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:14,
代码来源:AbstractEditPart.java

示例10: fireRemovingChild

点赞 1

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * Notifies <code>EditPartListeners</code> that a child is being removed.
 * 
 * @param child
 *            <code>EditPart</code> being removed.
 * @param index
 *            Position of the child in children list.
 */
protected void fireRemovingChild(EditPart child, int index) {
	Iterator listeners = getEventListeners(EditPartListener.class);
	while (listeners.hasNext())
		((EditPartListener) listeners.next()).removingChild(child, index);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:14,
代码来源:AbstractEditPart.java

示例11: removeEditPartListener

点赞 1

import org.eclipse.gef.EditPartListener; //导入依赖的package包/类
/**
 * No reason to override
 * 
 * @see EditPart#removeEditPartListener(EditPartListener)
 */
public void removeEditPartListener(EditPartListener listener) {
	eventListeners.removeListener(EditPartListener.class, listener);
}
 

开发者ID:ghillairet,
项目名称:gef-gwt,
代码行数:9,
代码来源:AbstractEditPart.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)