Package org.eclipse.swt.widgets

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


  protected void createButtonArea(Composite area) {       
        Button btnAdd = new Button(area, SWT.PUSH);
        btnAdd.setText("add");
        btnAdd.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnAdd.pack();
        _buttons.put(BUTTON_ADD, btnAdd);
       
        Button btnRemove = new Button(area, SWT.PUSH);
        btnRemove.setText("remove");
        btnRemove.setLayoutData(GridDataFactory.copyData(_btnLayout));
View Full Code Here


        _buttons.put(BUTTON_ADD, btnAdd);
       
        Button btnRemove = new Button(area, SWT.PUSH);
        btnRemove.setText("remove");
        btnRemove.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnRemove.pack();
        _buttons.put(BUTTON_REMOVE, btnRemove);
 
 
  public Button getButton(String id) {
    return _buttons.get(id);
View Full Code Here

  protected void createButtonArea(Composite area) {       
        Button btnAdd = new Button(area, SWT.PUSH);
        btnAdd.setText("add");
        btnAdd.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnAdd.pack();
        btnAdd.setData(SWTBotIDs.WIDGET_KEY, SWTBotIDs.EDITABLE_TABLE_CONTROL_BUTTON_ADD);
        _buttons.put(BUTTON_ADD, btnAdd);
       
        Button btnRemove = new Button(area, SWT.PUSH);
        btnRemove.setText("remove");
View Full Code Here

        _buttons.put(BUTTON_ADD, btnAdd);
       
        Button btnRemove = new Button(area, SWT.PUSH);
        btnRemove.setText("remove");
        btnRemove.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnRemove.pack();
        btnRemove.setData(SWTBotIDs.WIDGET_KEY, SWTBotIDs.EDITABLE_TABLE_CONTROL_BUTTON_REMOVE);
        _buttons.put(BUTTON_REMOVE, btnRemove);
 
 
  public Table getTable() {
View Full Code Here

  public Button newPushButton(Composite parent, String label, String tip, boolean enabled, int style) {
    Button button = toolkit.createButton(parent, label, SWT.PUSH | style);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
    button.setLayoutData(gd);
    button.pack(false);
    button.setToolTipText(tip);
    button.setEnabled(enabled);
    button.addListener(SWT.Selection, this);
    Point buttonSize = button.getSize();
    gd.heightHint = buttonSize.y - 2;
View Full Code Here

  public Button newCheckBox(Composite parent, String label, String tip) {
    Button button = toolkit.createButton(parent, label, SWT.CHECK);
    button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING
            | GridData.HORIZONTAL_ALIGN_FILL));
    button.pack();
    button.setToolTipText(tip);
    button.addListener(SWT.Selection, this);
    return button;
  }
View Full Code Here

  public Button newPushButton(Composite parent, String label, String tip, boolean enabled, int style) {
    Button button = toolkit.createButton(parent, label, SWT.PUSH | style);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
    button.setLayoutData(gd);
    button.pack(false);
    button.setToolTipText(tip);
    button.setEnabled(enabled);
    button.addListener(SWT.Selection, this);
    Point buttonSize = button.getSize();
    gd.heightHint = buttonSize.y - 2;
View Full Code Here

  public Button newCheckBox(Composite parent, String label, String tip) {
    Button button = toolkit.createButton(parent, label, SWT.CHECK);
    button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING
            | GridData.HORIZONTAL_ALIGN_FILL));
    button.pack();
    button.setToolTipText(tip);
    button.addListener(SWT.Selection, this);
    return button;
  }
View Full Code Here

  public Button newPushButton(Composite parent, String label, String tip, boolean enabled, int style) {
    Button button = toolkit.createButton(parent, label, SWT.PUSH | style);
    GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
    button.setLayoutData(gd);
    button.pack(false);
    button.setToolTipText(tip);
    button.setEnabled(enabled);
    button.addListener(SWT.Selection, this);
    Point buttonSize = button.getSize();
    gd.heightHint = buttonSize.y - 2;
View Full Code Here

  public Button newCheckBox(Composite parent, String label, String tip) {
    Button button = toolkit.createButton(parent, label, SWT.CHECK);
    button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING
            | GridData.HORIZONTAL_ALIGN_FILL));
    button.pack();
    button.setToolTipText(tip);
    button.addListener(SWT.Selection, this);
    return button;
  }
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.