Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TableColumn.pack()


    TableColumn[] columns = table.getColumns();
    int columnWidth = 0;
    for (int i = 0; i < columns.length; i++) {
      TableColumn column = columns[i];
      int minWidth = column.getWidth();
      column.pack();
      if (column.getWidth() < minWidth) {
        column.setWidth(minWidth);
      }
      if (i < columns.length - 1) {
        columnWidth += column.getWidth();
View Full Code Here


      int totStartWidth = 0;
      int[] startWidths = new int[columns.length];
      for (int i = 0; i < columns.length; i++) {
        TableColumn column = columns[i];
        totStartWidth += startWidths[i] = column.getWidth();
        column.pack();
      }

      if (clientWidth <= totStartWidth) {
        return;
      }
View Full Code Here

      if (i == 0)
        column.setWidth(20);
      else if (i == 1)
        column.setWidth(80);
      else
        column.pack();
    }
  }

  /**
   * Creates the TableEditor with a CCombo in the first column of the table. This CCombo lists all the controls that
View Full Code Here

        item.setText(1, prefix + " value " + i);
        item.setText(2, prefix + " description " + i);
      }
      column0.pack();
      column1.pack();
      column2.pack();
      return table;
    }
    case TEXT: {
      Text text = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
      text.setText(prefix + " Text");
View Full Code Here

          }
        }
      }
      column0.pack();
      column1.pack();
      column2.pack();
      return tree;
    }
    case CANVAS: {
      Canvas canvas = new Canvas(parent, SWT.BORDER);
      canvas.setData("STRINGS", new String[] { prefix + " Canvas widget" });
View Full Code Here

  void packColumns() {
    int columnCount = table1.getColumnCount();
    for (int i = 0; i < columnCount; i++) {
      TableColumn tableColumn = table1.getColumn(i);
      tableColumn.pack();
    }
  }

  Object[] parameterForType(String typeName, String value, Widget widget) {
    if (value.equals(""))
View Full Code Here

            item.setData("ACTION_INFO", actionInfo);
            bindings.add(actionInfo);
        }

        Dialog.applyDialogFont(parent);
        columnKeySequence.pack();
        columnCommandName.pack();

        /*
         * If you double-click on the table, it should execute the selected
         * command.
 
View Full Code Here

    item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Attributes", "Enter attributes to search" });
    item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Attribute values contain", "Enter attributes values to search for" });
    col1.pack();
    col2.pack();
    final TableEditor editor = new TableEditor(table);
    editor.horizontalAlignment = SWT.LEFT;
    editor.grabHorizontal = true;
    editor.minimumWidth = 50;
    // editing the second column
View Full Code Here

        for (int i = 0, n = table.getColumnCount(); i < n; i++)
        {
            TableColumn column = table.getColumn(i);
            int originalWidth = getOriginalWidth(column, column.getWidth());

            column.pack();
            int packedWidth = column.getWidth();

            if (packedWidth < originalWidth)
                column.setWidth(originalWidth);
        }
View Full Code Here

    table.setLinesVisible(true);

    final TableColumn eraseColumn = new TableColumn(table, SWT.LEFT);
    eraseColumn.setText(COLUMN_ERASE);
    eraseColumn.setToolTipText(bundle.getString("label.click.on.icon.to.delete.namespace"));
    eraseColumn.pack();
    eraseColumn.setAlignment(SWT.CENTER);
    eraseColumn.setResizable(false);

    TableColumn prefixColumn = new TableColumn(table, SWT.LEFT);
    prefixColumn.setText(COLUMN_PREFIX);
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.