本文整理匯總了Java中org.eclipse.swt.widgets.Composite.setSize方法的典型用法代碼示例。如果您正苦於以下問題:Java Composite.setSize方法的具體用法?Java Composite.setSize怎麽用?Java Composite.setSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.Composite
的用法示例。
在下文中一共展示了Composite.setSize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addButtonPanel
import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
protected Composite addButtonPanel(Composite KeyComposite) {
KeyComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
KeyComposite.setLayout(new GridLayout(1, false));
Composite partKeyButtonPanel = new Composite(KeyComposite, SWT.NONE);
partKeyButtonPanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,false, 1, 1));
partKeyButtonPanel.setSize(607, 25);
partKeyButtonPanel.setLayout(new GridLayout(5, false));
btnCheckButton = new Button(partKeyButtonPanel, SWT.CHECK);
btnCheckButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
btnCheckButton.setText(Messages.HIVE_PARTI_KEY_CHECKBOX_NAME);
btnCheckButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if(propertyList.size()>0){
lblPropertyError.setVisible(false);
createKeyValueTableAndArrangeColumns(btnCheckButton.getSelection(),propertyList);
}else{
lblPropertyError.setVisible(true);
lblPropertyError.setText(Messages.EMPTY_TARGET_FIELD_ERROR);
btnCheckButton.setSelection(false);
}
}
});
deleteButton = new Button(partKeyButtonPanel, SWT.NONE);
deleteButton.setToolTipText(Messages.DELETE_SCHEMA_TOOLTIP);
deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
false, 1, 1));
deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
deleteButton.setToolTipText(Messages.HIVE_PARTI_KEY_DEL_TOOLTIP);
attachDeleteButtonListener(deleteButton);
upButton = new Button(partKeyButtonPanel, SWT.NONE);
upButton.setToolTipText(Messages.MOVE_SCHEMA_UP_TOOLTIP);
upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
false, 1, 1));
upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
attachUpButtonListener(upButton);
downButton = new Button(partKeyButtonPanel, SWT.NONE);
downButton.setToolTipText(Messages.MOVE_SCHEMA_DOWN_TOOLTIP);
downButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
false, 1, 1));
downButton.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());
attachDownButtonListerner(downButton);
deleteButton.setEnabled(false);
upButton.setEnabled(false);
downButton.setEnabled(false);
new Label(partKeyButtonPanel, SWT.NONE);
return partKeyButtonPanel;
}