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


Java CreateConnectionRequest.getNewObject方法代码示例

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


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

示例1: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
@Override
protected Command getConnectionCreateCommand(final CreateConnectionRequest request) {
    final Object object = request.getNewObject();

    if (object instanceof CommentConnection) {
        final CommentConnection connection = (CommentConnection) object;

        final CreateConnectionCommand command = new CreateCommentConnectionCommand(connection);

        command.setSource(request.getTargetEditPart());
        request.setStartCommand(command);

        return command;
    }

    return null;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:18,代码来源:ConnectionGraphicalNodeEditPolicy.java

示例2: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
	Object object = request.getNewObject();

	if (object instanceof CommentConnection) {
		CommentConnection connection = (CommentConnection) object;

		CreateConnectionCommand command = new CreateCommentConnectionCommand(
				this.diagram, connection);

		command.setSource(request.getTargetEditPart());
		request.setStartCommand(command);

		return command;
	}

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

示例3: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
	Object object = request.getNewObject();

	if (object instanceof CommentConnection) {
		CommentConnection connection = (CommentConnection) object;

		CreateConnectionCommand command = new CreateCommentConnectionCommand(
				connection);

		command.setSource(request.getTargetEditPart());
		request.setStartCommand(command);

		return command;
	}

	return null;
}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:19,代码来源:ConnectionGraphicalNodeEditPolicy.java

示例4: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
	Table source = (Table) getHost().getModel();
	Connection c = (Connection) request.getNewObject();
	ConnectionCreateCommand cmd = new ConnectionCreateCommand(source, c);
	request.setStartCommand(cmd);
	return cmd;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:9,代码来源:BaseGraphicalNodeEditPolicy.java

示例5: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
	DwFeatureModelWrapped featureModel = ((DwFeatureEditPart)getHost()).getFeatureModel();
	
	DwParentChildConnection connection = (DwParentChildConnection)request.getNewObject();
	connection.setModel(featureModel);
	
	DwParentChildConnectionCreateCommand command = new DwParentChildConnectionCreateCommand();
	command.setSource((DwFeatureWrapped)getHost().getModel());
	command.setConnection(connection);
	command.setFeatureModel(featureModel);
	
	request.setStartCommand(command);
	return command;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:16,代码来源:DwFeatureGraphicalNodeEditPolicy.java

示例6: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
/**
 * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
 */
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {

    CreateConnectionCommand command = new CreateConnectionCommand();
    AbstractConnection connection = (AbstractConnection) request.getNewObject();

    AbstractView objNode = (AbstractNode) (getHost().getModel());

    if (objNode instanceof AbstractConnection) {
        return null;
    }
    AbstractNode abstractNode = (AbstractNode) objNode;

    if (!UMLPolicyManager.isConnectableFromSource(connection.getRelationType(), abstractNode.getNodeType())) {
        return null;
    }

    ConnectionAnchor sourceAnchor = ((NodeEditPart) getHost()).getSourceConnectionAnchor(request);
    command.setSourceAnchorPoint(sourceAnchor.getLocation(request.getLocation()));

    command.setConnection(connection);
    command.setSource((AbstractNode) getHost().getModel());
    request.setStartCommand(command);
    request.setSourceEditPart(getHost());

    return command;

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

示例7: getConnectionCompleteCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
	if(request.getNewObject() instanceof ColumnConnection)
	{
    CreateConnectionCommand command = (CreateConnectionCommand) request.getStartCommand();
    FunctionColumnModel target=(FunctionColumnModel) getHost().getModel();
    ColumnConnection conn=new ColumnConnection();
    command.setConnection(conn);
    command.setTarget(target);
    return command;
	}
	return null;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:13,代码来源:ColumnGraphicalNodeEditPolicy.java

示例8: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
	if(request.getNewObject() instanceof ColumnConnection)
	{	
    CreateConnectionCommand command = new CreateConnectionCommand();
    FunctionColumnModel source=(FunctionColumnModel) getHost().getModel();
    command.setSource(source);
    request.setStartCommand(command);
    return command;
	}
	return null;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:12,代码来源:ColumnGraphicalNodeEditPolicy.java

示例9: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
/**
 * @return a {@link CreateElementLinkCommand}
 * 
 * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
 */
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    if (request.getNewObject() instanceof ElementLink) {
        IntentionalElementRef source = (IntentionalElementRef) getHost().getModel();
        CreateElementLinkCommand cmd = new CreateElementLinkCommand(source.getDiagram().getUrndefinition().getUrnspec(), source.getDef(),
                (ElementLink) request.getNewObject());
        request.setStartCommand(cmd);
        return cmd;
    }
    return null;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:16,代码来源:IntentionalElementNodeEditPolicy.java

示例10: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
/**
 * @return a {@link AddBeliefLinkCommand}
 * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
 */
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    Belief source = (Belief) getHost().getModel();
    if (source.getSucc().size() == 0 && (request.getNewObject() instanceof BeliefLink)) {
        AddBeliefLinkCommand cmd = new AddBeliefLinkCommand((GRLGraph) source.getDiagram(), source, (BeliefLink) request.getNewObject());
        request.setStartCommand(cmd);
        return cmd;
    }
    return null;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:14,代码来源:BeliefNodeEditPolicy.java

示例11: getConnectionCreateCommand

import org.eclipse.gef.requests.CreateConnectionRequest; //导入方法依赖的package包/类
/**
 * @return a {@link CreateKPIModelLinkCommand}
 * 
 * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
 */
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    if (request.getNewObject() instanceof KPIModelLink) {
        KPIInformationElementRef source = (KPIInformationElementRef) getHost().getModel();
        CreateKPIModelLinkCommand cmd = new CreateKPIModelLinkCommand(source.getDiagram().getUrndefinition().getUrnspec(), source.getDef(),
                (KPIModelLink) request.getNewObject());
        request.setStartCommand(cmd);

        return cmd;
    }
    return null;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:17,代码来源:KPIInformationElementNodeEditPolicy.java


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