本文整理汇总了Java中org.eclipse.swt.SWT.WRAP属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.WRAP属性的具体用法?Java SWT.WRAP怎么用?Java SWT.WRAP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.WRAP属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
@Override
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(2, true));
new Label(container, SWT.NONE).setText(Messages.DiffWizard_source + ':');
new Label(container, SWT.NONE).setText(Messages.DiffWizard_target + ':');
lblSource = new Label(container, SWT.WRAP);
lblTarget = new Label(container, SWT.WRAP);
diffTable = new DiffTableViewer(container, false, null);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
gd.widthHint = 480;
gd.heightHint = 360;
diffTable.setLayoutData(gd);
setControl(container);
}
示例2: initialize
private void initialize() {
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 1;
GridData gridData = new org.eclipse.swt.layout.GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessVerticalSpace = true;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
//minimum size (when dialog open)
gridData.minimumHeight = 200;
gridData.minimumWidth = 300;
this.setLayout(gridLayout);
textArea = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
textArea.setFont(new Font(null,"Tahoma",10,0));
textArea.setLayoutData(gridData);
}
示例3: initialize
private void initialize() {
labelSyntaxe = new Label(this, SWT.NONE);
labelSyntaxe.setText("SQL query syntax examples :\n");
labelSyntaxe.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
labelSQLQuery = new Label(this, SWT.NONE);
labelSQLQuery.setFont(new Font(null,"Tahoma",8,1));
labelSQLQuery.setText("SELECT * FROM EMPLOYEES WHERE (NAME='{parameter_name}')\n"
+ "{? = CALL STORED_FUNCTION({parameter_name})}\n"
+ "{CALL STORED_PROCEDURE({parameter_name})}\n\n");
labelSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
textAreaSQLQuery = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
textAreaSQLQuery.setFont(new Font(null,"Tahoma",10,0));
textAreaSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
GridLayout gridLayout = new GridLayout();
this.setLayout(gridLayout);
setSize(new org.eclipse.swt.graphics.Point(402,289));
}
示例4: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.getShell().setText("Component Details");
container.setLayout(new GridLayout(1, false));
ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
GridData gd_scrolledComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_scrolledComposite.heightHint = 289;
gd_scrolledComposite.widthHint = 571;
scrolledComposite.setLayoutData(gd_scrolledComposite);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
text = new Text(scrolledComposite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
StringBuilder stringBuilder = new StringBuilder();
if(extraComponentList != null && extraComponentList.size() > 0){
stringBuilder.append(Messages.REPLAY_EXTRA_COMPONENTS + "\n");
extraComponentList.forEach(componentName -> { stringBuilder.append(extraCompcount + ". " + componentName + "\n");
extraCompcount++;
});
}
if(missedComponentList != null && missedComponentList.size() > 0 && !missedComponentList.isEmpty()){
stringBuilder.append(Messages.REPLAY_MISSING_COMPONENTS + "\n");
missedComponentList.forEach(componentName -> { stringBuilder.append(missedCompcount + "." + componentName + "\n");
missedCompcount++;
});
}
text.setText(stringBuilder.toString());
scrolledComposite.setContent(text);
return super.createDialogArea(parent);
}
示例5: addFirstSection
private void addFirstSection(Composite parent) {
Composite composite = createDefaultComposite(parent);
//Label for path field
Label pathLabel = new Label(composite, SWT.NONE);
pathLabel.setText(PATH_TITLE);
// Path text field
Text pathValueText = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
pathValueText.setText(((IResource) getElement()).getFullPath().toString());
}
示例6: createrequirementSection
/**
* Create the Text that will hold the Requirement coming from the graphml file
* @param panel
* @param file
*/
protected void createrequirementSection(Composite panel, IFile file) {
Label label = createLabel(panel, MessageUtil.getString("Requirements")); //$NON-NLS-1$
Text t = new Text(panel, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
t.setData(GW4E_FILE_REQUIREMENT_TEXT_ID,GW4E_FILE_REQUIREMENT_TEXT_ID );
Set<String> requirements = null;
String reqMessage = "";
try {
requirements = GraphWalkerFacade.getRequirement(file);
String newline = System.getProperty("line.separator");
if (requirements == null || requirements.size() == 0) {
reqMessage = MessageUtil.getString("NoRequirements");
} else {
StringBuffer sb = new StringBuffer();
for (String req : requirements) {
sb.append(req).append(newline);
}
t.setText(sb.toString());
reqMessage = requirements.size() + " " + MessageUtil.getString("requirementsfound");
}
} catch (Exception e) {
ResourceManager.logException(e);
t.setText(e.getMessage());
}
t.setEditable(false);
GridDataFactory.fillDefaults().grab(true, true).hint(150, 150).applyTo(t);
createLabel(panel, MessageUtil.getString("requirementMessage")); //$NON-NLS-1$
label = createLabel(panel, reqMessage);
fillExcessHorizontalSpace(label);
}
示例7: initialize
@Override
protected void initialize() {
GridData gridData = new org.eclipse.swt.layout.GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
httpData = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
httpData.setLayoutData(gridData);
httpData.setText("");
this.setLayout(new GridLayout());
setSize(new Point(300, 200));
}
示例8: createErrorLabel
public static Label createErrorLabel(Composite p, int colSpan) {
// new Label(g, SWT.NONE);
Label l = new Label(p, SWT.WRAP);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = colSpan;
gd.heightHint = 42;
l.setLayoutData(gd);
l.setForeground(GUI.display.getSystemColor(SWT.COLOR_DARK_RED));
return l;
}
示例9: createNoteComposite
private void createNoteComposite(Composite mainComposite) {
Composite noteComposite = new Composite(mainComposite, SWT.NONE);
noteComposite.setLayout(new GridLayout(1, false));
noteComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Label noteMessage = new Label(noteComposite, SWT.WRAP);
noteMessage.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 1, 1));
noteMessage.setText(Messages.JDK_PATH_DIALOG_NOTE);
}
示例10: populateHeader
private void populateHeader(Composite header) {
header.setBackground(Colors.getSystemColor(display, SWT.COLOR_WHITE));
title = new Label(header, SWT.WRAP);
title.setFont(titleFont);
FillLayout layout = new FillLayout();
layout.marginHeight = 10;
layout.marginWidth = 10;
header.setLayout(layout);
}
示例11: createControl
public void createControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(1, true));
Label label = new Label(container, SWT.WRAP);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
label.setText("A new Convertigo workspace will be created in:\n\n" +
"\t'" + Engine.PROJECTS_PATH + "'\n\n" +
"This action will be completed when this wizard finishes.");
setControl(container);
}
示例12: SummaryPanel
SummaryPanel(Composite parent) {
summary = new StyledText(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL);
summary.setCaret(null);
summary.setEditable(false);
GridData gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL | GridData.GRAB_HORIZONTAL);
gd.horizontalSpan = 2;
// gd.heightHint = 100;
summary.setLayoutData(gd);
BookNotifier.getInstance().addListener(this);
}
示例13: createOutputConsole
private void createOutputConsole(Composite errorComposite) {
outputConsole = new StyledText(errorComposite, SWT.BORDER|SWT.V_SCROLL|SWT.WRAP);
outputConsole.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
outputConsole.setEditable(false);
}
示例14: createModelLayout
/***
* Create the Fields where user enters model to execute
*
* @param parent container composite
* @param font used font
* @return the created composite containing the fields
*/
public Composite createModelLayout(Composite parent, Font font) {
createTextLabelLayout(parent, "Model to execute");
// Model location text
_modelLocationText = new Text(parent, SWT.SINGLE | SWT.BORDER);
_modelLocationText.setLayoutData(createStandardLayout());
_modelLocationText.setFont(font);
_modelLocationText.addModifyListener(fBasicModifyListener);
Button modelLocationButton = createPushButton(parent, "Browse", null);
modelLocationButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
// handleModelLocationButtonSelected();
// TODO launch the appropriate selector
SelectAnyIFileDialog dialog = new SelectAnyIFileDialog();
if (dialog.open() == Dialog.OK) {
String modelPath = ((IResource) dialog.getResult()[0])
.getFullPath().toPortableString();
_modelLocationText.setText(modelPath);
updateLaunchConfigurationDialog();
_modelProject = ((IResource) dialog.getResult()[0]).getProject();
}
}
});
createTextLabelLayout(parent, "Model initialization method");
_modelInitializationMethodText = new Text(parent, SWT.SINGLE | SWT.BORDER);
_modelInitializationMethodText.setLayoutData(createStandardLayout());
_modelInitializationMethodText.setFont(font);
_modelInitializationMethodText.setEditable(false);
createTextLabelLayout(parent, "");
createTextLabelLayout(parent, "Model initialization arguments");
_modelInitializationArgumentsText = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
_modelInitializationArgumentsText.setToolTipText("one argument per line");
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.heightHint = 40;
_modelInitializationArgumentsText.setLayoutData(gridData);
//_modelInitializationArgumentsText.setLayoutData(createStandardLayout());
_modelInitializationArgumentsText.setFont(font);
_modelInitializationArgumentsText.setEditable(true);
_modelInitializationArgumentsText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
updateLaunchConfigurationDialog();
}
});
createTextLabelLayout(parent, "");
return parent;
}
示例15: initialize
private void initialize(Composite composite) {
parent = composite;
// Call plugin listeners
UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
if (uiFunctions != null) {
tabbedMDI = uiFunctions.createTabbedMDI(composite, VIEW_ID);
CTabFolder folder = tabbedMDI.getTabFolder();
Label lblClose = new Label(folder, SWT.WRAP);
lblClose.setText("x");
lblClose.addListener(SWT.MouseUp, new Listener() {
@Override
public void handleEvent(Event event) {
delete();
}
});
folder.setTopRight(lblClose);
UISWTInstance pluginUI = uiFunctions.getUISWTInstance();
registerPluginViews(pluginUI);
if ( pluginUI != null ){
UISWTViewEventListenerWrapper[] pluginViews = pluginUI.getViewListeners(UISWTInstance.VIEW_STATISTICS);
for (int i = 0; i < pluginViews.length; i++) {
UISWTViewEventListenerWrapper l = pluginViews[i];
String name = l.getViewID();
try {
MdiEntrySWT entry = (MdiEntrySWT) tabbedMDI.createEntryFromEventListener(
UISWTInstance.VIEW_STATISTICS, l, name, false, null, null);
entry.setDestroyOnDeactivate(false);
if ((dataSource == null && i == 0) || name.equals(dataSource)) {
tabbedMDI.showEntry(entry);
}
} catch (Exception e) {
// skip
}
}
}
}
updateThread = new UpdateThread();
updateThread.setDaemon(true);
updateThread.start();
dataSourceChanged(dataSource);
}