Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Listener


   * @param parent
   * @param style
   */
  public CTree(Composite parent, int style) {
    fTree = new Tree(parent, style);
    parent.addListener(SWT.Resize, new Listener() {
      public void handleEvent(Event event) {
        onTreeResize();
      }
    });
  }
View Full Code Here


      }
    };
    fViewer.addPostSelectionChangedListener(fSelectionChangeListener);

    /* Perform Action on Mouse-Down */
    fCustomTree.getControl().addListener(SWT.MouseDown, new Listener() {
      public void handleEvent(Event event) {
        onMouseDown(event);
      }
    });

    /* Update Cursor on Mouse-Move */
    fCustomTree.getControl().addListener(SWT.MouseMove, new Listener() {
      public void handleEvent(Event event) {
        onMouseMove(event);
      }
    });

View Full Code Here

   * @param parent
   * @param style
   */
  public CTable(Composite parent, int style) {
    fTable = new Table(parent, style);
    parent.addListener(SWT.Resize, new Listener() {
      public void handleEvent(Event event) {
        onTableResize();
      }
    });
  }
View Full Code Here

    addButton.setToolTipText(Messages.SearchConditionList_ADD_CONDITION);

    /* Add Menu */
    final Menu conditionMenu = new Menu(buttonBar);
    createConditionMenu(conditionMenu, item);
    addButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (event.detail == SWT.ARROW) {
          Rectangle rect = item.getBounds();
          Point pt = new Point(rect.x, rect.y + rect.height);
          pt = buttonBar.toDisplay(pt);
View Full Code Here

    createColorMenu();

    fColorItem = new ToolItem(fBar, SWT.DROP_DOWN);
    fColorItem.setImage(createColorImage(fSelectedColor));
    fColorItem.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        Rectangle rect = fColorItem.getBounds();
        Point pt = new Point(rect.x, rect.y + rect.height);
        pt = fBar.toDisplay(pt);
        fColorMenu.setLocation(pt.x, pt.y);
View Full Code Here

    /* Create LabelProvider (Custom Owner Drawn enabled!) */
    NewsColumnViewModel columnModel = createColumnModel(fEditorInput.getMark());
    fNewsTableLabelProvider = new NewsTableLabelProvider(columnModel);
    if (!OwlUI.isHighContrast()) {
      fViewer.getControl().addListener(SWT.EraseItem, new Listener() {
        public void handleEvent(Event event) {
          Object element = event.item.getData();
          fNewsTableLabelProvider.erase(event, element);
        }
      });
View Full Code Here

          saveColumnModelInBackground();
        }
      });

      /* Listen to moved columns */
      column.addListener(SWT.Move, new Listener() {
        public void handleEvent(Event event) {
          if (fCustomTree.getControl().isDisposed() || fBlockColumMoveEvent)
            return;

          int[] columnOrder = fCustomTree.getControl().getColumnOrder();
View Full Code Here

      }
    };
    fViewer.addSelectionChangedListener(fSelectionChangeListener);

    /* Perform Action on Mouse-Down */
    fCustomTree.getControl().addListener(SWT.MouseDown, new Listener() {
      public void handleEvent(Event event) {
        onMouseDown(event);
      }
    });

    /* Perform Action on Mouse-Up */
    fCustomTree.getControl().addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event event) {
        onMouseUp(event);
      }
    });

    /* Update Cursor on Mouse-Move */
    fCustomTree.getControl().addListener(SWT.MouseMove, new Listener() {
      public void handleEvent(Event event) {
        onMouseMove(event);
      }
    });

View Full Code Here

    fFolderChooser = new FolderChooser(folderContainer, rootFolders.iterator().next(), null, SWT.BORDER, true, 5);
    fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    fFolderChooser.setExpandStrategy(ExpandStrategy.PACK);
    fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
    fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    fFolderChooser.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (!fChooseExistingRadio.getSelection()) {
          fChooseExistingRadio.setSelection(true);
          fNoSpecificLocationRadio.setSelection(false);
          fCreateNewSetRadio.setSelection(false);
View Full Code Here

    fItemViewer.getTable().setFocus();
    fItemViewer.getTable().setData(ApplicationWorkbenchWindowAdvisor.FOCUSLESS_SCROLL_HOOK, new Object());

    /* Custom Owner Drawn Category */
    if (!OwlUI.isHighContrast()) {
      fItemViewer.getControl().addListener(SWT.EraseItem, new Listener() {
        public void handleEvent(Event event) {
          ToolBarItem item = (ToolBarItem) event.item.getData();
          if (item.item == CoolBarItem.SEPARATOR) {
            Scrollable scrollable = (Scrollable) event.widget;
            GC gc = event.gc;
View Full Code Here

TOP

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

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.