当前位置: 首页>>代码示例>>Java>>正文


Java GraphicalEditPart.getModel方法代码示例

本文整理汇总了Java中org.eclipse.gef.GraphicalEditPart.getModel方法的典型用法代码示例。如果您正苦于以下问题:Java GraphicalEditPart.getModel方法的具体用法?Java GraphicalEditPart.getModel怎么用?Java GraphicalEditPart.getModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.gef.GraphicalEditPart的用法示例。


在下文中一共展示了GraphicalEditPart.getModel方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCommand

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
private Command createCommand(final List objects, final RGB rgb) {
    if (objects.isEmpty()) {
        return null;
    }

    if (!(objects.get(0) instanceof GraphicalEditPart)) {
        return null;
    }

    final CompoundCommand command = new CompoundCommand();

    for (int i = 0; i < objects.size(); i++) {
        final GraphicalEditPart part = (GraphicalEditPart) objects.get(i);
        final Object modelObject = part.getModel();

        if (modelObject instanceof ViewableModel) {
            command.add(new ChangeBackgroundColorCommand((ViewableModel) modelObject, rgb.red, rgb.green, rgb.blue));

        } else if (modelObject instanceof ConnectionElement) {
            command.add(new ChangeConnectionColorCommand((ConnectionElement) modelObject, rgb.red, rgb.green, rgb.blue));

        }
    }

    return command;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:27,代码来源:ChangeBackgroundColorAction.java

示例2: createCommand

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
private Command createCommand(List objects, RGB rgb) {
	if (objects.isEmpty()) {
		return null;
	}

	if (!(objects.get(0) instanceof GraphicalEditPart)) {
		return null;
	}

	CompoundCommand command = new CompoundCommand();

	for (int i = 0; i < objects.size(); i++) {
		GraphicalEditPart part = (GraphicalEditPart) objects.get(i);
		Object modelObject = part.getModel();
		
		if (modelObject instanceof ViewableModel) {
			command.add(new ChangeBackgroundColorCommand(
					(ViewableModel) modelObject, rgb.red, rgb.green,
					rgb.blue));
			
		} else if (modelObject instanceof ConnectionElement) {
			command.add(new ChangeConnectionColorCommand(
					(ConnectionElement) modelObject, rgb.red, rgb.green,
					rgb.blue));
		
		}
	}

	return command;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:31,代码来源:ChangeBackgroundColorAction.java

示例3: DirectEditorManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
/**
 * @param source
 * @param editorType
 * @param locator
 */
@SuppressWarnings("unchecked")
public DirectEditorManager(GraphicalEditPart source, java.lang.Class editorType, CellEditorLocator locator,
String stringValue) {
    super(source, editorType, locator);

    if (source.getModel() instanceof NotationNode) {
        model = (NotationNode) source.getModel();
    } else if (source.getModel() instanceof LabelNode) {
        model = (LabelNode) source.getModel();
    }

    this.stringValue = stringValue;
    this.editPart = source;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:20,代码来源:DirectEditorManager.java

示例4: LifeLineDirectEditorManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
/**
 * @param source
 * @param editorType
 * @param locator
 */
@SuppressWarnings("unchecked")
public LifeLineDirectEditorManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator) {
    super(source, editorType, locator);
    model = (NotationNode) source.getModel();

}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:12,代码来源:LifeLineDirectEditorManager.java

示例5: NoteEditManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
public NoteEditManager(final GraphicalEditPart source, final Class editorType, final CellEditorLocator locator) {
    super(source, editorType, locator);
    note = (Note) source.getModel();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:5,代码来源:NoteEditManager.java

示例6: NoteEditManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
public NoteEditManager(GraphicalEditPart source, Class editorType,
		CellEditorLocator locator) {
	super(source, editorType, locator);
	this.note = (Note) source.getModel();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:6,代码来源:NoteEditManager.java

示例7: NodeLabelDirectEditorManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
/**
 * @param source
 * @param editorType
 * @param locator
 */
@SuppressWarnings("unchecked")
public NodeLabelDirectEditorManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator) {
    super(source, editorType, locator);
    model = (AbstractNode) source.getModel();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:NodeLabelDirectEditorManager.java

示例8: WalkerNoteEditManager

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
public WalkerNoteEditManager(GraphicalEditPart source, Class<?> editorType, CellEditorLocator locator) {
    super(source, editorType, locator);
    this.note = (WalkerNote) source.getModel();
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:5,代码来源:WalkerNoteEditManager.java

示例9: isMarqueeSelectable

import org.eclipse.gef.GraphicalEditPart; //导入方法依赖的package包/类
/**
 * Decides whether the given edit part may potentially be included in the current marquee selection.
 * 
 * @param editPart
 *          the {@link EditPart} of interest
 * @return <code>true</code> if the given edit part may be included into the marquee selection, <code>false</code>
 *         otherwise
 */
protected boolean isMarqueeSelectable(GraphicalEditPart editPart) {
	return editPart.isSelectable() && FigureUtilities.isNotFullyClipped(editPart.getFigure()) && editPart.getModel() instanceof MGraphicElement;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:NotMovablePartDragTracker.java


注:本文中的org.eclipse.gef.GraphicalEditPart.getModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。