Package org.eclipse.swt.widgets

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


        tableControl.setBackground(this.cellStyle
                .getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));

        tableControl.setLinesVisible(true);

        tableControl.addListener(SWT.MeasureItem, new Listener() {
            @Override
            public void handleEvent(Event event) {
                event.height = fixedSubCellHeight + 1; // +1 because of the grid
                                                       // lines
            }
View Full Code Here


                        viewer.editElement(element, 1);
                }
            }
        });

        tableControl.addListener(SWT.Resize, new Listener() {

            @Override
            public void handleEvent(Event event) {
                // it is the second column, because the first column is not
                // visible as we want to
View Full Code Here

    final Table rawTable = new Table(parent, SWT.MULTI | SWT.H_SCROLL
        | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
    rawTable.setHeaderVisible(true);
    rawTable.setLinesVisible(false);
    rawTable.setFont(nFont);
    rawTable.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event event) {
        if (tableLoader != null) {
          TableItem item = (TableItem) event.item;
          int index = rawTable.indexOf(item);
          if (trace)
View Full Code Here

        clearTable();
        deploymentPlanComposite.getTblViewer().setInput(deploymentPayload);

        // tooltip listener
        Table tblDeploySelection = deploymentPlanComposite.getTable();
        tblDeploySelection.addListener(SWT.Selection, new Listener() {
            @Override
            public void handleEvent(Event event) {
                TableItem selectedItem = (TableItem) event.item;
                String name = selectedItem.getText(DeploymentPlanComposite.NAME_COLUMN);
                String packageName = selectedItem.getText(DeploymentPlanComposite.PACKAGE_COLUMN);
View Full Code Here

    table.setHeaderVisible(true);
    table.setLinesVisible(true);
   
    final Color defaultForegroundColor = table.getForeground();
   
    table.addListener(SWT.EraseItem, new Listener() {
      public void handleEvent(Event event) {
          if((event.detail & SWT.SELECTED) != 0 ){
              event.detail &= ~SWT.SELECTED;
              event.gc.setForeground(defaultForegroundColor);
          }
View Full Code Here

      gd.heightHint = minHeight;
    table.setLayoutData(gd);

    table.setLinesVisible(0 != (flags & LINES_VISIBLE));
    table.setHeaderVisible(0 != (flags & HEADER_VISIBLE));
    table.addListener(SWT.Selection, this);
    table.addListener(SWT.KeyUp, this); // delete key
    return table;
  }

  protected Tree newTree(Composite parent) {
View Full Code Here

    table.setLayoutData(gd);

    table.setLinesVisible(0 != (flags & LINES_VISIBLE));
    table.setHeaderVisible(0 != (flags & HEADER_VISIBLE));
    table.addListener(SWT.Selection, this);
    table.addListener(SWT.KeyUp, this); // delete key
    return table;
  }

  protected Tree newTree(Composite parent) {
    Tree tree = toolkit.createTree(parent, SWT.SINGLE);
View Full Code Here

            item.setText(displayString);
            TableOwnerDrawSupport.storeStyleRanges(item, 0, styleRanges);
          }
        }
      };
      table.addListener(SWT.SetData, listener);
    }
    messageLabel = new Label(parent, SWT.NONE);
    setDefaultGridData(messageLabel);
    EObjectDescriptionContentProvider contentProvider = new EObjectDescriptionContentProvider();
    getTableViewer().setContentProvider(contentProvider);
View Full Code Here

    previousReviewerListTableData.left = new FormAttachment(reviewerListTable, 0, SWT.LEFT);
    previousReviewerListTableData.right = new FormAttachment(80, 0);
    previousReviewerListTableData.top = new FormAttachment(previousReviewIdCombo, 5);
    previousReviewerListTableData.bottom = new FormAttachment(100, 0);
    previousReviewerListTable.setLayoutData(previousReviewerListTableData);
    previousReviewerListTable.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        // handleSelection((TableItem) e.item);
      }
    });
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.