本文整理汇总了Java中org.eclipse.swt.layout.GridData.FILL属性的典型用法代码示例。如果您正苦于以下问题:Java GridData.FILL属性的具体用法?Java GridData.FILL怎么用?Java GridData.FILL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.layout.GridData
的用法示例。
在下文中一共展示了GridData.FILL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPartControl
public void createPartControl(Composite parent) {
try {
parent.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
GridLayout gridLayout = new GridLayout();
parent.setLayout(gridLayout);
gridLayout.horizontalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
gridLayout.verticalSpacing = 0;
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
SequenceEditorInput sequenceEditorInput = (SequenceEditorInput) getEditorInput();
sequenceEditorPart = new SequenceEditorPart(this, sequenceEditorInput.sequence, parent, SWT.None);
sequenceEditorPart.setLayoutData(gridData);
}
catch(Throwable e) {
ConvertigoPlugin.logException(e, "Unable to create editor part");
}
}
示例2: createTitleControl
@Override
protected Control createTitleControl(Composite parent) {
text = new Text(parent, SWT.NONE);
GridData textLayoutData = new GridData();
textLayoutData.horizontalAlignment = GridData.FILL;
textLayoutData.verticalAlignment = GridData.FILL;
textLayoutData.grabExcessHorizontalSpace = true;
textLayoutData.grabExcessVerticalSpace = false;
textLayoutData.horizontalSpan = 2;
text.setLayoutData(textLayoutData);
text.addKeyListener(new FilterKeyListener());
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(DO_SHOW_DIALOG ? 1 : 2, 1)
.applyTo(text);
return text;
}
示例3: 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);
}
示例4: createXPathEvaluator
public void createXPathEvaluator(StepXpathEvaluatorComposite xpathEvaluatorComposite) {
xpathEvaluator = xpathEvaluatorComposite;
GridData gd = new GridData();
gd.horizontalAlignment = GridData.FILL;
gd.verticalAlignment = GridData.FILL;
gd.grabExcessVerticalSpace = true;
gd.grabExcessHorizontalSpace = true;
xpathEvaluator.setLayoutData(gd);
xpathEvaluator.getXpath().addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
String anchor = xpathEvaluator.getAnchor();
StringEx sx = new StringEx(xpathEvaluator.getXpath().getText());
sx.replace(anchor, ".");
String text = sx.toString();
if (!text.equals("")) {
setSourceXPath(text);
}
//TODO: disable/enable OK button
}
});
}
示例5: createPartControl
public void createPartControl(Composite parent) {
try {
parent.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
GridLayout gridLayout = new GridLayout();
parent.setLayout(gridLayout);
gridLayout.horizontalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
gridLayout.verticalSpacing = 0;
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
ConnectorEditorInput connectorEditorInput = (ConnectorEditorInput) getEditorInput();
connectorEditorPart = new ConnectorEditorPart(this, connectorEditorInput.connector, parent, SWT.None);
connectorEditorPart.setLayoutData(gridData);
}
catch(Throwable e) {
ConvertigoPlugin.logException(e, "Unable to create editor part");
}
}
示例6: createStyledText
private StyledText createStyledText() {
styledText = new StyledText(shell,
SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); // SWT.WRAP
GridData gridData = new GridData();
styledText.setFont(
new Font(shell.getDisplay(), "Source Code Pro Light", 10, SWT.NORMAL));
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessVerticalSpace = true;
styledText.setLayoutData(gridData);
styledText.addLineStyleListener(lineStyler);
styledText.setEditable(false);
styledText
.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
return styledText;
}
示例7: createFieldEditors
@Override
protected void createFieldEditors() {
createJenkinsCLIFieldEditors();
Label spacer2 = new Label(getFieldEditorParent(), SWT.LEFT);
GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd2.horizontalSpan = 2;
gd2.heightHint = convertHeightInCharsToPixels(1) / 2;
spacer2.setLayoutData(gd2);
/* -------------------------------------------------------------- */
/* ------------------------ APPEARANCE -------------------------- */
/* -------------------------------------------------------------- */
GridData appearanceLayoutData = new GridData();
appearanceLayoutData.horizontalAlignment = GridData.FILL;
appearanceLayoutData.verticalAlignment = GridData.BEGINNING;
appearanceLayoutData.grabExcessHorizontalSpace = true;
appearanceLayoutData.grabExcessVerticalSpace = false;
appearanceLayoutData.verticalSpan = 2;
appearanceLayoutData.horizontalSpan = 3;
Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
appearanceComposite.setLayout(layout);
appearanceComposite.setLayoutData(appearanceLayoutData);
createOtherFieldEditors(appearanceComposite);
createBracketsFieldEditors(appearanceComposite);
}
示例8: 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);
}
示例9: createDefaultComposite
protected Composite createDefaultComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
composite.setLayout(layout);
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
composite.setLayoutData(data);
return composite;
}
示例10: createStandardText
public void createStandardText ( final Composite parent, final String attributeName, final int style, final String label, final String textMessage, final IObservableMap data, final Object valueType )
{
final Label labelControl = this.toolkit.createLabel ( parent, label + ":" );
final boolean multi = ( style & SWT.MULTI ) > 0;
if ( multi )
{
labelControl.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, false, false ) );
}
final Text text = this.toolkit.createText ( parent, "", style );
text.setMessage ( textMessage );
final GridData gd = new GridData ( GridData.FILL, multi ? GridData.FILL : GridData.BEGINNING, true, true );
gd.horizontalSpan = 2;
text.setLayoutData ( gd );
text.setToolTipText ( textMessage );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, String.class );
if ( valueType != null && valueType != String.class )
{
final WritableValue conversionValue = new WritableValue ( null, valueType );
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), conversionValue );
this.dbc.bindValue ( conversionValue, value );
}
else
{
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
}
}
示例11: setButtonGridData
/**
* A helper method to customize the button
*
* @param button
*/
private void setButtonGridData(Button button) {
if (gd instanceof GridData) {
((GridData) gd).widthHint = getButtonWidthHint(button);
((GridData) gd).horizontalAlignment = GridData.FILL;
}
}
示例12: skip
/**
* @param parent
*/
private void skip(Composite parent) {
Label lblDummy = new Label(parent, SWT.NONE);
lblDummy.setText("");
GridData gd = new GridData(GridData.FILL);
lblDummy.setLayoutData(gd);
}
示例13: FilterAdvancedComposite
public FilterAdvancedComposite ( final FilterChangedListener filterChangedListener, final Composite parent, final int style )
{
// fields
super ( parent, style );
// widgets
this.tabFolder = new CTabFolder ( this, SWT.TOP | SWT.BORDER | SWT.CLOSE );
this.addOrConditionButton = creteAddOrConditionButton ();
addOrCondition ();
// layout
final GridLayout layout = new GridLayout ( 1, true );
layout.marginLeft = 6;
layout.marginRight = 6;
layout.marginTop = 6;
layout.marginBottom = 6;
layout.verticalSpacing = 12;
this.setLayout ( layout );
final GridData tabFolderLayoutData = new GridData ();
tabFolderLayoutData.horizontalAlignment = GridData.FILL;
tabFolderLayoutData.grabExcessHorizontalSpace = true;
tabFolderLayoutData.verticalAlignment = GridData.FILL;
tabFolderLayoutData.grabExcessVerticalSpace = true;
this.tabFolder.setLayoutData ( tabFolderLayoutData );
this.tabFolder.setBackgroundMode ( SWT.INHERIT_FORCE );
final GridData addOrConditionButtonLayoutdata = new GridData ();
addOrConditionButtonLayoutdata.horizontalAlignment = GridData.END;
this.addOrConditionButton.setLayoutData ( addOrConditionButtonLayoutdata );
}
示例14: 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);
}
示例15: initialize
/**
* This method initializes this
*
*/
private void initialize() {
ScreenClassTrigger trigger = (parent.getTrigger() instanceof ScreenClassTrigger) ? (ScreenClassTrigger) parent
.getTrigger() : null;
scrClass_label = new Label(this, SWT.NONE);
scrClass_label.setText("Screen classes");
scrClass_list = new List(this, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
java.util.List<HtmlScreenClass> scList = getScreenClassList();
java.util.List<String> items = new ArrayList<String>();
for (ScreenClass sc : scList) {
String scName = sc.getName();
scrClass_list.add(scName);
if (trigger != null) {
if (trigger.getScreenClasses().contains(scName)) {
items.add(scName);
}
}
}
scrClass_list.setSelection(items.toArray(new String[items.size()]));
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.verticalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
scrClass_list.setLayoutData(gridData2);
scrClass_list.setSize(400, 250);
}