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


Java PaletteViewerProvider类代码示例

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


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

示例1: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
@Override
protected PaletteViewerProvider createPaletteViewerProvider() {
	final ELTGraphicalEditor editor = this;
	return new PaletteViewerProvider(getEditDomain()) {

		@Override
		protected void configurePaletteViewer(final PaletteViewer viewer) {
			super.configurePaletteViewer(viewer);
			
			paletteEditPartFactory = new CustomPaletteEditPartFactory(palatteTextColor,viewer.getControl().getBackground());
			viewer.setEditPartFactory(paletteEditPartFactory);
			
			
			// create a drag source listener for this palette viewer
			// together with an appropriate transfer drop target listener,
			// this will enable
			// model element creation by dragging a
			// CombinatedTemplateCreationEntries
			// from the palette into the editor
			// @see ShapesEditor#createTransferDropTargetListener()

			viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer));
			PaletteContainerListener paletteContainerListener = new PaletteContainerListener(viewer, getGraphicalViewer());
			viewer.getControl().addMouseListener(paletteContainerListener);
			viewer.getControl().addMouseTrackListener(paletteContainerListener);
			viewer.getControl().addMouseMoveListener(paletteContainerListener);
			setDefaultToolUndoRedoStatus();
		}

		@Override
		public PaletteViewer createPaletteViewer(Composite parent) {
			CustomPaletteViewer pViewer = new CustomPaletteViewer();
			CustomFigureCanvas figureCanvas=new CustomFigureCanvas(parent,pViewer.getLightweightSys(),pViewer, getPalettesRoot(),editor);
			pViewer.setFigureCanvas(figureCanvas);
			configurePaletteViewer(pViewer);
			hookPaletteViewer(pViewer);
			return pViewer;
		}
	};
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:41,代码来源:ELTGraphicalEditor.java

示例2: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
protected PaletteViewerProvider createPaletteViewerProvider() {
	PaletteViewerProvider paletteViewerProvider = new PaletteViewerProvider(getEditDomain()) {
		public PaletteViewer createPaletteViewer(Composite parent) {
			PaletteViewer paletteViewer = super.createPaletteViewer(parent);
			paletteViewer.getPaletteViewerPreferences().setUseLargeIcons(PaletteViewerPreferences.LAYOUT_LIST, !PALETTE_USE_ICON16);
			return paletteViewer;
		}

		protected void configurePaletteViewer(PaletteViewer viewer) {
			super.configurePaletteViewer(viewer);
			viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer));
		}
	};
	return paletteViewerProvider;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:16,代码来源:DbToolGefEditor.java

示例3: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
protected PaletteViewerProvider createPaletteViewerProvider() {
	return new PaletteViewerProvider(getEditDomain()) {
		protected void configurePaletteViewer(PaletteViewer viewer) {
			super.configurePaletteViewer(viewer);
			viewer.addDragSourceListener(new TemplateTransferDragSourceListener(
					viewer));
		}

	};
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:11,代码来源:GUIEditor.java

示例4: initializePalette

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
public void initializePalette(Composite composite){
	
	composite.setLayout(new FillLayout());
	
	PaletteViewerProvider paletteViewerProvider = getPaletteViewerProvider();
	paletteViewer = paletteViewerProvider.createPaletteViewer(composite);
	paletteViewer.setPaletteRoot(getPaletteRoot());
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:9,代码来源:OverviewDiagramComposite.java

示例5: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
protected PaletteViewerProvider createPaletteViewerProvider() {
	return new PaletteViewerProvider(getEditDomain()) {
		protected void configurePaletteViewer(PaletteViewer viewer) {
			super.configurePaletteViewer(viewer);
			// create a drag source listener for this palette viewer
			// together with an appropriate transfer drop target listener,
			// this will enable
			// model element creation by dragging a
			// CombinatedTemplateCreationEntries
			// from the palette into the editor
			// @see ShapesEditor#createTransferDropTargetListener()
			viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer));
		}
	};
}
 
开发者ID:lunifera,项目名称:lunifera-sharky-m2m,代码行数:16,代码来源:ShapesEditor.java

示例6: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
@Override
protected PaletteViewerProvider createPaletteViewerProvider() {
  // return super.createPaletteViewerProvider();
  return new PaletteTreeViewerProvider(diagramBehavior);
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:6,代码来源:TriqPaletteBehavior.java

示例7: getPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
public final PaletteViewerProvider getPaletteViewerProvider() {
	if (paletteProvider == null)
		paletteProvider = createPaletteViewerProvider();
	return paletteProvider;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:6,代码来源:OverviewDiagramComposite.java

示例8: getPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Returns the palette viewer provider that is used to create palettes for
 * the view and the flyout. Creates one if it doesn't already exist.
 * 
 * @return the PaletteViewerProvider that can be used to create
 *         PaletteViewers for this editor
 * @see #createPaletteViewerProvider()
 */
protected final PaletteViewerProvider getPaletteViewerProvider( )
{
	if ( provider == null )
		provider = createPaletteViewerProvider( );
	return provider;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:15,代码来源:GraphicalEditorWithFlyoutPalette.java

示例9: PaletteViewerPage

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param pvProvider
 *            the provider used to create the palette viewer
 */
public PaletteViewerPage(PaletteViewerProvider pvProvider) {
	Assert.isNotNull(pvProvider);
	provider = pvProvider;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:11,代码来源:PaletteViewerPage.java

示例10: createPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Creates a PaletteViewerProvider that will be used to create palettes for
 * the view and the flyout.
 * 
 * @return the palette provider
 */
protected PaletteViewerProvider createPaletteViewerProvider() {
	return new PaletteViewerProvider(getEditDomain());
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:GraphicalEditorWithFlyoutPalette.java

示例11: getPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Returns the palette viewer provider that is used to create palettes for
 * the view and the flyout. Creates one if it doesn't already exist.
 * 
 * @return the PaletteViewerProvider that can be used to create
 *         PaletteViewers for this editor
 * @see #createPaletteViewerProvider()
 */
protected final PaletteViewerProvider getPaletteViewerProvider() {
	if (provider == null)
		provider = createPaletteViewerProvider();
	return provider;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:14,代码来源:GraphicalEditorWithFlyoutPalette.java

示例12: CustomPalettePage

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param provider
 *            the provider used to create a PaletteViewer
 */
public CustomPalettePage(PaletteViewerProvider provider) {
	super(provider);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:GraphicalEditorWithFlyoutPalette.java

示例13: getPaletteViewerProvider

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Returns the palette viewer provider that is used to create palettes for
 * the view and the flyout. Creates one if it doesn't already exist.
 * 
 * @return the PaletteViewerProvider that can be used to create
 *         PaletteViewers for this editor
 * @see #createPaletteViewerProvider()
 */
protected final PaletteViewerProvider getPaletteViewerProvider() {
    if (provider == null)
        provider = createPaletteViewerProvider();
    return provider;
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:14,代码来源:AbstractGraphicalEditor.java

示例14: CustomPalettePage

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param ormPaletteViewerProvider
 *            the provider used to create a PaletteViewer
 */
public CustomPalettePage(PaletteViewerProvider ormPaletteViewerProvider) {
    super(ormPaletteViewerProvider);
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:10,代码来源:AbstractGraphicalEditor.java

示例15: CustomPalettePage

import org.eclipse.gef.ui.palette.PaletteViewerProvider; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param provider
 *            the provider used to create a PaletteViewer
 */
public CustomPalettePage( PaletteViewerProvider provider )
{
	super( provider );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:11,代码来源:GraphicalEditorWithFlyoutPalette.java


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