當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。