本文整理汇总了Java中org.eclipse.swt.SWT.FILL属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.FILL属性的具体用法?Java SWT.FILL怎么用?Java SWT.FILL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.FILL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureText
void configureText(final Composite parent) {
// Don't set caret to 'null' as this causes
// https://bugs.eclipse.org/293263.
// text.setCaret(null);
Color background = JFaceColors.getBannerBackground(parent.getDisplay());
Color foreground = JFaceColors.getBannerForeground(parent.getDisplay());
text.setFont(parent.getFont());
text.setText(item.getText());
text.setBackground(background);
text.setForeground(foreground);
text.setMargins(TEXT_MARGIN, TEXT_MARGIN, TEXT_MARGIN, 0);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
text.setLayoutData(gd);
aboutTextManager = new AboutTextManager(text);
aboutTextManager.setItem(item);
createTextMenu();
}
示例2: find
public void find() {
if (menuManager.getMiniModeSelection())
return;
if (findBar != null) {
findBar.dispose();
} else {
findBar = new FindBar(shell, this);
GridData gd = new GridData();
gd.grabExcessHorizontalSpace = true;
gd.horizontalAlignment = SWT.FILL;
gd.verticalAlignment = SWT.FILL;
findBar.setLayoutData(gd);
menuManager.setFindEnabled(true);
findBar.addListener(SWT.Dispose, new Listener() {
public void handleEvent(Event event) {
menuManager.setFindEnabled(false);
findBar = null;
}
});
}
shell.layout();
}
示例3: createEmptyPanel
/**
* Creates just an empty panel with a message indicating there are no reports to display
*/
private void createEmptyPanel() {
Composite emptyPanel = new Composite(scrollChild, SWT.BORDER);
GridData gData = new GridData(SWT.FILL, SWT.FILL, true, true);
gData.heightHint = 100;
emptyPanel.setLayoutData(gData);
emptyPanel.setLayout(new GridLayout());
Label nothingToDisplay = new Label(emptyPanel, SWT.NONE);
nothingToDisplay.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
nothingToDisplay.setText(MessageText.getString("Progress.reporting.no.reports.to.display"));
/*
* Mark this as being opened and is showing the empty panel
*/
isShowingEmpty = true;
}
示例4: createDialogArea
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(final Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
parent.getShell().setText(Messages.DATA_VIEWER + " " + Messages.FILTER);
container.setLayout(new GridLayout(1, false));
container.getShell().setMinimumSize(800,355);
Composite mainComposite = new Composite(container, SWT.NONE);
mainComposite.setLayout(new GridLayout(1, false));
GridData gdMainComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gdMainComposite.heightHint = 355;
gdMainComposite.widthHint = 832;
mainComposite.setLayoutData(gdMainComposite);
CTabFolder tabFolder = new CTabFolder(mainComposite, SWT.NONE);
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
createRemoteTabItem(tabFolder, remoteTableViewer);
createLocalTabItem(tabFolder, localTableViewer);
parent.getShell().setDefaultButton(remoteSaveButton);
tabFolder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CTabItem tabItem = (CTabItem) e.item;
if (StringUtils.equalsIgnoreCase(tabItem.getText(),Messages.ORIGINAL_DATASET)) {
parent.getShell().setDefaultButton(remoteSaveButton);
} else if(StringUtils.equalsIgnoreCase(tabItem.getText(),Messages.DOWNLOADED_DATASET)){
parent.getShell().setDefaultButton(localSaveButton);
}
}
});
FilterHelper.INSTANCE.setDataViewerAdapter(dataViewerAdapter,this);
FilterHelper.INSTANCE.setDebugDataViewer(debugDataViewer);
return container;
}
示例5: createTopComposite
private void createTopComposite(Composite main_composite) {
top_composite = new Composite(main_composite, SWT.NONE);
top_composite.setLayout(new GridLayout(4, false));
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
gd_composite_1.heightHint = 45;
top_composite.setLayoutData(gd_composite_1);
Label applyAllLabel = new Label(top_composite, SWT.NONE);
applyAllLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
applyAllLabel.setText(Messages.REMAINING_FIELDS);
applyAllLabel.setToolTipText(Messages.REMAINING_FIELDS_TOOLTIP);
combo = new CCombo(top_composite, SWT.NONE);
GridData gd_combo = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
gd_combo.widthHint = 143;
combo.setLayoutData(gd_combo);
draggedFields.add(0,"Select");
combo.setItems(convertToArray(draggedFields));
combo.select(0);
Composite composite_2 = new Composite(top_composite, SWT.NONE);
composite_2.setLayout(new GridLayout(3, false));
composite_2.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, true, true, 1, 1));
deleteButton = new Button(composite_2, SWT.NONE);
deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, false, 1, 1));
deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
attachDeleteButtonListener(deleteButton);
deleteButton.setEnabled(false);
}
示例6: DBProcessesFiltersView
public DBProcessesFiltersView(ResourceBundle resourceBundle, Composite parent, int style) {
super(parent, style);
this.resourceBundle = resourceBundle;
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, false);
setLayout(layout);
setLayoutData(layoutData);
createContent();
}
示例7: createDialogArea
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
getShell().setText(
MultiParameterFileDialogConstants.PARAMETER_FILE_DIALOG_TEXT);
container_1 = (Composite) super.createDialogArea(parent);
mainSashForm = new SashForm(container_1, SWT.HORIZONTAL);
mainSashForm.setSashWidth(6);
GridData gd_mainSashForm = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_mainSashForm.heightHint = 476;
gd_mainSashForm.widthHint = 851;
mainSashForm.setLayoutData(gd_mainSashForm);
createParameterFilesBox(container_1);
populateFilePathTableViewer();
Composite composite = createParameterFileViewOuterComposite(mainSashForm);
SashForm childSashForm=new SashForm(composite, SWT.VERTICAL);
childSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
createViewParameterFileBox(childSashForm);
ParameterFile jobSpecificFile = getJobSpecificFile();
if (jobSpecificFile != null)
populateViewParameterFileBox(jobSpecificFile);
createParameterSearchBox(childSashForm);
mainSashForm.setWeights(new int[] {260, 214});
Label lblNewLabel = new Label(container_1, SWT.NONE);
lblNewLabel.setText(Messages.NOTE_FOR_SAME_PARAMETERS_DEFINED_IN_MULTIPLE_PARAMETER_FILES_THE_LOWERMOST_FILE_WILL_BE_GIVEN_PRECEDENCE_OVER_OTHERS);
return container_1;
}
示例8: TwistieSection
/**
* Create a TwistieSection with the given style bit.
* <p>Style bit can be one or more of:</p>
* <ul>
* <li> TwistieLabel.NONE</li> -- The default; does not show description and separator, and is collapsed
* <li> TwistieLabel.SHOW_DESCRIPTION</li> -- Show the description below the separator (or title if separator s not shown)
* <li> TwistieLabel.SHOW_SEPARATOR</li> -- Show a separator below the title
* <li> TwistieLabel.SHOW_EXPANDED</li> -- Show a separator below the title
* </ul>
*/
public TwistieSection(Composite parent, int style) {
super(parent, SWT.NONE);
setBackgroundMode(SWT.INHERIT_FORCE);
GridLayout gLayout = new GridLayout();
gLayout.marginHeight = 0;
gLayout.marginWidth = 0;
gLayout.verticalSpacing = 0;
setLayout(gLayout);
label = new TwistieLabel(this, style);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
content = new TwistieContentPanel(this, SWT.NONE);
final GridData gDataExpanded = new GridData(SWT.FILL, SWT.FILL, true, true);
gDataExpanded.horizontalIndent = 10;
final GridData gDataCollapsed = new GridData(SWT.FILL, SWT.FILL, true,
false);
gDataCollapsed.heightHint = 0;
content._setLayoutData((label.isCollapsed()) ? gDataCollapsed
: gDataExpanded);
label.addTwistieListener(new ITwistieListener() {
@Override
public void isCollapsed(boolean value) {
content._setLayoutData((value) ? gDataCollapsed : gDataExpanded);
layout(true, true);
}
});
}
示例9: createErrorLabel
private void createErrorLabel(Composite container) {
errorLabel = new Label(container, SWT.NONE);
errorLabel.setText(DIALOG_MESSAGE);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
gridData.horizontalSpan = 6;
errorLabel.setLayoutData(gridData);
}
示例10: createOption
private Button createOption(String option, Composite parent) {
GridData optionsLD = new GridData(SWT.FILL, SWT.CENTER, false, false);
Button opt = new Button(parent, SWT.CHECK);
opt.setText(option);
opt.setLayoutData(optionsLD);
return opt;
}
示例11: createPageNumberDisplay
private void createPageNumberDisplay(Composite composite_3) {
Text pageNumberDisplayTextBox = new Text(composite_3, SWT.BORDER | SWT.CENTER);
pageNumberDisplayTextBox.setEnabled(false);
pageNumberDisplayTextBox.setEditable(false);
GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_text.widthHint = 178;
pageNumberDisplayTextBox.setLayoutData(gd_text);
windowControls.put(ControlConstants.PAGE_NUMBER_DISPLAY, pageNumberDisplayTextBox);
}
示例12: createContents
@Override
protected Control createContents(Composite parent) {
Composite panel = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
panel.setLayout(layout);
btnForceUnixNewlines = new Button(panel, SWT.CHECK);
btnForceUnixNewlines.setText(Messages.ProjectProperties_force_unix_newlines);
btnForceUnixNewlines.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
btnForceUnixNewlines.setSelection(prefs.getBoolean(PROJ_PREF.FORCE_UNIX_NEWLINES, true));
Label label = new Label(panel, SWT.NONE);
label.setText(Messages.projectProperties_timezone_for_all_db_connections);
cmbTimezone = new Combo(panel, SWT.BORDER | SWT.DROP_DOWN);
cmbTimezone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
cmbTimezone.setItems(UIConsts.TIME_ZONES.toArray(new String[UIConsts.TIME_ZONES.size()]));
String tz = prefs.get(PROJ_PREF.TIMEZONE, ApgdiffConsts.UTC);
cmbTimezone.setText(tz);
cmbTimezone.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
checkSwitchWarnLbl();
}
});
lblWarn = new CLabel(panel, SWT.NONE);
lblWarn.setImage(Activator.getEclipseImage(ISharedImages.IMG_OBJS_WARN_TSK));
lblWarn.setText(Messages.ProjectProperties_change_projprefs_warn);
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false, 2, 1);
gd.exclude = true;
lblWarn.setLayoutData(gd);
lblWarn.setVisible(false);
return panel;
}
示例13: DBProcessInfoView
public DBProcessInfoView(ResourceBundle resourceBundle, Composite parent, int style) {
super(parent, style);
this.resourceBundle = resourceBundle;
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
GridData layoutData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
setLayout(layout);
setLayoutData(layoutData);
createContent();
}
示例14: attachWidget
@Override
public void attachWidget(Composite container) {
defaultELTButton = new Button(container, SWT.CENTER);
GridData gd_defaultELTButton = new GridData(SWT.FILL, SWT.CENTER, grabExcessSpace, false, 1, 1);
gd_defaultELTButton.widthHint = buttonWidth;
if (OSValidator.isMac()) {
gd_defaultELTButton.horizontalIndent=-3;
}
gd_defaultELTButton.heightHint = buttonHeight;
defaultELTButton.setLayoutData(gd_defaultELTButton);
defaultELTButton.setText(buttonText);
widget = defaultELTButton;
}
示例15: ProcessesView
public ProcessesView(Composite parentComposite, int style) {
super(parentComposite, style);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
setLayout(layout);
setLayoutData(layoutData);
createContent();
}