/** This method initializes tabFolder */ private void createTabFolder() { tabFolder = new TabFolder(shell, SWT.NONE); createScanningTab(); TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText(Labels.getLabel("title.preferences.scanning")); tabItem.setControl(scanningTab); scanningTabItem = tabItem; createPortsTab(); tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText(Labels.getLabel("title.preferences.ports")); tabItem.setControl(portsTab); portsTabItem = tabItem; createDisplayTab(); tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText(Labels.getLabel("title.preferences.display")); tabItem.setControl(displayTab); // createFetchersTab(); // tabItem = new TabItem(tabFolder, SWT.NONE); // tabItem.setText(Labels.getLabel("title.preferences.fetchers")); // tabItem.setControl(fetchersTab); tabFolder.pack(); }
@Override protected Control createDialogArea(Composite parent) { Control comp = super.createDialogArea(parent); generalInfoComposite = new RuleGeneralInfoTabComposite(tabFolder); TabItem generalTabItem = new TabItem(tabFolder, SWT.NONE); generalTabItem.setText("General"); generalTabItem.setControl(generalInfoComposite); ruleKeyComposite = new ProxyRuleKeyTabComposite(tabFolder); TabItem keyTabItem = new TabItem(tabFolder, SWT.NONE); keyTabItem.setText("Rule Key"); keyTabItem.setControl(ruleKeyComposite); actionsComposite = new RuleActionsTabComposite(tabFolder); TabItem actionsTabItem = new TabItem(tabFolder, SWT.NONE); actionsTabItem.setText("Actions"); actionsTabItem.setControl(actionsComposite); interceptorsComposite = new RuleInterceptorTabComposite(tabFolder); TabItem interceptorsTabItem = new TabItem(tabFolder, SWT.NONE); interceptorsTabItem.setText("Interceptors"); interceptorsTabItem.setControl(interceptorsComposite); return comp; }
private void createContents() { TabFolder tabFolder = new TabFolder(this, SWT.NONE); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); CommonSelectorComposite commonCompositeRef = new CommonSelectorComposite(tabFolder, SWT.NONE, false, true); commonCompositeRef.getTreeViewer().getTree().setLinesVisible(false); commonCompositeRef.getTreeViewer().getTree().setHeaderVisible(false); commonCompositeRef.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); commonCompositeRef.setDataSet(this.dataset); commonCompositeRef.getTreeViewer().expandAll(); TabItem tabItem1 = new TabItem(tabFolder, SWT.NONE); tabItem1.setText("Ref"); tabItem1.setControl(commonCompositeRef); if (hasLabel) { CommonSelectorComposite commonCompositeLabel = new CommonSelectorComposite(tabFolder, SWT.NONE, false, true); commonCompositeLabel.getTreeViewer().getTree().setLinesVisible(false); commonCompositeLabel.getTreeViewer().getTree().setHeaderVisible(false); commonCompositeLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); commonCompositeLabel.setDataSet(this.dataset); commonCompositeLabel.getTreeViewer().expandAll(); TabItem tabItem2 = new TabItem(tabFolder, SWT.NONE); tabItem2.setText("Label"); tabItem2.setControl(commonCompositeLabel); } tabFolder.addSelectionListener( new SelectionListener() { public void widgetDefaultSelected(SelectionEvent event) { selectedRef = "Ref".equals(((TabItem) event.item).getText()); } public void widgetSelected(SelectionEvent event) { selectedRef = "Ref".equals(((TabItem) event.item).getText()); } }); Composite composite = new Composite(this, SWT.NONE); GridData gd_composite = new GridData(SWT.FILL, SWT.FILL, true, false); composite.setLayoutData(gd_composite); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; gridLayout.marginWidth = 0; gridLayout.marginHeight = 0; composite.setLayout(gridLayout); Label label = new Label(composite, SWT.NONE); label.setText("属性值"); displayText = new Text(composite, SWT.BORDER); displayText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); displayText.setEditable(false); displayText.setBackground(displayText.getParent().getBackground()); displayText.setText(this.propertyItem.getValue()); }
private void createComposite( int style, Project project, ESModelElementIdToEObjectMapping<ESModelElementId> idToEObjectMapping, boolean showRootNodes) { setLayout(new GridLayout()); folder = new TabFolder(this, style); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(folder); tabComposite = new Composite(folder, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(tabComposite); tabTreeViewer = new TreeViewer(tabComposite, SWT.H_SCROLL | SWT.V_SCROLL); GridDataFactory.fillDefaults().grab(true, true).applyTo(tabTreeViewer.getControl()); contentProvider = new SCMContentProvider(idToEObjectMapping); contentProvider.setShowRootNodes(showRootNodes); SCMLabelProvider detailedLabelProvider = new SCMLabelProvider(project); detailedLabelProvider.setChangePackageVisualizationHelper( new ChangePackageVisualizationHelper(idToEObjectMapping)); tabTreeViewer.setContentProvider(contentProvider); tabTreeViewer.setLabelProvider(detailedLabelProvider); tabTreeViewer.expandToLevel(1); TabItem opTab = new TabItem(folder, style); opTab.setText("Operations"); opTab.setControl(tabComposite); }
/** * Save this WaveTab´s audio data to the given file using the given AudioFileOutputStream * * @param f The file to save to (will be set as new source file) * @param out The AudioFileOutputStream to use for writing * @throws NotFinishedException If the save operation could not be completed * @throws NotReadyException If the audio data could not be provided */ protected void saveFile(AudioInputStream in, File f, AudioFileOutputStream out) throws NotFinishedException, NotReadyException { if (!in.getFormat().equals(out.getFormat())) in = AudioSystem.getAudioInputStream(out.getFormat(), in); ProgressThread saver = new SaveFileThread(in, out, (int) in.getFrameLength(), in.getFormat().getFrameSize()); ProgressMonitor progress = new ProgressMonitor( editor.getShell(), saver, "Saving Audio File...", "Saving " + f.getAbsolutePath()); try { // Save Audio File progress.start(); } catch (NotFinishedException e) { try { out.close(); } catch (IOException e1) { e1.printStackTrace(); } throw e; } try { out.close(); } catch (IOException e1) { e1.printStackTrace(); throw new NotFinishedException(e1.getMessage()); } source = f; savePeak(); tabItem.setText(source.getName()); modified = false; }
protected void handleToolChanged() { try { // create dynamicTab loadDynamicArea(); if (launchConfigurationWorkingCopy == null) { if (launchConfiguration.isWorkingCopy()) { launchConfigurationWorkingCopy = (ILaunchConfigurationWorkingCopy) launchConfiguration; } else { launchConfigurationWorkingCopy = launchConfiguration.getWorkingCopy(); } } // setDefaults called on this tab so call on dynamicTab OR // user changed tool, not just restoring state if (initDefaults) { dynamicTab.setDefaults(launchConfigurationWorkingCopy); } initDefaults = false; dynamicTab.initializeFrom(launchConfigurationWorkingCopy); // change name of tool TabItem toolTab.setText(dynamicTab.getName()); optionsFolder.layout(true); // adjust minimum size for ScrolledComposite recomputeSize(); } catch (CoreException e) { ex = e; } }
public void createControl(Composite parent) { Composite c = new Composite(parent, SWT.NONE); c.setLayout(new FillLayout()); folder = new TabFolder(c, SWT.TOP); simpleItem = new TabItem(folder, SWT.NONE); simpleItem.setText(Messages.DefaultConnectionWizardPage_Simple); simpleItem.setControl(createSimpleConnectionPage(folder)); advancedItem = new TabItem(folder, SWT.NONE); advancedItem.setText(Messages.DefaultConnectionWizardPage_Advanced); advancedItem.setControl(createAdvancedConnectionPage(folder)); setControl(c); addListeners(); validate(); }
/** * Creates an instance of a ControlExample embedded inside the supplied parent Composite. * * @param parent the container of the example */ public ControlExample(Composite parent) { initResources(); tabFolder = new TabFolder(parent, SWT.NONE); tabs = createTabs(); for (Tab tab : tabs) { TabItem item = new TabItem(tabFolder, SWT.NONE); item.setText(tab.getTabText()); item.setControl(tab.createTabFolderPage(tabFolder)); item.setData(tab); } /* Workaround: if the tab folder is wider than the screen, * Mac platforms clip instead of somehow scrolling the tab items. * We try to recover some width by using shorter tab names. */ Point size = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT); Rectangle monitorArea = parent.getMonitor().getClientArea(); boolean isMac = SWT.getPlatform().equals("cocoa"); if (size.x > monitorArea.width && isMac) { TabItem[] tabItems = tabFolder.getItems(); for (int i = 0; i < tabItems.length; i++) { tabItems[i].setText(tabs[i].getShortTabText()); } } startup = false; }
private void createSchemaGui(final TabFolder tabFolder, final SchemaTree schemaTreeModel) { final TabItem dbStructureTabItem = new TabItem(tabFolder, SWT.NULL); dbStructureTabItem.setText("Database Structure"); final Tree tree = new Tree(tabFolder, SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL); tree.setHeaderVisible(true); tree.setLinesVisible(true); tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); // create the jface wrapper final TreeViewer treeViewer = new TreeViewer(tree); final String[] schemaColumnNames = new String[] {"Name", "Object", "Type", "Schema"}; final int[] schemaColumnWidths = new int[] {200, 100, 150, 800}; final int[] schemaColumnAlignments = new int[] {SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT}; for (int i = 0; i < schemaColumnNames.length; i++) { final TreeColumn treeColumn = new TreeColumn(tree, schemaColumnAlignments[i]); treeColumn.setText(schemaColumnNames[i]); treeColumn.pack(); treeColumn.setWidth(schemaColumnWidths[i]); } final SchemaContentProvider schemaContentProvider = new SchemaContentProvider(); treeViewer.setContentProvider(schemaContentProvider); treeViewer.setLabelProvider(new SchemaLabelProvider()); treeViewer.setInput(schemaTreeModel.getRoot()); // Add table viewer to database structure tab item dbStructureTabItem.setControl(tree); }
/** * {@inheritDoc} This method should be called after <code>setConfiguration</code> has been invoked * on this object. */ @Override protected void setup() { final TabFolder _tabFolder = new TabFolder(parent, SWT.TOP | SWT.BORDER); final TabItem _sliceInfoTab = new TabItem(_tabFolder, SWT.NONE); final Composite _sliceInfoTabComposite = new Composite(_tabFolder, SWT.NONE); setupSliceInfoUI(_sliceInfoTabComposite); _sliceInfoTabComposite.pack(); _sliceInfoTab.setControl(_sliceInfoTabComposite); _sliceInfoTab.setText("Slice"); _sliceInfoTab.setToolTipText("Configure slice properties."); final TabItem _dependenceDATab = new TabItem(_tabFolder, SWT.NONE); final Composite _dependenceDAComposite = new Composite(_tabFolder, SWT.NONE); setupDependenceDepUI(_dependenceDAComposite); _dependenceDAComposite.pack(); _dependenceDATab.setControl(_dependenceDAComposite); _dependenceDATab.setText("General Dependence"); _dependenceDATab.setToolTipText("Configure control and synchronization dependences."); final TabItem _divergenceDATab = new TabItem(_tabFolder, SWT.NONE); final Composite _divergenceDAComposite = new Composite(_tabFolder, SWT.NONE); setupDivergenceDepUI(_divergenceDAComposite); _divergenceDAComposite.pack(); _divergenceDATab.setControl(_divergenceDAComposite); _divergenceDATab.setText("Divergence"); _divergenceDATab.setToolTipText("Configure divergence dependences."); final TabItem _interferenceDATab = new TabItem(_tabFolder, SWT.NONE); final Composite _interferenceDATabComposite = new Composite(_tabFolder, SWT.NONE); setupInteferenceDepUI(_interferenceDATabComposite); _interferenceDATabComposite.pack(); _interferenceDATab.setControl(_interferenceDATabComposite); _interferenceDATab.setText("Intereference"); _interferenceDATab.setToolTipText("Configure interference dependences."); final TabItem _readyDATab = new TabItem(_tabFolder, SWT.NONE); final Composite _readyDATabComposite = new Composite(_tabFolder, SWT.NONE); setupReadyDepUI(_readyDATabComposite); _readyDATabComposite.pack(); _readyDATab.setControl(_readyDATabComposite); _readyDATab.setText("Ready"); _readyDATab.setToolTipText("Configure ready dependences."); _tabFolder.pack(); parent.pack(); }
public static void labelTab() { TabItem tab = new TabItem(folder, SWT.CLOSE); tab.setText("A Label"); // Text on the tab tab.setToolTipText("A simple label"); Label label = new Label(folder, SWT.CENTER); label.setText("Label text"); tab.setControl(label); }
/** * Set the source file for this WaveTab * * @param f The source file to set * @param waveForm The WaveForm corresponding to the file */ protected void setInput(File f, AudioFileWaveForm waveForm) { tabItem.setText(f.getName()); source = f; cutList.removeModificationListener(this); cutList = new CutList(new AudioFileSource(f, waveForm)); cutList.addModificationListener(this); waveDisplay.redraw(); }
/** * Initializes a tab for the given part. Sets the text, icon, tool tip, etc. This will also be * called whenever a relevant property changes in the part to reflect those changes in the tab. * Subclasses may override to change the appearance of tabs for a particular part. * * @param tabItem tab for the part * @param part the part being displayed */ protected void initTab(TabItem tabItem, IPresentablePart part) { tabItem.setText(part.getName()); tabItem.setToolTipText(part.getTitleToolTip()); Image tabImage = part.getTitleImage(); if (tabImage != tabItem.getImage()) { tabItem.setImage(tabImage); } }
/** * Creates a new editor for the specified plot. * * @param parent the parent. * @param style the style. * @param plot the plot. */ public SWTPlotEditor(Composite parent, int style, Plot plot) { super(parent, style); FillLayout layout = new FillLayout(); layout.marginHeight = layout.marginWidth = 4; this.setLayout(layout); Group plotType = new Group(this, SWT.NONE); FillLayout plotTypeLayout = new FillLayout(); plotTypeLayout.marginHeight = plotTypeLayout.marginWidth = 4; plotType.setLayout(plotTypeLayout); plotType.setText(plot.getPlotType() + localizationResources.getString(":")); TabFolder tabs = new TabFolder(plotType, SWT.NONE); // deal with domain axis TabItem item1 = new TabItem(tabs, SWT.NONE); item1.setText(localizationResources.getString("Domain_Axis")); Axis domainAxis = null; if (plot instanceof CategoryPlot) { domainAxis = ((CategoryPlot) plot).getDomainAxis(); } else if (plot instanceof XYPlot) { domainAxis = ((XYPlot) plot).getDomainAxis(); } this.domainAxisPropertyPanel = SWTAxisEditor.getInstance(tabs, SWT.NONE, domainAxis); item1.setControl(this.domainAxisPropertyPanel); // deal with range axis TabItem item2 = new TabItem(tabs, SWT.NONE); item2.setText(localizationResources.getString("Range_Axis")); Axis rangeAxis = null; if (plot instanceof CategoryPlot) { rangeAxis = ((CategoryPlot) plot).getRangeAxis(); } else if (plot instanceof XYPlot) { rangeAxis = ((XYPlot) plot).getRangeAxis(); } this.rangeAxisPropertyPanel = SWTAxisEditor.getInstance(tabs, SWT.NONE, rangeAxis); item2.setControl(this.rangeAxisPropertyPanel); // deal with plot appearance TabItem item3 = new TabItem(tabs, SWT.NONE); item3.setText(localizationResources.getString("Appearance")); plotAppearance = new SWTPlotAppearanceEditor(tabs, SWT.NONE, plot); item3.setControl(plotAppearance); }
public void setTabbedMode() { sashForm = null; recreateRootComposite(); tabFolder = new TabFolder(rootComposite, SWT.TOP); createMessageViewers(tabFolder); final TabItem requestItem = new TabItem(tabFolder, SWT.NONE); requestItem.setText("Request"); requestItem.setControl(requestViewer); final TabItem responseItem = new TabItem(tabFolder, SWT.NONE); responseItem.setText("Response"); responseItem.setControl(responseViewer); parentComposite.layout(); if (currentRecord != null) processCurrentTransaction(); setDisplayResponse(); }
public static void scribbleTab() { TabItem tab = new TabItem(folder, SWT.CLOSE); tab.setText("Scribble"); tab.setToolTipText("Simple graphics: drawing"); final Canvas canvas = new Canvas(folder, SWT.NONE); ScribbleMouseListener sml = new ScribbleMouseListener(); canvas.addMouseListener(sml); canvas.addMouseMoveListener(sml); tab.setControl(canvas); }
private void createParameterExceptionsFolder(Composite composite) { TabFolder folder = new TabFolder(composite, SWT.TOP); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item = new TabItem(folder, SWT.NONE); item.setText(RefactoringMessages.ChangeSignatureInputPage_parameters); item.setControl(createParameterTableControl(folder)); TabItem itemEx = new TabItem(folder, SWT.NONE); itemEx.setText(RefactoringMessages.ChangeSignatureInputPage_exceptions); itemEx.setControl(createExceptionsTableControl(folder)); folder.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ((TabItem) e.item).getControl().setFocus(); } }); }
public TabItem createOn(TabFolder f) { if (tab.canBeVisible()) { TabItem ti = new TabItem(f, SWT.NONE); ti.setText(text); if (tip != null) ti.setToolTipText(tip); if (image != null) ti.setImage(image); ti.setControl(comp); ti.setData(tab); return ti; } return null; }
protected void createControl(Composite parent) { Composite scriptContainer = new Composite(parent, SWT.NULL); scriptContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); scriptContainer.setLayout(new GridLayout(3, false)); expression = new Combo(scriptContainer, SWT.NULL); new Label(scriptContainer, SWT.NULL).setText(":"); script = new Text(scriptContainer, SWT.BORDER); script.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); TabFolder resultTab = new TabFolder(parent, SWT.BORDER); resultTab.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem textResult = new TabItem(resultTab, SWT.NULL); textResult.setText("To String"); result = new Text(resultTab, SWT.BORDER | SWT.MULTI); result.setLayoutData(new GridData(GridData.FILL_BOTH)); textResult.setControl(result); setResultTree(new TreeViewer(resultTab, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER)); getResultTree().getTree().setHeaderVisible(true); getResultTree().getTree().setHeaderVisible(true); TreeColumn col = new TreeColumn(getResultTree().getTree(), SWT.NONE); col.setText("Name"); col.setResizable(true); col.setWidth(120); col = new TreeColumn(getResultTree().getTree(), SWT.NONE); col.setText("ClassName"); col.setWidth(120); col.setResizable(true); col = new TreeColumn(getResultTree().getTree(), SWT.NONE); col.setWidth(120); col.setText("Value"); col.setResizable(true); TabItem treeResult = new TabItem(resultTab, SWT.NULL); treeResult.setText("Tree"); treeResult.setControl(getResultTree().getTree()); }
@Override protected Control createCustomArea(Composite parent) { if (pvMap == null || pvMap.size() == 0) return super.createCustomArea(parent); parent.setLayout(new FillLayout()); TabFolder tabFolder = new TabFolder(parent, SWT.None); for (Entry<String, IPV> entry : pvMap.entrySet()) { TabItem tabItem = new TabItem(tabFolder, SWT.None); tabItem.setText(entry.getKey()); Text text = new Text(tabFolder, SWT.MULTI | SWT.READ_ONLY); text.setText(getPVInfo(entry.getValue())); tabItem.setControl(text); } return tabFolder; }
public void showAttributes(Composite parent) { composite = new Splitter(parent, SWT.HORIZONTAL); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; layout.numColumns = 1; composite.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); composite.setLayoutData(data); tabs = new TabFolder(composite, SWT.TOP); tabs.setLayoutData(data); general = new TabItem(tabs, SWT.NONE); general.setText(DropWizardMessages.General_Tab_Title); Composite generalTabContent = new Composite(tabs, SWT.NONE); general.setControl(fillGeneralOption(generalTabContent)); TabItem advanced = new TabItem(tabs, SWT.NONE); advanced.setText(DropWizardMessages.Advanced_Tab_Title); TagAttributesComposite advancedTabContent = new TagAttributesComposite(tabs, SWT.NONE, getSpecificWizard().getWizardModel(), context); advanced.setControl(advancedTabContent); tabs.addSelectionListener(advancedTabContent); setControl(composite); getSpecificWizard() .getWizardModel() .addPropertyChangeListener(IDropWizardModel.TAG_PROPOSAL, this); updateTitle(); runValidation(); }
/** * Create the animator area, where the animation is played and controlled. * * @param parent The composite parent. * @return The created composite. */ private AnimationRenderer createAnimationRenderer(TabFolder parent) { final Composite content = new Composite(parent, SWT.NONE); content.setLayout(new GridLayout(1, false)); content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); final Composite renderer = new Composite(content, SWT.BORDER | SWT.DOUBLE_BUFFERED); final AnimationRenderer animationRenderer = new AnimationRenderer(renderer, configurer); renderer.addPaintListener(animationRenderer); final TabItem animatorTab = new TabItem(parent, SWT.NONE); animatorTab.setText(Messages.AnimationEditor_Animator); animatorTab.setControl(content); return animationRenderer; }
private Composite createRequestEditor(Composite parent) { final Composite rootControl = new Composite(parent, SWT.NONE); rootControl.setLayout(new FillLayout()); requestTabFolder = new TabFolder(rootControl, SWT.TOP); requestTabItem = new TabItem(requestTabFolder, SWT.NONE); requestTabItem.setText("Request"); requestEditor = new RequestEditor(requestTabFolder, requestBuilder); requestTabItem.setControl(requestEditor); requestTabItem.setData(requestEditor); requestHeaderTabItem = new TabItem(requestTabFolder, SWT.NONE); requestHeaderTabItem.setText("Headers"); requestHeaderEditor = new HeaderEditor(requestTabFolder, requestBuilder, 0); requestHeaderTabItem.setControl(requestHeaderEditor); requestHeaderTabItem.setData(requestHeaderEditor); requestTabFolder.addSelectionListener(createRequestTabFolderSelectionListener()); requestTabFolderItem = requestTabFolder.getSelection()[0]; requestBuilderPartCurr = (IHttpBuilderPart) requestTabFolderItem.getData(); return rootControl; }
private void addNodesTab(final TabFolder tabFolder) { final TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText("Nodes"); final Composite container = new Composite(tabFolder, SWT.NONE); final GridLayout containerLayout = new GridLayout(1, false); container.setLayout(containerLayout); containerLayout.marginWidth = 0; containerLayout.marginHeight = 0; containerLayout.verticalSpacing = 3; tabItem.setControl(container); createNodeButtonsPanel(container); createNodesTable(container); }
/** * @see * com.groovemanager.sampled.nondestructive.ModificationListener#update(com.groovemanager.sampled.nondestructive.CutListSource) */ public void update(CutListSource source) { modified = true; lastWaveForm = null; waveDisplay.setSelection(new Selection(waveDisplay.getPosition())); if (!isNew) tabItem.setText("* " + this.source.getName()); if (!recording) { lastWaveForm = null; lastWaveFormPos = 0; lastZoomWaveForm = null; lastZoomWaveFormPos = 0; waveDisplay.redraw(); editor.zoomWaveDisplay.redraw(); editor.tabActivated(this); } }
private void addProcessesTab(final TabFolder tabFolder) { final TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText("Processes"); final Composite container = new Composite(tabFolder, SWT.NONE); final GridLayout containerLayout = new GridLayout(1, false); container.setLayout(containerLayout); containerLayout.marginWidth = 0; containerLayout.marginHeight = 0; containerLayout.makeColumnsEqualWidth = false; containerLayout.verticalSpacing = 3; tabItem.setControl(container); createProcessRadioButtons(container); createProcessControl(currentProcessMode, null, container); }
public static void sliderTab() { TabItem tab = new TabItem(folder, SWT.CLOSE); tab.setText("Sliders and Progress bars"); tab.setToolTipText("Tied Slider to ProgressBar"); Composite composite = new Composite(folder, SWT.NONE); composite.setLayout(new GridLayout(2, true)); final Slider slider = new Slider(composite, SWT.HORIZONTAL); final ProgressBar progress = new ProgressBar(composite, SWT.HORIZONTAL); slider.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { progress.setSelection(slider.getSelection()); } }); tab.setControl(composite); }
@Override public void createContents(Composite parent, int style) { _panel = new Composite(parent, style); _panel.setLayout(new FillLayout()); if (getRootGridData() != null) { _panel.setLayoutData(getRootGridData()); } _tabFolder = new TabFolder(_panel, SWT.NONE); TabItem one = new TabItem(_tabFolder, SWT.NONE); one.setText("Consumer"); one.setControl(getConsumerTabControl(_tabFolder)); addTabs(_tabFolder); }
public static void buttonTab() { TabItem tab = new TabItem(folder, SWT.CLOSE); tab.setText("Buttons"); tab.setToolTipText("Different kinds of Buttons"); Composite composite = new Composite(folder, SWT.NONE); composite.setLayout(new GridLayout(4, true)); for (int dir : new int[] {SWT.UP, SWT.RIGHT, SWT.LEFT, SWT.DOWN}) { Button b = new Button(composite, SWT.ARROW | dir); b.addListener(SWT.MouseDown, listener); } newButton(composite, SWT.CHECK, "Check button"); newButton(composite, SWT.PUSH, "Push button"); newButton(composite, SWT.RADIO, "Radio button"); newButton(composite, SWT.TOGGLE, "Toggle button"); newButton(composite, SWT.FLAT, "Flat button"); tab.setControl(composite); }
public static void directoryDialogTab() { TabItem tab = new TabItem(folder, SWT.CLOSE); tab.setText("Directory Dialog"); tab.setToolTipText("Select a directory"); final Button b = new Button(folder, SWT.PUSH); b.setText("Select a Directory"); b.addListener( SWT.MouseDown, new Listener() { public void handleEvent(Event e) { DirectoryDialog dd = new DirectoryDialog(shell); String path = dd.open(); if (path != null) b.setText(path); } }); tab.setControl(b); }