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


Java CreationFactory类代码示例

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


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

示例1: getFactory

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
@Override
protected CreationFactory getFactory(Object template) {
	if (template instanceof Element) {
		//how this happened???
		return new TitaniumUIElementFactory(
				(Class<? extends Element>) template.getClass(), diagram);
		
	} else if (template instanceof Class){
		if (Element.class.isAssignableFrom((Class<?>) template)){
			return new TitaniumUIElementFactory(
					(Class<? extends Element>) template, diagram);
		}
		
	}
	throw new IllegalArgumentException("Can't create factory for " + template);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:17,代码来源:MyTemplateTransferDropTargetListener.java

示例2: getFactory

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * This function is called to return a factory for our create request. A factory is returned depending on the state of the tool.
 * 
 * (non-Javadoc)
 * 
 * @see org.eclipse.gef.tools.CreationTool#getFactory()
 */
protected CreationFactory getFactory() {
    ModelCreationFactory factory;
    switch (state) {
    case ENDPOINT:
        factory = new ModelCreationFactory(getURNspec(), EndPoint.class);
        break;
    case STARTPOINT:
        factory = new ModelCreationFactory(getURNspec(), StartPoint.class);
        break;
    case NOSELECT:
        factory = new ModelCreationFactory(getURNspec(), StartPoint.class);
        break;
    case CONNECTION:
        factory = new ModelCreationFactory(getURNspec(), EmptyPoint.class);
        break;
    default:
        factory = new ModelCreationFactory(getURNspec(), StartPoint.class);
    }

    return factory;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:29,代码来源:PathTool.java

示例3: createTransferDropTargetListener

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * Create a transfer drop target listener. When using a
 * CombinedTemplateCreationEntry tool in the palette, this will enable model
 * element creation by dragging from the palette.
 * 
 * @see #createPaletteViewerProvider()
 */
public TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		@Override
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class) template);
		}
	};
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:ELTGraphicalEditor.java

示例4: createTransferDropTargetListener

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
private TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class<?>) template);
		}
	};
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:8,代码来源:DbToolGefEditor.java

示例5: applyProperty

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.tools.AbstractTool#applyProperty(java.lang.Object,
 *      java.lang.Object)
 */
protected void applyProperty(Object key, Object value) {
	if (PROPERTY_CREATION_FACTORY.equals(key)) {
		if (value instanceof CreationFactory)
			setFactory((CreationFactory) value);
		return;
	}
	super.applyProperty(key, value);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:13,代码来源:CreationTool.java

示例6: applyProperty

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
protected void applyProperty(Object key, Object value) {
	if (CreationTool.PROPERTY_CREATION_FACTORY.equals(key)) {
		if (value instanceof CreationFactory)
			setFactory((CreationFactory) value);
		return;
	}
	super.applyProperty(key, value);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:9,代码来源:AbstractConnectionCreationTool.java

示例7: setFactory

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
@Override
public void setFactory(CreationFactory factory)
{
    if(factory instanceof InstallOptionsTemplateCreationFactory) {
        super.setFactory(factory);
    }
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:8,代码来源:InstallOptionsTemplateCreationTool.java

示例8: PaletteEntryCreationTool

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
public PaletteEntryCreationTool( CreationFactory factory,
		PaletteEntryExtension paletteEntry )
{
	super( factory, null );
	this.factory = factory;
	setFactory( factory );
	this.paletteEntry = paletteEntry;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:9,代码来源:CommandCombinedTemplateCreationEntry.java

示例9: getFactory

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
protected CreationFactory getFactory( Object template )
{
	if ( handleValidateDrag( template ) )
	{
		if ( template instanceof String )
		{
			return new ReportElementFactory( template );
		}
		return new ReportElementFactory( getSingleTransferData( template ),
				template );
	}
	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:ReportTemplateTransferDropTargetListener.java

示例10: ReportCreationTool

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param factory
 * @param preHandle
 */
public ReportCreationTool( CreationFactory factory,
		AbstractToolHandleExtends preHandle )
{
	super( factory );
	this.preHandle = preHandle;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:13,代码来源:ReportCreationTool.java

示例11: getFactory

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
public CreationFactory getFactory(Object template) {
    setEnablementDeterminedByCommand(true);

    if (template instanceof CreationFactory)
        return (CreationFactory) template;
    else
        return new ModelCreationFactory(urn, (Class) template);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:9,代码来源:UrnDropTargetListener.java

示例12: createTransferDropTargetListener

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * Create a transfer drop target listener. When using a
 * CombinedTemplateCreationEntry tool in the palette, this will enable model
 * element creation by dragging from the palette.
 * 
 * @see #createPaletteViewerProvider()
 */
private TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class) template);
		}
	};
}
 
开发者ID:lunifera,项目名称:lunifera-sharky-m2m,代码行数:15,代码来源:ShapesEditor.java

示例13: ConnectionCreationToolWithAdditionalInformation

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * @param factory
 */
public ConnectionCreationToolWithAdditionalInformation(CreationFactory factory) {
    super(factory);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:7,代码来源:ConnectionCreationToolWithAdditionalInformation.java

示例14: LifeLineCreationToolWithAdditionalInformation

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
/**
 * @param factory
 */
public LifeLineCreationToolWithAdditionalInformation(CreationFactory factory) {
    super(factory);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:7,代码来源:LifeLineCreationToolWithAdditionalInformation.java

示例15: JDCreationTool

import org.eclipse.gef.requests.CreationFactory; //导入依赖的package包/类
public JDCreationTool(CreationFactory aFactory) {
	super(aFactory);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:4,代码来源:JDCreationTool.java


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