List of usage examples for org.eclipse.jface.action CoolBarManager CoolBarManager
public CoolBarManager(int style)
From source file:com.agynamix.platform.frontend.gui.ApplicationGUI.java
License:Open Source License
@Override protected CoolBarManager createCoolBarManager(int style) { CoolBarManager cbm = new CoolBarManager(style); cbm.add(createToolBarManager(SWT.FLAT)); // cbm.add(createSearchToolbar(SWT.FLAT)); return cbm;/*from w w w . j a v a 2 s . co m*/ }
From source file:com.amalto.workbench.editors.TdEditorToolBar.java
License:Open Source License
public TdEditorToolBar(Composite parent) { // create coolbar coolBar = new CoolBar(parent, SWT.FLAT); coolBarMgr = new CoolBarManager(coolBar); GridData gid = new GridData(); gid.horizontalAlignment = GridData.FILL; coolBar.setLayoutData(gid);//from w w w . j av a2 s .co m // initialize default actions defaultToolBarMgr = new ToolBarManager(SWT.FLAT | SWT.RIGHT); for (Action action : actions) { defaultToolBarMgr.add(action); } // add all toolbars to parent coolbar coolBarMgr.add(new ToolBarContributionItem(defaultToolBarMgr)); coolBarMgr.update(true); }
From source file:com.github.haixing_hu.swt.window.ApplicationWindowEx.java
License:Open Source License
/** * Returns a new cool bar manager for the window. * <p>/* w w w . j av a 2 s.c om*/ * Subclasses may override this method to customize the cool bar manager. * </p> * * @param style swt style bits used to create the Coolbar * * @return a cool bar manager * @since 3.0 * @see CoolBarManager#CoolBarManager(int) * @see CoolBar for style bits */ protected CoolBarManager createCoolBarManager(int style) { return new CoolBarManager(style); }
From source file:com.programmablefun.ide.App.java
License:Open Source License
private void createToolbar() { coolBarManager = new CoolBarManager(SWT.FLAT); final ToolBarManager vmToolBarManager = new ToolBarManager(SWT.FLAT | SWT.NO_FOCUS); coolBarManager.add(vmToolBarManager); vmToolBarManager.add(vmStartAction); vmToolBarManager.add(vmPauseAction); vmToolBarManager.add(vmResumeAction); vmToolBarManager.add(vmStopAction);/*from w w w . j av a 2s. co m*/ vmToolBarManager.add(vmStepIntoAction); vmToolBarManager.add(vmStepOverAction); final ToolBarManager helpToolBarManager = new ToolBarManager(SWT.FLAT | SWT.NO_FOCUS); coolBarManager.add(helpToolBarManager); helpToolBarManager.add(new ControlContribution("trace-code") { @Override protected Control createControl(Composite parent) { Button checkbox = new Button(parent, SWT.CHECK); checkbox.setText(Messages.get(Toolbar_FollowCodeExecution)); checkbox.setSelection(highlightLines); checkbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { highlightLines = checkbox.getSelection(); } }); return checkbox; } }); helpToolBarManager.add(helpAction); coolBarManager.createControl(shell); }
From source file:hydrograph.ui.dataviewer.window.DebugDataViewer.java
License:Apache License
/** * Create the coolbar manager./* w w w .j a v a2 s.c o m*/ * * @return the coolbar manager */ @Override protected CoolBarManager createCoolBarManager(int style) { CoolBarManager coolBarManager = new CoolBarManager(style); actionFactory = new ActionFactory(this); ToolBarManager toolBarManager = new ToolBarManager(); coolBarManager.add(toolBarManager); addtoolbarAction(toolBarManager, ImagePathConstant.DATA_VIEWER_EXPORT, actionFactory.getAction(ExportAction.class.getName())); /* * addtoolbarAction( toolBarManager, (XMLConfigUtil.CONFIG_FILES_PATH + ImagePathConstant.DATA_VIEWER_FIND), * actionFactory.getAction(FindAction.class.getName())); */ addtoolbarAction(toolBarManager, ImagePathConstant.DATA_VIEWER_RELOAD, actionFactory.getAction(ReloadAction.class.getName())); /* * addtoolbarAction( toolBarManager, (XMLConfigUtil.CONFIG_FILES_PATH + ImagePathConstant.DATA_VIEWER_FILTER), * actionFactory.getAction(FilterAction.class.getName())); */ addtoolbarAction(toolBarManager, ImagePathConstant.RESET_SORT, actionFactory.getAction(ResetSortAction.class.getName())); addtoolbarAction(toolBarManager, ImagePathConstant.TABLE_ICON, actionFactory.getAction(SelectColumnAction.class.getName())); addtoolbarAction(toolBarManager, ImagePathConstant.FIND_DATA, actionFactory.getAction(FindAction.class.getName())); addtoolbarAction(toolBarManager, ImagePathConstant.AUTO_ADJUST_COLUMNS, actionFactory.getAction(AutoExpandColumnsAction.class.getName())); dropDownAction = new Action("", SWT.DROP_DOWN) { @Override public void run() { tabFolder.showItem(tabFolder.getItem(0)); tabFolder.setSelection(0); } }; dropDownAction.setImageDescriptor(new ImageDescriptor() { @Override public ImageData getImageData() { return ImagePathConstant.DATA_VIEWER_SWITCH_VIEW.getImageFromRegistry().getImageData(); } }); dropDownAction.setMenuCreator(new ViewDataGridMenuCreator(actionFactory)); toolBarManager.add(dropDownAction); return coolBarManager; }
From source file:hydrograph.ui.graph.execution.tracking.windows.ExecutionTrackingConsole.java
License:Apache License
/** * Create the coolbar manager./*from ww w . java2 s .c o m*/ * * @param style the style * @return the coolbar manager */ @Override protected CoolBarManager createCoolBarManager(int style) { CoolBarManager coolBarManager = new CoolBarManager(style); actionFactory = new ActionFactory(this); ToolBarManager toolBarManager = new ToolBarManager(); coolBarManager.add(toolBarManager); addtoolbarAction(toolBarManager, ImagePathConstant.CLEAR_EXEC_TRACKING_CONSOLE, actionFactory.getAction(ClearConsoleAction.class.getName())); addtoolbarAction(toolBarManager, ImagePathConstant.CONSOLE_SCROLL_LOCK, actionFactory.getAction(ScrollLockAction.class.getName())); return coolBarManager; }
From source file:org.digimead.tabuddy.desktop.model.editor.ui.MainPartActiveView.java
License:Open Source License
/** * Create the composite.//from w w w .j ava2 s .c o m * * @param parent * @param style */ public MainPartActiveView(Composite parent, int style) { super(parent, style); setLayout(new GridLayout(3, false)); coolBarManager = new CoolBarManager(SWT.FLAT); CoolBar coolBar = coolBarManager.createControl(this); coolBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1)); sashForm = new SashForm(this, SWT.SMOOTH); sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1)); Label lblRoot = new Label(this, SWT.NONE); lblRoot.setText("Root element"); textRootElement = new StyledText(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.SINGLE); GridData gd_styledTextRootElement = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1); gd_styledTextRootElement.widthHint = 10; textRootElement.setLayoutData(gd_styledTextRootElement); Label lblActiveElement = new Label(this, SWT.NONE); lblActiveElement.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblActiveElement.setText("Active element"); textActiveElement = new StyledText(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.SINGLE); textActiveElement.setAlignment(SWT.CENTER); textActiveElement.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); btnResetActiveElement = new Button(this, SWT.NONE); btnResetActiveElement.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); btnResetActiveElement.setText(BUNDLE.getString("reset_text")); }
From source file:org.digimead.tabuddy.desktop.model.editor.ui.view.editor.ContentSkel.java
License:Open Source License
/** * Create the composite./* w ww. ja v a 2 s . co m*/ * * @param parent * @param style */ public ContentSkel(Composite parent, int style) { super(parent, style); GridLayout gridLayout = new GridLayout(3, false); setLayout(gridLayout); coolBarManager = new CoolBarManager(SWT.FLAT); CoolBar coolBar = coolBarManager.createControl(this); coolBar.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1)); sashForm = new SashForm(this, SWT.SMOOTH); sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1)); Label lblRoot = new Label(this, SWT.NONE); lblRoot.setText(LOGIC_BUNDLE.getString("rootElement_text")); textRootElement = new StyledText(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.SINGLE); GridData gd_styledTextRootElement = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1); gd_styledTextRootElement.widthHint = 10; textRootElement.setLayoutData(gd_styledTextRootElement); Label lblActiveElement = new Label(this, SWT.NONE); lblActiveElement.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblActiveElement.setText(LOGIC_BUNDLE.getString("activeElement_text")); textActiveElement = new StyledText(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.SINGLE); textActiveElement.setAlignment(SWT.CENTER); textActiveElement.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); btnResetActiveElement = new Button(this, SWT.NONE); btnResetActiveElement.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); btnResetActiveElement.setText(CORE_BUNDLE.getString("reset_text")); }
From source file:org.eclipse.net4j.buddies.internal.ui.views.FacilityPane.java
License:Open Source License
public FacilityPane(CollaborationsPane collaborationsPane, int style) { super(collaborationsPane, style); this.collaborationsPane = collaborationsPane; setLayout(new FacilityPaneLayout()); ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT | SWT.RIGHT | SWT.WRAP); fillCoolBar(toolBarManager);//from ww w . j a va2s . c om coolBarManager = new CoolBarManager(SWT.FLAT | SWT.RIGHT | SWT.WRAP); coolBarManager.add(toolBarManager); coolBarManager.setLockLayout(true); coolBarManager.createControl(this); coolBarManager.update(true); Composite composite = new Composite(this, SWT.NONE); composite.setLayout(UIUtil.createGridLayout(1)); control = createUI(composite); control.setLayoutData(UIUtil.createGridData()); }
From source file:org.eclipse.net4j.util.ui.widgets.CoolBarComposite.java
License:Open Source License
public CoolBarComposite(Composite parent, int style) { super(parent, style); setLayout(new CoolBarLayout()); toolBarManager = new ToolBarManager(SWT.FLAT | SWT.RIGHT | SWT.WRAP | SWT.HORIZONTAL); fillCoolBar(toolBarManager);/*from w w w . j a v a 2s . c o m*/ coolBarManager = new CoolBarManager(SWT.FLAT | SWT.HORIZONTAL); coolBarManager.add(toolBarManager); coolBarManager.setLockLayout(true); coolBarManager.createControl(this); coolBarManager.update(true); separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL); separator.setLayoutData(UIUtil.createGridData(true, false)); Composite composite = new Composite(this, SWT.NONE); composite.setLayout(UIUtil.createGridLayout(1)); clientControl = createUI(composite); clientControl.setLayoutData(UIUtil.createGridData()); }