本文整理汇总了Java中org.eclipse.swt.layout.GridData.CENTER属性的典型用法代码示例。如果您正苦于以下问题:Java GridData.CENTER属性的具体用法?Java GridData.CENTER怎么用?Java GridData.CENTER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.layout.GridData
的用法示例。
在下文中一共展示了GridData.CENTER属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCombo
/**
* This method initializes combo
*
*/
private void createCombo() {
GridData gridData1 = new GridData();
gridData1.grabExcessHorizontalSpace = false;
gridData1.verticalAlignment = GridData.CENTER;
gridData1.horizontalAlignment = GridData.BEGINNING;
combo = new Combo(this, SWT.NONE);
combo.setLayoutData(gridData1);
combo.add("*");
combo.add("Screen class");
combo.add("Criteria");
combo.add("Extraction rule");
combo.add("Sheet");
combo.add("Transaction");
combo.add("Statement");
combo.add("Sequence");
combo.add("Step");
}
示例2: initialize
/**
* This method initializes this
*
*/
private void initialize() {
XpathTrigger trigger = (parent.getTrigger() instanceof XpathTrigger)?(XpathTrigger)parent.getTrigger():null;
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalAlignment = GridData.CENTER;
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
xpath_label = new Label(this, SWT.NONE);
xpath_label.setText("Waiting for Xpath");
xpath_txt = new Text(this, SWT.BORDER);
xpath_txt.setText( (trigger!=null)? trigger.getXPath():"");
xpath_txt.setLayoutData(gridData2);
xpath_txt.setSize(600, 50);
}
示例3: createGroup
/**
* This method initializes group
*
*/
private void createGroup() {
GridData gridData1 = new GridData();
gridData1.horizontalAlignment = GridData.BEGINNING;
gridData1.grabExcessHorizontalSpace = true;
gridData1.verticalAlignment = GridData.CENTER;
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.CENTER;
GridLayout gridLayout1 = new GridLayout();
gridLayout1.numColumns = 2;
GridData gridData3 = new GridData();
gridData3.horizontalAlignment = GridData.FILL;
gridData3.horizontalSpan = 2;
gridData3.grabExcessHorizontalSpace = true;
gridData3.grabExcessVerticalSpace = false;
gridData3.verticalAlignment = GridData.FILL;
group = new Group(this, SWT.NONE);
group.setText("Target Server");
group.setLayoutData(gridData3);
group.setLayout(gridLayout1);
label = new Label(group, SWT.NONE);
label.setText("HTTP Server");
httpServer = new Text(group, SWT.BORDER);
httpServer.setLayoutData(gridData);
label2 = new Label(group, SWT.NONE);
label2.setText("HTTP Port");
httpPort = new Text(group, SWT.BORDER);
httpPort.setLayoutData(gridData1);
label3 = new Label(group, SWT.NONE);
label3.setText("SSL");
ssl = new Button(group, SWT.CHECK);
httpServer.addModifyListener(modifyListener);
httpPort.addModifyListener(modifyListener);
ssl.addSelectionListener(selectionListener);
}
示例4: updateBrowserSize
private void updateBrowserSize() {
int width = NumberUtils.toInt(deviceWidth.getText(), -1);
int height = NumberUtils.toInt(deviceHeight.getText(), -1);
width = zoomFactor.swt(width, dpiFactorX);
height = zoomFactor.swt(height, dpiFactorY);
browserGD.horizontalAlignment = width < 0 ? GridData.FILL : GridData.CENTER;
browserGD.verticalAlignment = height < 0 ? GridData.FILL : GridData.CENTER;
browserScroll.setMinWidth(browserGD.widthHint = browserGD.minimumWidth = width);
browserScroll.setMinHeight(browserGD.heightHint = browserGD.minimumHeight = height);
c8oBrowser.getParent().layout();
C8oBrowser.run(() -> {
browser.executeJavaScript("try {_c8o_remove_all_overlay()} catch(e){}");
browser.setZoomLevel(zoomFactor.zoomLevel());
});
}
示例5: createCommun_trigger
/**
* This method initializes commun_trigger
*
*/
private void createCommun_trigger() {
commun_trigger = new Composite(this, SWT.NONE);
GridData gridData1 = new GridData();
gridData1.verticalAlignment = GridData.CENTER;
gridData1.horizontalAlignment = GridData.FILL;
gridData1.grabExcessHorizontalSpace = true;
commun_trigger.setLayoutData(gridData1);
GridLayout gridLayout = new GridLayout();
gridLayout.makeColumnsEqualWidth = false;
gridLayout.numColumns = 2;
commun_trigger.setLayout(gridLayout);
type_trigger_label = new Label(commun_trigger, SWT.NONE);
type_trigger_label.setText("Type of synchronizer");
createType_trigger_combo();
timeout_label = new Label(commun_trigger, SWT.NONE);
timeout_label.setText("Timeout (ms)");
timeout_spin = new Spinner(commun_trigger, SWT.BORDER);
timeout_spin.setMinimum(0);
timeout_spin.setMaximum(Integer.MAX_VALUE);
timeout_spin.setSelection((int) trigger.getTimeout());
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.CENTER;
gridData.grabExcessHorizontalSpace = true;
timeout_spin.setLayoutData(gridData);
}
示例6: createType_trigger_combo
/**
* This method initializes type_trigger_combo
*
*/
private void createType_trigger_combo() {
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.verticalAlignment = GridData.CENTER;
gridData2.grabExcessHorizontalSpace = true;
type_trigger_combo = new Combo(commun_trigger, SWT.READ_ONLY);
type_trigger_combo.setItems(customTriggers);
type_trigger_combo
.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
int index = type_trigger_combo.getSelectionIndex();
if (index == -1) {
type_trigger_combo.select(0);
} else if (index != last_index && custom_triggers != null) {
help_label.setText(custom_triggers[index].getHelp());
stackLayout.topControl = custom_triggers[index];
custom_trigger.layout();
last_index = index;
if (index == 5) { // NoWait case
timeout_label.setVisible(false);
timeout_spin.setVisible(false);
} else {
timeout_label.setVisible(true);
timeout_spin.setVisible(true);
}
}
}
});
type_trigger_combo.setLayoutData(gridData2);
}
示例7: initialize
private void initialize() {
WaitTimeTrigger trigger = (parent.getTrigger() instanceof WaitTimeTrigger) ? (WaitTimeTrigger) parent.getTrigger() : null;
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalAlignment = GridData.CENTER;
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
Label label = new Label(this, SWT.CHECK);
label.setText("Check this to force detection of any DOM changes\nwhile waiting. (Can cause heavy CPU load)");
check = new Button(this, SWT.CHECK);
check.setSelection((trigger != null) ? trigger.isDoDirty() : false);
}
示例8: initialize
protected void initialize() {
Label label0 = new Label (this, SWT.NONE);
label0.setText ("Please choose an element to import into a sequence's step:");
GridData data = new GridData ();
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
data.heightHint = 200;
list = new List(this, SWT.BORDER | SWT.V_SCROLL);
list.setLayoutData (data);
GridData gridData2 = new GridData();
gridData2.horizontalSpan = 2;
gridData2.verticalAlignment = GridData.CENTER;
gridData2.horizontalAlignment = GridData.FILL;
labelProgression = new Label(this, SWT.NONE);
labelProgression.setText("Progression");
labelProgression.setLayoutData(gridData2);
GridData gridData4 = new GridData();
gridData4.horizontalSpan = 2;
gridData4.verticalAlignment = GridData.CENTER;
gridData4.horizontalAlignment = GridData.FILL;
progressBar = new ProgressBar(this, SWT.NONE);
//progressBar.setBounds(new Rectangle(16, 349, 571, 17));
progressBar.setLayoutData(gridData4);
GridLayout gridLayout = new GridLayout();
setLayout(gridLayout);
setSize(new Point(408, 251));
}
示例9: initialize
protected void initialize() {
Label label0 = new Label (this, SWT.NONE);
label0.setText ("Please enter the XML structure to import into a sequence's step:");
GridData data = new GridData ();
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
data.heightHint = 200;
xml = new Text(this, SWT.BORDER | SWT.V_SCROLL);
xml.setLayoutData (data);
GridData gridData2 = new GridData();
gridData2.horizontalSpan = 2;
gridData2.verticalAlignment = GridData.CENTER;
gridData2.horizontalAlignment = GridData.FILL;
labelProgression = new Label(this, SWT.NONE);
labelProgression.setText("Progression");
labelProgression.setLayoutData(gridData2);
GridData gridData4 = new GridData();
gridData4.horizontalSpan = 2;
gridData4.verticalAlignment = GridData.CENTER;
gridData4.horizontalAlignment = GridData.FILL;
progressBar = new ProgressBar(this, SWT.NONE);
//progressBar.setBounds(new Rectangle(16, 349, 571, 17));
progressBar.setLayoutData(gridData4);
GridLayout gridLayout = new GridLayout();
setLayout(gridLayout);
setSize(new Point(408, 251));
}
示例10: initialize
protected void initialize() {
GridData gridData3 = new GridData();
gridData3.grabExcessHorizontalSpace = false;
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.BEGINNING;
gridData2.grabExcessHorizontalSpace = false;
gridData2.horizontalSpan = 2;
gridData2.verticalAlignment = GridData.CENTER;
GridData gridData = new GridData();
label1 = new Label(this, SWT.NONE);
label1.setText("Object type");
label1.setLayoutData(gridData);
createCombo();
label2 = new Label(this, SWT.NONE);
label2.setText("Substring");
text = new Text(this, SWT.BORDER);
text.setLayoutData(gridData3);
checkBox = new Button(this, SWT.CHECK);
checkBox.setText("Match case");
checkBox.setLayoutData(gridData2);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
setSize(new Point(226, 125));
combo.select(0);
text.setText("");
}
示例11: createConvertigoGroup
/**
* This method initializes convertigoGroup
*
*/
private void createConvertigoGroup() {
convertigoGroup = new Group(this, SWT.FILL);
convertigoGroup.setLayout(new GridLayout());
convertigoGroup.setText("Convertigo server login");
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.verticalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalIndent = 10;
convertigoGroup.setLayoutData(gridData2);
GridData gridData3 = new GridData();
gridData3.horizontalAlignment = GridData.FILL;
gridData3.verticalAlignment = GridData.CENTER;
gridData3.grabExcessHorizontalSpace = true;
convertigoAdminLabel = new Label(convertigoGroup, SWT.NONE);
convertigoAdminLabel.setText("Server administrator");
convertigoAdmin = new Text(convertigoGroup, SWT.BORDER);
convertigoAdmin.setLayoutData(gridData3);
GridData gridData5 = new GridData();
gridData5.horizontalAlignment = GridData.FILL;
gridData5.verticalAlignment = GridData.CENTER;
gridData5.grabExcessHorizontalSpace = true;
convertigoAdminPassword = new Label(convertigoGroup, SWT.NONE);
convertigoAdminPassword.setText("Password");
convertigoPassword = new Text(convertigoGroup, SWT.BORDER | SWT.PASSWORD);
convertigoPassword.setLayoutData(gridData5);
}
示例12: initialize
/**
* This method initializes this
*
*/
private void initialize() {
GridData gridData1 = new GridData();
gridData1.horizontalAlignment = GridData.FILL;
gridData1.verticalAlignment = GridData.CENTER;
gridData1.grabExcessHorizontalSpace = true;
GridLayout gridLayout = new GridLayout();
this.setLayout(gridLayout);
this.setLayoutData(gridData1);
createCommun_trigger();
GridData gridData3 = new GridData();
gridData3.horizontalAlignment = GridData.FILL;
gridData3.verticalAlignment = GridData.CENTER;
gridData3.grabExcessHorizontalSpace = true;
help_label = new Label(this, SWT.BORDER | SWT.WRAP);
help_label.setLayoutData(gridData3);
custom_trigger = new Composite(this,SWT.NONE);
custom_trigger.setLayout(stackLayout);
// GridData gridData2 = new GridData();
// gridData2.horizontalAlignment = GridData.FILL;
// gridData2.verticalAlignment = GridData.FILL;
// gridData2.grabExcessVerticalSpace = true;
// gridData2.grabExcessHorizontalSpace = true;
//
// custom_trigger.setLayoutData(gridData2);
custom_triggers = new AbstractHttpTriggerCustomEditorComposite[] {
new HttpTriggerDocumentCompletedEditorComposite(this),
new HttpTriggerXpathEditorComposite(this),
new HttpTriggerWaitTimeEditorComposite(this),
new HttpTriggerScreenClassEditorComposite(this),
new HttpTriggerDownloadStartedEditorComposite(this),
new HttpTriggerNoWaitEditorComposite(this)
};
Class<?> cl = trigger.getClass();
if (cl.equals(DocumentCompletedTrigger.class)){
type_trigger_combo.select(0);
} else if (cl.equals(XpathTrigger.class)) {
type_trigger_combo.select(1);
} else if (cl.equals(WaitTimeTrigger.class)) {
type_trigger_combo.select(2);
} else if (cl.equals(ScreenClassTrigger.class)) {
type_trigger_combo.select(3);
} else if (cl.equals(DownloadStartedTrigger.class)) {
type_trigger_combo.select(4);
} else if (cl.equals(NoWaitTrigger.class)) {
type_trigger_combo.select(5);
}
}
示例13: initialize
/**
* This method initializes this
*
*/
@Override
protected void initialize() {
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
label = new Label(this, SWT.NONE);
label.setText("Convertigo server");
GridData gridData1 = new GridData();
gridData1.horizontalSpan = 2;
gridData1.horizontalAlignment = GridData.FILL;
gridData1.grabExcessHorizontalSpace = true;
convertigoServer = new Text(this, SWT.BORDER);
convertigoServer.setLayoutData(gridData1);
convertigoServer.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
changeOkButtonState();
}
});
createList();
createConvertigoGroup();
createSSLGroup();
GridData gridData3 = new GridData();
gridData3.horizontalSpan = 2;
gridData3.horizontalAlignment = GridData.FILL;
gridData3.grabExcessHorizontalSpace = true;
gridData3.verticalIndent = 15;
assembleXsl = new Button(this, SWT.CHECK);
assembleXsl.setText("Assemble xsl files included in stylesheets");
assembleXsl.setLayoutData(gridData3);
GridData gridData2 = new GridData();
gridData2.horizontalSpan = 2;
gridData2.verticalAlignment = GridData.CENTER;
gridData2.horizontalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalIndent = 20;
labelProgress = new Label(this, SWT.NONE);
labelProgress.setText("Progression");
labelProgress.setLayoutData(gridData2);
GridData gridData4 = new GridData();
gridData4.horizontalSpan = 2;
gridData4.verticalAlignment = GridData.CENTER;
gridData4.horizontalAlignment = GridData.FILL;
gridData4.grabExcessHorizontalSpace = true;
progressBar = new ProgressBar(this, SWT.NONE);
progressBar.setLayoutData(gridData4);
fillList();
}
示例14: DirBrowseComposite
public DirBrowseComposite(Composite composite) {
super(composite, SWT.NONE);
this.setSize(this.getParent().getBounds().width,
this.getParent().getBounds().height /* buttonHeight*/ );
this.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridLayout gridLayout = new GridLayout(3, true);
gridLayout.makeColumnsEqualWidth = false;
this.setLayout(gridLayout);
Label labelDirPath = new Label(this, SWT.NONE);
// gridDateLabel.widthHint = labelWidth;
// gridDateLabel.heightHint = buttonHeight;
labelDirPath.setLayoutData(new GridData(labelWidth, SWT.DEFAULT));
labelDirPath.setText("Template Directory");
final Text dirPathValue = new Text(this, SWT.SINGLE | SWT.BORDER);
GridData gridDateDirPathValue = new GridData(GridData.FILL,
GridData.CENTER, true, false);
gridDateDirPathValue.widthHint = this.getBounds().width - 70;
gridDateDirPathValue.heightHint = buttonHeight;
dirPathValue.setLayoutData(gridDateDirPathValue);
final Button buttonDirBrowse = new Button(this, SWT.PUSH);
GridData gridDataButtonDirBrowse = new GridData(GridData.FILL,
GridData.CENTER, false, false);
gridDataButtonDirBrowse.widthHint = 70;
gridDataButtonDirBrowse.heightHint = buttonHeight;
buttonDirBrowse.setLayoutData(gridDataButtonDirBrowse);
buttonDirBrowse.setText("Browse");
buttonDirBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dlg = new DirectoryDialog(composite.getShell());
dlg.setFilterPath(dirPathValue.getText());
dlg.setText("Template Directory Dialog");
dlg.setMessage("Select a directory");
String dir = dlg.open();
if (dir != null) {
dirPathValue.setText(dir);
}
}
});
}