private void updateSectionTitle(int size) { if (errorStatus != null) { Label label = part.getToolkit().createLabel(section, null); label.setImage(PlatformUI.getWorkbench().getSharedImages().getImage( ISharedImages.IMG_OBJS_ERROR_TSK)); section.setTextClient(label); section.setText(Messages.EngineResultSection_sectionTitle_error); } else { section.setTextClient(null); } if (size == 1) section.setText(NLS.bind(Messages.EngineResultSection_sectionTitle_hit, desc.getLabel(), "" //$NON-NLS-1$ + hits.size())); else if (size <= HITS_PER_PAGE) section.setText(NLS.bind(Messages.EngineResultSection_sectionTitle_hits, desc.getLabel(), "" + hits.size())); //$NON-NLS-1$ else { int from = (resultOffset + 1); int to = (resultOffset + HITS_PER_PAGE); to = Math.min(to, size); section.setText(NLS.bind(Messages.EngineResultSection_sectionTitle_hitsRange, new String[] { desc.getLabel(), "" + from, "" + to, "" + size })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } }
private void createScopeSet(Section section, FormToolkit toolkit) { scopeSetLink = toolkit.createHyperlink(section, null, SWT.NULL); scopeSetLink.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { doChangeScopeSet(); } }); scopeSetLink.setToolTipText(Messages.FederatedSearchPart_changeScopeSet); section.setTextClient(scopeSetLink); ScopeSet active = scopeSetManager.getActiveSet(); setActiveScopeSet(active); }
private ToolBarManager createSectionToolbar(Section section) { Object object = section.getData("toolbarmanager"); //$NON-NLS-1$ if (object instanceof ToolBarManager) { return (ToolBarManager) object; } ToolBarManager manager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = manager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); section.setTextClient(toolbar); section.setData("toolbarmanager", manager); //$NON-NLS-1$ return manager; }
private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(fImportViewer, PDEUIMessages.RequiresSection_sortAlpha, null, null, this); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
/** * @param section * @param toolkit */ private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add collapse action to the tool bar fCollapseAction = new CollapseAction(fTreeViewer, PDEUIMessages.ExtensionsPage_collapseAll); toolBarManager.add(fCollapseAction); toolBarManager.update(true); section.setTextClient(toolbar); }
private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(getTablePart().getTableViewer(), PDEUIMessages.RequiresSection_sortAlpha, null, null, this); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); fNewPluginAction = new NewPluginAction(); fNewFragmentAction = new NewFragmentAction(); toolBarManager.add(fNewPluginAction); toolBarManager.add(fNewFragmentAction); toolBarManager.update(true); section.setTextClient(toolbar); }
/** * @param section * @param toolkit */ private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(getStructuredViewerPart().getViewer(), PDEUIMessages.FeatureEditor_RequiresSection_sortAlpha, ListUtil.NAME_COMPARATOR, null, null); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
/** * @param section * @param toolkit */ private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(getStructuredViewerPart().getViewer(), PDEUIMessages.FeatureEditor_PluginSection_sortAlpha, ListUtil.NAME_COMPARATOR, null, null); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
/** * @param section * @param toolkit */ private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); // Add sort action to the tool bar fSortAction = new SortAction(getStructuredViewerPart().getViewer(), PDEUIMessages.FeatureEditor_IncludedFeatures_sortAlpha, ListUtil.NAME_COMPARATOR, null, this); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
/** * @param section * @param toolkit */ private void createSectionToolbar(Section section, FormToolkit toolkit) { ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(section); final Cursor handCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_HAND); toolbar.setCursor(handCursor); fNewFeatureAction = new NewFeatureAction(); toolBarManager.add(fNewFeatureAction); fSortAction = new SortAction(fFeatureTable, PDEUIMessages.Product_FeatureSection_sortAlpha, null, null, this); toolBarManager.add(fSortAction); toolBarManager.update(true); section.setTextClient(toolbar); }
fToolkit.adapt(toolbar, true, true); toolbar.setBackground(null); section.setTextClient(toolbar); toolBarManager.update(true);
section.setTextClient(toolbarComposite); } else {
/** * Creates tool bar for creation of new rules. * */ private void createToolbar() { MenuAction createNewRuleMenu = new MenuAction(); createNewRuleMenu.setImageDescriptor(InspectIT.getDefault().getImageDescriptor(InspectITImages.IMG_ADD)); createNewRuleMenu.setToolTipText("Add new rule"); for (MatchingRuleType type : MatchingRuleType.values()) { createNewRuleMenu.addAction(new AddMatchingRuleCompositeAction(type)); } toolBarManager = new ToolBarManager(); final ToolBar toolbar = toolBarManager.createControl(getSection()); toolBarManager.add(createNewRuleMenu); toolBarManager.update(true); createNewRuleMenu.setRunTask(new MenuAction.ToolbarDropDownTask(toolbar)); getSection().setTextClient(toolbar); }
section.setTextClient(toolbar);
tbm.add ( new AddAction ( map, form.getShell () ) ); tbm.add ( new RemoveAction ( map, ViewersObservables.observeMultiSelection ( viewer ) ) ); section.setTextClient ( tbm.createControl ( section ) );
tbm.add ( new AddAction ( map, form.getShell () ) ); tbm.add ( new RemoveAction ( map, ViewersObservables.observeMultiSelection ( viewer ) ) ); section.setTextClient ( tbm.createControl ( section ) );
section.setTextClient(toolbar); toolBarManager.update(true); createToolbarAction.setRunTask(new MenuAction.ToolbarDropDownTask(toolbar));
filesSection.setTextClient(filesToolbar);
messageSection.setTextClient(headerArea);