Package org.eclipse.swt.widgets

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


  public static void main(String[] args) {
    Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setLayout(new RowLayout(SWT.VERTICAL));
    final Table table = new Table(shell, SWT.VIRTUAL | SWT.BORDER);
    table.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event event) {
        TableItem item = (TableItem) event.item;
        int index = table.indexOf(item);
        int start = index / PAGE_SIZE * PAGE_SIZE;
        int end = Math.min(start + PAGE_SIZE, table.getItemCount());
View Full Code Here


   
    final Table table = new Table(sashForm_2, SWT.BORDER | SWT.FULL_SELECTION);
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false, true);
    table.addListener(SWT.MouseDown, listener);
   
    tblclmnNewColumn = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn.setWidth(100);
    tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.TIME));
   
View Full Code Here

    Table tableServer = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
    tbtmServer.setControl(tableServer);
    tableServer.setHeaderVisible(true);
    tableServer.setLinesVisible(true);
    EditListener listener = new EditListener(tableServer, false);
    tableServer.addListener(SWT.MouseDown, listener);
   
    TableColumn tblclmnKey = new TableColumn(tableServer, SWT.LEFT);
    tblclmnKey.setText(RedisClient.i18nFile.getText(I18nFile.KEY));
    tblclmnKey.setWidth(250);
   
View Full Code Here

      Table table = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
      tbtmServerInformation.setControl(table);
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
      EditListener listener1 = new EditListener(table, false);
      table.addListener(SWT.MouseDown, listener1);
     
      TableColumn clmnKey = new TableColumn(table, SWT.LEFT);
      clmnKey.setText(RedisClient.i18nFile.getText(I18nFile.KEY));
      clmnKey.setWidth(250);
     
View Full Code Here

   
    final Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION);
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false, true);
    table.addListener(SWT.MouseDown, listener);
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
   
    tblclmnNewColumn = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn.setWidth(100);
    tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.TIME));
View Full Code Here

    Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5));
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false);
    table.addListener(SWT.MouseDown, listener);
   
    if(withScore){
      tblclmnNewColumn = new TableColumn(table, SWT.NONE);
      tblclmnNewColumn.setWidth(88);
      tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.SCORE));
View Full Code Here

    Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5));
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false);
    table.addListener(SWT.MouseDown, listener);
   
    tblclmnNewColumn = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn.setWidth(132);
    tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.FIELD));
View Full Code Here

    table.setHeaderVisible(true);
   
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 5));
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false);
    table.addListener(SWT.MouseDown, listener);
   
    tblclmnNewColumn = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
    tblclmnNewColumn.setWidth(200);
View Full Code Here

        Table table = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
        tbtmServerInformation.setControl(table);
        table.setHeaderVisible(true);
        table.setLinesVisible(true);
        EditListener listener = new EditListener(table, false);
        table.addListener(SWT.MouseDown, listener);
       
        clmnKey = new TableColumn(table, SWT.LEFT);
        clmnKey.setText(RedisClient.i18nFile.getText(I18nFile.KEY));
        clmnKey.setWidth(250);
       
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

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.