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


Java Separator类代码示例

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


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

示例1: createPartControl

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
@Override
public void createPartControl ( final Composite parent )
{
    this.container = parent;
    createEditingDomain ();

    parent.setLayout ( new FillLayout () );
    this.viewer = new TreeViewer ( parent );
    this.viewer.setAutoExpandLevel ( 2 );

    this.viewer.setContentProvider ( new AdapterFactoryContentProvider ( this.factory ) );
    this.viewer.setLabelProvider ( new AdapterFactoryLabelProvider ( this.factory ) );

    createContextMenuFor ( this.viewer );

    new AdapterFactoryTreeEditor ( this.viewer.getTree (), this.factory );
    getViewSite ().setSelectionProvider ( this.viewer );

    attachSelectionService ();

    getViewSite ().getActionBars ().getMenuManager ().add ( new Separator ( "additions" ) );

    this.actionBarContributor.init ( getViewSite ().getActionBars () );
    this.actionBarContributor.setViewPart ( this );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:ChartConfiguratorView.java

示例2: addImageHyperlinkToolBarContribution

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
protected void addImageHyperlinkToolBarContribution(final IManagedForm headerForm,
        final IToolBarManager toolBarManager, final BaseControlContribution baseControlContribution,
        final DataModel<?, ?, ?> model) {

    final Separator separator = new Separator();
    toolBarManager.add(separator);
    toolBarManager.add(baseControlContribution);

    baseControlContribution.addControlDisposeListener(new DisposeListener() {

        @Override
        public void widgetDisposed(DisposeEvent e) {

            if (!model.isDestroyed()) {
                // Only do this clean up when the model destruction caused the widget disposal
                // WARNING: toolBarManager.update(true); throws a NullPointer if called during app exit.
                return;
            }

            toolBarManager.remove(separator);
            separator.dispose();
            toolBarManager.remove(baseControlContribution);
            toolBarManager.update(true);
        }
    });
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:27,代码来源:DataModelFormEditor.java

示例3: fillContextMenu

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
private void fillContextMenu(IMenuManager manager) {

        if (_TableViewer.getSelection().isEmpty()) {
            return;
        }

        manager.add(_NewZnodeAction);
        manager.add(new Separator());
        manager.add(_OpenAction);
        manager.add(new Separator());
        manager.add(_TableEditAction);
        manager.add(_TableEditChildrenAction);
        manager.add(new Separator());

        if (_DeleteAction.isEnabled()) {
            manager.add(_DeleteAction);
        }

        manager.add(new Separator());
        manager.add(_RefreshAction);
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:22,代码来源:ZnodeModelChildrenFormPage.java

示例4: fillContextMenu

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
@Override
public void fillContextMenu(IMenuManager manager) {

    ZooKeeperOpenAction openAction = getOpenAction();
    if (openAction != null && openAction.isEnabled()) {
        manager.add(openAction);
    }

    ZooKeeperDeleteAction deleteAction = getDeleteAction();
    if (deleteAction != null && deleteAction.isEnabled()) {
        manager.add(new Separator());
        manager.add(deleteAction);
    }

    RefreshAction refreshAction = getRefreshAction();
    if (refreshAction != null && refreshAction.isEnabled()) {
        manager.add(new Separator());
        manager.add(refreshAction);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:AbstractZooKeeperDataModelElementType.java

示例5: fillToolbar

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
private void fillToolbar ( final IContributionManager contributionManager )
{
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.MINUTES, "<1m>", "Scale to one minute" ) );
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.HOURS, "<1h>", "Scale to one hour" ) );
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.DAYS, "<1d>", "Scale to one day" ) );

    contributionManager.add ( new CenterNowAction () );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.DAYS, "<1d", "Move back 1 day" ) );
    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.HOURS, "<1h", "Move back 1 hour" ) );
    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.MINUTES, "<1m", "Move back 1 minute" ) );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.MINUTES, "1m>", "Move forward 1 minute" ) );
    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.HOURS, "1h>", "Move forward 1 hour" ) );
    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.DAYS, "1d>", "Move forward 1 day" ) );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new HelpAction () );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:25,代码来源:AbstractChartView.java

示例6: createContextMenuFor

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor ( StructuredViewer viewer )
{
    MenuManager contextMenu = new MenuManager ( "#PopUp" ); //$NON-NLS-1$
    contextMenu.add ( new Separator ( "additions" ) ); //$NON-NLS-1$
    contextMenu.setRemoveAllWhenShown ( true );
    contextMenu.addMenuListener ( this );
    Menu menu = contextMenu.createContextMenu ( viewer.getControl () );
    viewer.getControl ().setMenu ( menu );
    getSite ().registerContextMenu ( contextMenu, new UnwrappingSelectionProvider ( viewer ) );

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance (), LocalSelectionTransfer.getTransfer (), FileTransfer.getInstance () };
    viewer.addDragSupport ( dndOperations, transfers, new ViewerDragAdapter ( viewer ) );
    viewer.addDropSupport ( dndOperations, transfers, new EditingDomainViewerDropAdapter ( editingDomain, viewer ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:DetailViewEditor.java

示例7: createViewMenu

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
private void createViewMenu(MenuManager menuManager) {
	MenuManager viewMenu = createMenu(menuManager, MenuConstants.VIEW);
	menuManager.add(viewMenu);
	viewMenu.setVisible(true);

	if (actionFactory == null) {
		actionFactory = new ActionFactory(this);
	}
	
	viewMenu.add(actionFactory.getAction(GridViewAction.class.getName()));
	viewMenu.add(actionFactory.getAction(FormattedViewAction.class.getName()));
	viewMenu.add(actionFactory.getAction(UnformattedViewAction.class.getName()));
	viewMenu.add(new Separator());
	viewMenu.add(actionFactory.getAction(ReloadAction.class.getName()));
	viewDataPreferencesVO = getViewDataPreferencesFromPreferenceFile();
	viewMenu.add(actionFactory.getAction(PreferencesAction.class.getName()));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:18,代码来源:DebugDataViewer.java

示例8: createContextMenuFor

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor ( StructuredViewer viewer )
{
    MenuManager contextMenu = new MenuManager ( "#PopUp" );
    contextMenu.add ( new Separator ( "additions" ) );
    contextMenu.setRemoveAllWhenShown ( true );
    contextMenu.addMenuListener ( this );
    Menu menu = contextMenu.createContextMenu ( viewer.getControl () );
    viewer.getControl ().setMenu ( menu );
    getSite ().registerContextMenu ( contextMenu, new UnwrappingSelectionProvider ( viewer ) );

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance (), LocalSelectionTransfer.getTransfer (), FileTransfer.getInstance () };
    viewer.addDragSupport ( dndOperations, transfers, new ViewerDragAdapter ( viewer ) );
    viewer.addDropSupport ( dndOperations, transfers, new EditingDomainViewerDropAdapter ( editingDomain, viewer ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:MemoryEditor.java

示例9: addGlobalActions

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void addGlobalActions(IMenuManager menuManager) {
	menuManager.insertAfter("additions-end", new Separator("ui-actions"));
	menuManager.insertAfter("ui-actions", showPropertiesViewAction);

	refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());		
	menuManager.insertAfter("ui-actions", refreshViewerAction);

	super.addGlobalActions(menuManager);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:17,代码来源:SrmActionBarContributor.java

示例10: fillContextMenu

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
private void fillContextMenu(IMenuManager manager) {
	manager.add(actionRelaunch);
	manager.add(actionRelaunchFailed);
	manager.add(actionStop);
	manager.add(new Separator());
	manager.add(actionLock);
	manager.add(new Separator());
	// Other plug-ins can contribute their actions here
	manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:TestResultsView.java

示例11: fillLocalToolBar

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
private void fillLocalToolBar(IToolBarManager manager) {
	manager.add(actionShowHistory);
	manager.add(new Separator());
	manager.add(actionLock);
	manager.add(new Separator());
	manager.add(actionRelaunch);
	manager.add(actionRelaunchFailed);
	manager.add(actionStop);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:10,代码来源:TestResultsView.java

示例12: createContextMenuFor

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu= contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:NfpEditor.java

示例13: addGlobalActions

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   @Override
   protected void addGlobalActions(IMenuManager menuManager) {
	menuManager.insertAfter("additions-end", new Separator("ui-actions"));
	menuManager.insertAfter("ui-actions", showPropertiesViewAction);

	refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());		
	menuManager.insertAfter("ui-actions", refreshViewerAction);

	super.addGlobalActions(menuManager);
}
 
开发者ID:IncQueryLabs,项目名称:smarthome-cep-demonstrator,代码行数:17,代码来源:SmarthomeActionBarContributor.java

示例14: createContextMenuFor

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu= contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:IncQueryLabs,项目名称:smarthome-cep-demonstrator,代码行数:21,代码来源:SmarthomeEditor.java

示例15: createControl

import org.eclipse.jface.action.Separator; //导入依赖的package包/类
public void createControl(Composite parent) {
	super.createControl(parent);

	labelProvider = new BatchEditorOutlineLabelProvider();

	TreeViewer viewer = getTreeViewer();
	viewer.setContentProvider(contentProvider);
	viewer.addDoubleClickListener(this);
	viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
	viewer.addSelectionChangedListener(this);

	/* it can happen that input is already updated before control created */
	if (input != null) {
		viewer.setInput(input);
	}
	toggleLinkingAction = new ToggleLinkingAction();
	toggleLinkingAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);
	
	IActionBars actionBars = getSite().getActionBars();
	
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	toolBarManager.add(toggleLinkingAction);
	
	IMenuManager viewMenuManager = actionBars.getMenuManager();
	viewMenuManager.add(new Separator("EndFilterGroup")); //$NON-NLS-1$

	viewMenuManager.add(new Separator("treeGroup")); //$NON-NLS-1$
	viewMenuManager.add(toggleLinkingAction);
	
	
	/*
	 * when no input is set on init state - let the editor rebuild outline
	 * (async)
	 */
	if (input == null && editor != null) {
		editor.rebuildOutline();
	}

}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:40,代码来源:BatchEditorContentOutlinePage.java


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