Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Tree.addListener()


        public void widgetDisposed(DisposeEvent e) {
          treeIsDisposed = true;
          unmapAllElements();
        }
      });
      treeControl.addListener(SWT.SetData, new Listener() {

        public void handleEvent(Event event) {
          if (contentProviderIsLazy) {
            TreeItem item = (TreeItem) event.item;
            TreeItem parentItem = item.getParentItem();
View Full Code Here


          treeItem2.setText("Level 2 Item " + loopIndex2);
        }
      }
    }

    tree.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (event.detail == SWT.CHECK) {
          text.setText(event.item + " was checked.");
        } else {
          text.setText(event.item + " was selected");
View Full Code Here

  }

  protected Tree newTree(Composite parent) {
    Tree tree = toolkit.createTree(parent, SWT.SINGLE);
    tree.setLayoutData(new GridData(GridData.FILL_BOTH));
    tree.addListener(SWT.Selection, this);
    tree.addListener(SWT.KeyUp, this);
    return tree;
  }

  protected TreeItem getPreviousSelection(TreeItem[] items, TreeItem nextItem) {
View Full Code Here

  protected Tree newTree(Composite parent) {
    Tree tree = toolkit.createTree(parent, SWT.SINGLE);
    tree.setLayoutData(new GridData(GridData.FILL_BOTH));
    tree.addListener(SWT.Selection, this);
    tree.addListener(SWT.KeyUp, this);
    return tree;
  }

  protected TreeItem getPreviousSelection(TreeItem[] items, TreeItem nextItem) {
    TreeItem prevItem = nextItem.getParentItem();
View Full Code Here

 
  public void createControl(Composite parent) {
    super.createControl(parent);
    initFilteredAction();
    final Tree tree = (Tree) getControl();
    tree.addListener(SWT.MeasureItem,
        new org.eclipse.swt.widgets.Listener() {
         
          public void handleEvent(org.eclipse.swt.widgets.Event event) {
            event.height = 18;
          }
View Full Code Here

      public void mouseDoubleClick(MouseEvent e) {
        _mouseDoubleClicked(e);
      }
    });
    tree.addListener(SWT.MeasureItem, new org.eclipse.swt.widgets.Listener() {

      public void handleEvent(org.eclipse.swt.widgets.Event event) {
        event.height = 18;
      }
    });
View Full Code Here

  protected Tree newTree(Composite parent, int style) {
    Tree tree = new Tree(parent, style | SWT.BORDER | swtTreeModeFlag);
    GridData gd = new GridData(GridData.FILL_BOTH);
    tree.setLayoutData(gd);
    tree.addListener(SWT.Selection, this);
    tree.addListener(SWT.KeyUp, this);
    tree.addListener(SWT.MouseDown, this);
    return tree;
  }
View Full Code Here

  protected Tree newTree(Composite parent, int style) {
    Tree tree = new Tree(parent, style | SWT.BORDER | swtTreeModeFlag);
    GridData gd = new GridData(GridData.FILL_BOTH);
    tree.setLayoutData(gd);
    tree.addListener(SWT.Selection, this);
    tree.addListener(SWT.KeyUp, this);
    tree.addListener(SWT.MouseDown, this);
    return tree;
  }

  public boolean isValid() {
View Full Code Here

    Tree tree = new Tree(parent, style | SWT.BORDER | swtTreeModeFlag);
    GridData gd = new GridData(GridData.FILL_BOTH);
    tree.setLayoutData(gd);
    tree.addListener(SWT.Selection, this);
    tree.addListener(SWT.KeyUp, this);
    tree.addListener(SWT.MouseDown, this);
    return tree;
  }

  public boolean isValid() {
    return true;
View Full Code Here

//            item.setData("iconDef",iconDef);
            item.setData("text",iconDef.text.get(0));
          }
          shell.open();
          tree.forceFocus();
          tree.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event event) {
              if(tree.getSelectionCount() < 1) return;
              TreeItem item = tree.getSelection()[0];
//              IconDef iconDef = (IconDef)item.getData("iconDef");
//              chatInput.insert(iconDef.text.get(0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.