本文整理汇总了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;
}