Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ToolItem


        // ToolBar
        final ToolBar leftToolBar = new ToolBar( leftComposite, SWT.HORIZONTAL | SWT.FLAT );
        leftToolBar.setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, false, false ) );
        // Creating the 'Menu' ToolBar item
        final ToolItem leftMenuToolItem = new ToolItem( leftToolBar, SWT.PUSH );
        leftMenuToolItem.setImage( Activator.getDefault().getImage( PluginConstants.IMG_TOOLBAR_MENU ) );
        leftMenuToolItem.setToolTipText( Messages.getString( "DifferencesWidget.MenuToolTip" ) ); //$NON-NLS-1$
        // Creating the associated Menu
        final Menu leftMenu = new Menu( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.POP_UP );
        // Adding the action to display the Menu when the item is clicked
        leftMenuToolItem.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = leftMenuToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = leftToolBar.toDisplay( pt );
                leftMenu.setLocation( pt.x, pt.y );
                leftMenu.setVisible( true );
            }
        } );
        // Adding the 'Sorting...' MenuItem
        MenuItem sortingMenuItem = new MenuItem( leftMenu, SWT.PUSH );
        sortingMenuItem.setText( Messages.getString( "DifferencesWidget.Sorting" ) ); //$NON-NLS-1$
        sortingMenuItem.setImage( Activator.getDefault().getImage( PluginConstants.IMG_SORTING ) );
        sortingMenuItem.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent arg0 )
            {
                new OpenSchemaViewSortingDialogAction().run();
            }
        } );
        // Adding the 'Separator' MenuItem
        new MenuItem( leftMenu, SWT.SEPARATOR );
        // Adding the 'Preferences...' MenuItem
        MenuItem preferencesMenuItem = new MenuItem( leftMenu, SWT.PUSH );
        preferencesMenuItem.setText( Messages.getString( "DifferencesWidget.Preferences" ) ); //$NON-NLS-1$
        preferencesMenuItem.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent arg0 )
            {
                new OpenSchemaViewPreferenceAction().run();
            }
        } );

        // TreeViewer
        treeViewer = new TreeViewer( leftComposite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
        GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, true );
        gridData.heightHint = 250;
        treeViewer.getTree().setLayoutData( gridData );
        treeViewer.setContentProvider( new DifferencesWidgetSchemaContentProvider() );
        treeViewer.setLabelProvider( new DifferencesWidgetSchemaLabelProvider() );
        treeViewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                StructuredSelection selection = ( StructuredSelection ) event.getSelection();
                Object element = selection.getFirstElement();
                if ( element instanceof AttributeTypeDifference )
                {
                    AttributeTypeDifference atd = ( AttributeTypeDifference ) element;
                    if ( atd.getType().equals( DifferenceType.MODIFIED ) )
                    {
                        tableViewer.setInput( atd.getDifferences() );
                        return;
                    }
                }
                else if ( element instanceof ObjectClassDifference )
                {
                    ObjectClassDifference ocd = ( ObjectClassDifference ) element;
                    if ( ocd.getType().equals( DifferenceType.MODIFIED ) )
                    {
                        tableViewer.setInput( ocd.getDifferences() );
                        return;
                    }
                }

                // Default
                tableViewer.setInput( null );
            }
        } );
        treeViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                StructuredSelection selection = ( StructuredSelection ) event.getSelection();
                Object element = selection.getFirstElement();
                if ( ( element instanceof Folder ) || ( element instanceof SchemaDifference ) )
                {
                    treeViewer.setExpandedState( element, !treeViewer.getExpandedState( element ) );
                }
            }
        } );

        // Right Composite
        Composite rightComposite = new Composite( composite, SWT.NONE );
        gridLayout = new GridLayout();
        gridLayout.marginBottom = 0;
        gridLayout.marginHeight = 0;
        gridLayout.marginLeft = 0;
        gridLayout.marginRight = 0;
        gridLayout.marginTop = 0;
        gridLayout.marginWidth = 0;
        rightComposite.setLayout( gridLayout );
        rightComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );

        // ToolBar
        final ToolBar rightToolBar = new ToolBar( rightComposite, SWT.HORIZONTAL | SWT.FLAT );
        rightToolBar.setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, false, false ) );
        // Creating the 'Menu' ToolBar item
        final ToolItem rightMenuToolItem = new ToolItem( rightToolBar, SWT.PUSH );
        rightMenuToolItem.setImage( Activator.getDefault().getImage( PluginConstants.IMG_TOOLBAR_MENU ) );
        rightMenuToolItem.setToolTipText( Messages.getString( "DifferencesWidget.MenuToolTip" ) ); //$NON-NLS-1$
        // Creating the associated Menu
        final Menu rightMenu = new Menu( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.POP_UP );
        // Adding the action to display the Menu when the item is clicked
        rightMenuToolItem.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = rightMenuToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = rightToolBar.toDisplay( pt );
                rightMenu.setLocation( pt.x, pt.y );
                rightMenu.setVisible( true );
            }
View Full Code Here


        });

        toolbar = new ToolBar(container, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);
        toolbar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));

        btnMoveUp = new ToolItem(toolbar, SWT.PUSH);
        btnMoveUp.setText("Up");
        btnMoveUp.setImage(imgUp);
        btnMoveUp.setEnabled(false);

        btnMoveDown = new ToolItem(toolbar, SWT.PUSH);
        btnMoveDown.setText("Down");
        btnMoveDown.setImage(imgDown);
        btnMoveDown.setEnabled(false);

        final Styler strikeoutStyler = new StrikeoutStyler(StyledString.QUALIFIER_STYLER, JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR));
View Full Code Here

        viewer.setInput(allRepos);
        updateButtons();
    }

    private void fillToolBar(ToolBar toolbar) {
        ToolItem refreshTool = new ToolItem(toolbar, SWT.PUSH);
        refreshTool.setImage(refreshImg);

        refreshTool.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent event) {
                reloadRepos();
            }
        });
View Full Code Here

        else
            restoreImg = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/tile-horizontal.png").createImage();
    }

    public ToolItem createToolItem(final Composite panel, ToolBar toolbar) {
        final ToolItem item = new ToolItem(toolbar, SWT.PUSH);
        item.setImage(maximiseImg);
        item.setToolTipText("Maximise");

        item.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                Control maximised = sashForm.getMaximizedControl();
                if (maximised == panel) {
                    maximised = null;
                    item.setImage(maximiseImg);
                    item.setToolTipText("Maximise");
                } else {
                    maximised = panel;
                    item.setImage(restoreImg);
                    item.setToolTipText("Restore");
                }
                sashForm.setMaximizedControl(maximised);
            }
        });
View Full Code Here

        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);

        ToolBar toolbar = new ToolBar(section, SWT.FLAT);
        section.setTextClient(toolbar);
        final ToolItem addItem = new ToolItem(toolbar, SWT.PUSH);
        addItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD));
        addItem.setToolTipText("Add");

        final ToolItem insertItem = new ToolItem(toolbar, SWT.PUSH);
        insertItem.setImage(imgInsert);
        insertItem.setToolTipText("Insert");
        insertItem.setEnabled(false);

        final ToolItem removeItem = new ToolItem(toolbar, SWT.PUSH);
        removeItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE));
        removeItem.setDisabledImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE_DISABLED));
        removeItem.setToolTipText("Remove");
        removeItem.setEnabled(false);

        Table table = toolkit.createTable(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
        viewer = new TableViewer(table);
        viewer.setUseHashlookup(false);
        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setLabelProvider(labelProvider);

        toolbar = new ToolBar(composite, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);

        final ToolItem btnMoveUp = new ToolItem(toolbar, SWT.PUSH);
        btnMoveUp.setText("Up");
        btnMoveUp.setImage(imgUp);
        btnMoveUp.setEnabled(false);

        final ToolItem btnMoveDown = new ToolItem(toolbar, SWT.PUSH);
        btnMoveDown.setText("Down");
        btnMoveDown.setImage(imgDown);
        btnMoveDown.setEnabled(false);

        // Listeners
        table.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                ISelection selection = viewer.getSelection();
                if (!selection.isEmpty())
                    managedForm.fireSelectionChanged(PkgPatternsListPart.this, selection);
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                managedForm.fireSelectionChanged(PkgPatternsListPart.this, event.getSelection());
                boolean enabled = !viewer.getSelection().isEmpty();
                insertItem.setEnabled(enabled);
                removeItem.setEnabled(enabled);
                btnMoveUp.setEnabled(enabled);
                btnMoveDown.setEnabled(enabled);
            }
        });
        viewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] {
                LocalSelectionTransfer.getTransfer(), ResourceTransfer.getInstance(), TextTransfer.getInstance()
        }, new PackageDropAdapter<C>(viewer) {
            @Override
            protected C createNewEntry(String packageName) {
                return newHeaderClause(packageName);
            }

            @Override
            protected void addRows(int index, Collection<C> rows) {
                doAddClauses(rows, index, true);
            }

            @Override
            protected int indexOf(Object object) {
                return clauses.indexOf(object);
            }
        });
        table.addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent e) {
                if (e.character == SWT.DEL) {
                    doRemoveSelectedClauses();
                } else if (e.character == '+') {
                    doAddClausesAfterSelection(generateClauses());
                }
            }
        });
        addItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doAddClausesAfterSelection(generateClauses());
            }
        });
        insertItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doInsertClausesAtSelection(generateClauses());
            }
        });
        removeItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doRemoveSelectedClauses();
            }
        });
        btnMoveUp.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doMoveUp();
            }
        });
        btnMoveDown.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doMoveDown();
            }
        });
View Full Code Here

    private void createUnresolvedViewToolBar(final Composite parent) {
        ToolBar unresolvedToolBar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL);
        GridData gd_unresolvedToolBar = new GridData(SWT.RIGHT, SWT.FILL, true, false);
        unresolvedToolBar.setLayoutData(gd_unresolvedToolBar);

        final ToolItem treeViewToggle = new ToolItem(unresolvedToolBar, SWT.RADIO);
        treeViewToggle.setImage(treeViewImg);
        treeViewToggle.setToolTipText("Tree View");
        treeViewToggle.setSelection(failureTreeMode);

        final ToolItem flatViewToggle = new ToolItem(unresolvedToolBar, SWT.RADIO);
        flatViewToggle.setImage(flatViewImg);
        flatViewToggle.setToolTipText("Flat View");
        flatViewToggle.setSelection(!failureTreeMode);

        new ToolItem(unresolvedToolBar, SWT.SEPARATOR);

        ToolItem toolErrorsToClipboard = new ToolItem(unresolvedToolBar, SWT.PUSH);
        toolErrorsToClipboard.setImage(clipboardImg);
        toolErrorsToClipboard.setToolTipText("Copy to Clipboard");

        unresolvedMaximiser = new SashFormPanelMaximiser(sashForm);
        unresolvedMaximiser.createToolItem(parent, unresolvedToolBar);

        /*
        SelectionListener modeListener = new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                boolean newTreeMode = treeViewToggle.getSelection();
                if (newTreeMode != failureTreeMode) {
                    failureTreeMode = newTreeMode;
                    switchFailureViewMode();
                }
            }
        };
        treeViewToggle.addSelectionListener(modeListener);
        flatViewToggle.addSelectionListener(modeListener);
        */

        toolErrorsToClipboard.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                copyUnresolvedToClipboard();
            }
        });
View Full Code Here

        data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
        label.setLayoutData(data);
        label.setFont(parent.getFont());
       
        ToolBar buttonBar = new ToolBar(header, SWT.NONE);
        ToolItem invisible = new ToolItem(buttonBar, SWT.NONE);
       
        ToolItem plus = new ToolItem(buttonBar, SWT.NONE);
        plus.setImage(PlatformUI.getWorkbench().getSharedImages().
                getImageDescriptor(ISharedImages.IMG_OBJ_ADD).createImage());
        plus.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                plus();
            }
        });
       
        final ToolItem minus = new ToolItem(buttonBar, SWT.NONE);
        minus.setImage(PlatformUI.getWorkbench().getSharedImages().
                getImageDescriptor(ISharedImages.IMG_TOOL_DELETE).createImage());
        minus.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                minus();
            }
        });
        minus.setEnabled(false);

        Composite tableParent = new Composite(composite, SWT.NONE);
        final GridData layoutData = new GridData(GridData.FILL_BOTH);
        layoutData.heightHint = 150;
        tableParent.setLayoutData(layoutData);
        TableColumnLayout tableLayout = new TableColumnLayout();
        tableParent.setLayout(tableLayout);
        viewer = new TableViewer(tableParent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
        viewer.getTable().setLinesVisible(true);
        viewer.getTable().setHeaderVisible(true);
       
        // accessing property here directly, instead of going via (JcrProperty)inputElement;
        String[] rawLines = property.getValuesAsString();
        // convert raw lines to Line objects for easier editing management
        for (int i = 0; i < rawLines.length; i++) {
            lines.add(new Line(rawLines[i]));
        }
       
        viewer.setContentProvider(new IStructuredContentProvider() {
           
            @Override
            public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
            }
           
            @Override
            public void dispose() {
            }

            @Override
            public Object[] getElements(Object inputElement) {
                return lines.toArray();
            }
        });
       
        TableViewerColumn column0 = new TableViewerColumn(viewer, SWT.NONE);
        column0.getColumn().setText("Type");
        column0.getColumn().setResizable(true);
        column0.getColumn().setWidth(100);
        tableLayout.setColumnData(column0.getColumn(), new ColumnWeightData(20, 100));
        column0.setLabelProvider(new CellLabelProvider() {
           
            @Override
            public void update(ViewerCell cell) {
                try{
                    cell.setText(property.getTypeAsString());
                    cell.setForeground(greyColor);
                } catch(Exception e) {
                    cell.setText("n/a");
                    cell.setForeground(greyColor);
                }
            }
        });

        TableViewerColumn column1 = new TableViewerColumn(viewer, SWT.NONE);
        column1.getColumn().setText("Value");
        column1.getColumn().setResizable(true);
        column1.getColumn().setWidth(200);
        tableLayout.setColumnData(column1.getColumn(), new ColumnWeightData(80, 200));

        column1.setLabelProvider(new CellLabelProvider() {
           
            @Override
            public void update(ViewerCell cell) {
                Line line = (Line) cell.getElement();
                cell.setText(line.getValue());
            }
        });
        column1.setEditingSupport(new EditingSupport(viewer) {
           
            @Override
            protected void setValue(Object element, Object value) {
                Line line = (Line)element;
                line.setValue(String.valueOf(value));
                // trigger a refresh:
                viewer.setInput(property);
            }
           
            @Override
            protected Object getValue(Object element) {
                final Line line = (Line)element;
                final String value = line.getValue();
                System.out.println("Value="+value);
                return value;
            }
           
            @Override
            protected CellEditor getCellEditor(Object element) {
                return new TextCellEditor(viewer.getTable());
            }
           
            @Override
            protected boolean canEdit(Object element) {
                // all values are editable
                return true;
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
           
            @Override
            public void selectionChanged(SelectionChangedEvent event) {
                final ISelection selection = event.getSelection();
                if (selection instanceof IStructuredSelection) {
                    IStructuredSelection iss = (IStructuredSelection)selection;
                    if (iss.isEmpty()) {
                        minus.setEnabled(false);
                    } else {
                        minus.setEnabled(true);
                    }
                } else {
                    minus.setEnabled(false);
                }
            }
        });
       
        viewer.setInput(property);
View Full Code Here

        control.setTopCenter( actionToolBar );

        // local menu
        this.menuManager = new MenuManager();
        menuToolBar = new ToolBar( control, SWT.FLAT | SWT.RIGHT );
        ToolItem ti = new ToolItem( menuToolBar, SWT.PUSH, 0 );
        ti.setImage( ConnectionUIPlugin.getDefault().getImage( ConnectionUIConstants.IMG_PULLDOWN ) );
        ti.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                showViewMenu();
            }
View Full Code Here

     * @param parent the ToolBar to add the new control to
     * @param index the index
     */
    public void fill( ToolBar parent, int index )
    {
        toolitem = new ToolItem( parent, SWT.SEPARATOR, index );
        Control control = createControl( parent );
        toolitem.setControl( control );
    }
View Full Code Here

        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);

        ToolBar toolbar = new ToolBar(section, SWT.FLAT);
        section.setTextClient(toolbar);
        final ToolItem addItem = new ToolItem(toolbar, SWT.PUSH);
        addItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD));
        addItem.setToolTipText("Add");

        final ToolItem insertItem = new ToolItem(toolbar, SWT.PUSH);
        insertItem.setImage(imgInsert);
        insertItem.setToolTipText("Insert");
        insertItem.setEnabled(false);

        final ToolItem removeItem = new ToolItem(toolbar, SWT.PUSH);
        removeItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE));
        removeItem.setDisabledImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE_DISABLED));
        removeItem.setToolTipText("Remove");
        removeItem.setEnabled(false);

        Table table = toolkit.createTable(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
        viewer = new TableViewer(table);
        viewer.setUseHashlookup(false);
        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setLabelProvider(labelProvider);

        toolbar = new ToolBar(composite, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);

        final ToolItem btnMoveUp = new ToolItem(toolbar, SWT.PUSH);
        btnMoveUp.setText("Up");
        btnMoveUp.setImage(imgUp);
        btnMoveUp.setEnabled(false);

        final ToolItem btnMoveDown = new ToolItem(toolbar, SWT.PUSH);
        btnMoveDown.setText("Down");
        btnMoveDown.setImage(imgDown);
        btnMoveDown.setEnabled(false);

        // Listeners
        table.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                ISelection selection = viewer.getSelection();
                if (!selection.isEmpty())
                    managedForm.fireSelectionChanged(PkgPatternsListPart.this, selection);
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            @Override
            public void selectionChanged(SelectionChangedEvent event) {
                List<C> oldSelection = selection;
                IStructuredSelection structSel = (IStructuredSelection) event.getSelection();

                @SuppressWarnings("unchecked")
                List<C> newSelection = structSel.toList();
                selection = newSelection;

                propChangeSupport.firePropertyChange(PROP_SELECTION, oldSelection, selection);

                managedForm.fireSelectionChanged(PkgPatternsListPart.this, event.getSelection());
                boolean enabled = !viewer.getSelection().isEmpty();
                insertItem.setEnabled(enabled);
                removeItem.setEnabled(enabled);
                btnMoveUp.setEnabled(enabled);
                btnMoveDown.setEnabled(enabled);
            }
        });
        viewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] {
                LocalSelectionTransfer.getTransfer(), ResourceTransfer.getInstance(), TextTransfer.getInstance()
        }, new PackageDropAdapter<C>(viewer) {
            @Override
            protected C createNewEntry(String packageName) {
                return newHeaderClause(packageName);
            }

            @Override
            protected void addRows(int index, Collection<C> rows) {
                doAddClauses(rows, index, true);
            }

            @Override
            protected int indexOf(Object object) {
                return clauses.indexOf(object);
            }
        });
        table.addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent e) {
                if (e.character == SWT.DEL) {
                    doRemoveSelectedClauses();
                } else if (e.character == '+') {
                    doAddClausesAfterSelection(generateClauses());
                }
            }
        });
        addItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doAddClausesAfterSelection(generateClauses());
            }
        });
        insertItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doInsertClausesAtSelection(generateClauses());
            }
        });
        removeItem.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doRemoveSelectedClauses();
            }
        });
        btnMoveUp.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doMoveUp();
            }
        });
        btnMoveDown.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doMoveDown();
            }
        });
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.ToolItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.