use of org.eclipse.swt.widgets.Group in project cogtool by cogtool.
the class SEDemoView method layOutWindow.
/**
* Lay out the window including the interactionDrawing editor
* @param edit
*
* @param tableCallback
*/
public void layOutWindow(int deviceTypes, SWTListMultiColumn rowRenderer) {
Shell shell = getShell();
// Set up the layouts
shell.setLayout(new FormLayout());
// Create a group for the properties on the history
historyProperties = new Group(shell, SWT.NONE);
historyProperties.setLayout(new FormLayout());
if (editable) {
// Create the delete Item button
deleteItem = new Button(historyProperties, SWT.PUSH);
deleteItem.setText(L10N.get("SE.DeleteStep", "Delete Step"));
deleteItem.addSelectionListener(new SWTWidgetChangeHandler(SEDemoLID.Delete));
lIDMap.addWidget(SEDemoLID.Delete, deleteItem, ListenerIdentifierMap.NORMAL);
// this.regenerateItem = new Button(this.historyProperties, SWT.PUSH);
// this.regenerateItem.setText(L10N.get("SE.RegenerateScript",
// "Regenerate Script"));
// this.regenerateItem.addSelectionListener(
// new SWTWidgetChangeHandler(SEDemoLID.RegenerateScript));
//
// this.lIDMap.addWidget(SEDemoLID.RegenerateScript,
// this.regenerateItem,
// ListenerIdentifierMap.NORMAL);
// Create the compute button
computeItem = new Button(historyProperties, SWT.PUSH);
computeItem.setText(COMPUTE);
computeItem.addSelectionListener(new SWTWidgetChangeHandler(SEDemoLID.RecomputeScript));
lIDMap.addWidget(SEDemoLID.RecomputeScript, computeItem, ListenerIdentifierMap.NORMAL);
}
// Script
scriptStepListLabel = new Label(historyProperties, SWT.CENTER);
String scriptStepLabel = scriptStepListTitle;
if (!editable) {
scriptStepLabel += " (" + VIEW_ONLY + ")";
scriptStepListLabel.setBackground(NONEDITABLE_COLOR);
}
scriptStepListLabel.setText(scriptStepLabel);
Table scriptStepTable = new Table(historyProperties, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
scriptStepTable.setFont(FontUtils.SYMBOL_FONT);
scriptSteps = rowRenderer;
scriptSteps.setTable(scriptStepTable);
scriptSteps.setColumnTitles(columnTitles);
if (editable) {
addHandOnKeyboardToStart(deviceTypes, historyProperties);
}
predictionResult = new Label(shell, SWT.LEFT);
FormData editorData = new FormData();
editorData.top = new FormAttachment(0, 5);
editorData.left = new FormAttachment(0, 5);
editorData.bottom = new FormAttachment(100, -5);
Label predictionLabel = new Label(shell, SWT.LEFT);
predictionLabel.setText(predictionTitle);
predictionLabel.setFont(PREDICTION_LABEL_FONT);
Button showVisButton = new Button(shell, SWT.PUSH);
FormData data = new FormData();
data.top = new FormAttachment(showVisButton, 0, SWT.CENTER);
data.left = new FormAttachment(historyProperties, 5, SWT.LEFT);
predictionLabel.setLayoutData(data);
data = new FormData();
data.top = new FormAttachment(showVisButton, 0, SWT.CENTER);
data.left = new FormAttachment(predictionLabel, 5, SWT.RIGHT);
data.right = new FormAttachment(showVisButton, 0, SWT.LEFT);
predictionResult.setLayoutData(data);
showVisButton.setText(SHOW_VISUALIZATION);
data = new FormData();
data.top = new FormAttachment(0, 10);
data.right = new FormAttachment(historyProperties, 0, SWT.RIGHT);
showVisButton.setLayoutData(data);
showVisButton.addSelectionListener(new SWTWidgetChangeHandler(SEDemoLID.ShowModelVisualization));
lIDMap.addWidget(SEDemoLID.ShowModelVisualization, showVisButton, ListenerIdentifierMap.NORMAL);
data = new FormData();
data.top = new FormAttachment(showVisButton, 2, SWT.BOTTOM);
data.right = new FormAttachment(100, -5);
data.bottom = new FormAttachment(100, -5);
SashUtility.createVerticalSash(getShell(), MIN_DRAWING_AREA_WIDTH, HISTORY_LIST_WIDTH, SWT.RIGHT, editor.bodyComposite, editorData, historyProperties, data);
// Layout contents of widgetGroup
data = new FormData();
data.top = new FormAttachment(predictionLabel, 0, SWT.BOTTOM);
data.left = new FormAttachment(scriptStepTable, 0, SWT.LEFT);
data.right = new FormAttachment(scriptStepTable, 0, SWT.RIGHT);
scriptStepListLabel.setLayoutData(data);
data = new FormData();
data.top = new FormAttachment(scriptStepListLabel, 5, SWT.BOTTOM);
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100, 0);
positionStartLocParms(data);
scriptStepTable.setLayoutData(data);
if (editable) {
data = new FormData();
data.left = new FormAttachment(scriptStepTable, 0, SWT.LEFT);
data.right = new FormAttachment(scriptStepTable, 0, SWT.RIGHT);
data.bottom = new FormAttachment(computeItem, 0, SWT.TOP);
deleteItem.setLayoutData(data);
// data = new FormData();
// data.left = new FormAttachment(scriptStepTable, 0, SWT.LEFT);
// data.right = new FormAttachment(scriptStepTable, 0, SWT.RIGHT);
// data.bottom = new FormAttachment(this.computeItem, 0 , SWT.TOP);
// this.regenerateItem.setLayoutData(data);
data = new FormData();
// use 0 here, since internal frame is set to -05, fix internal frame
data.bottom = new FormAttachment(100, 0);
data.left = new FormAttachment(scriptStepTable, 0, SWT.LEFT);
data.right = new FormAttachment(scriptStepTable, 0, SWT.RIGHT);
computeItem.setLayoutData(data);
layOutPropertiesPane(editor.propertiesComposite);
}
}
use of org.eclipse.swt.widgets.Group in project cogtool by cogtool.
the class WebCrawlImportDialog method buildSameURLGroup.
public void buildSameURLGroup() {
sameURLGroup = new Group(comp, SWT.SHADOW_NONE);
sameURLGroup.setText(SAME_URL_GROUP);
sameURLGroup.setLayout(new FormLayout());
pruneCrawlOnSame = new Button(sameURLGroup, SWT.RADIO);
pruneCrawlOnSame.setText(SAME_URL_PRUNE_LABEL);
pruneCrawlOnSame.setSelection(true);
pruneCrawlOnSame.setEnabled(false);
replacePageOnSame = new Button(sameURLGroup, SWT.RADIO);
replacePageOnSame.setText(SAME_URL_REPLACE_LABEL);
replacePageOnSame.setEnabled(false);
}
use of org.eclipse.swt.widgets.Group in project cogtool by cogtool.
the class WebCrawlImportDialog method buildThirdGroup.
public void buildThirdGroup() {
typeHTMLGroup3 = new Group(useSelectionGroup, SWT.SHADOW_NONE);
typeHTMLGroup3.setText("Starting URL #3");
typeHTMLGroup3.setLayout(new FormLayout());
urlText3 = new TextWithEnableFix(typeHTMLGroup3, SWT.BORDER | SWT.SINGLE);
urlText3.setText("http://");
urlText3.addTraverseListener(new TraverseListener() {
public void keyTraversed(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_TAB_PREVIOUS) {
e.detail = SWT.TRAVERSE_NONE;
questionMarkButtonDomain2.forceFocus();
}
}
});
plusButton3 = makeToolBarButton(typeHTMLGroup3, addGroupListener, questionImages.PLUS_IMAGE);
minusButton3 = makeToolBarButton(typeHTMLGroup3, minusGroupListener3, questionImages.MINUS_IMAGE);
maximumDepthToCrawlLabel3 = new Label(typeHTMLGroup3, SWT.NONE);
maximumDepthToCrawlLabel3.setText("Maximum Depth To Crawl: ");
questionMarkButtonDepth3 = makeToolBarButton(typeHTMLGroup3, depthListener, questionImages.QUESTION_SHADOW);
maxDepthCombo3 = new ComboWithEnableFix(typeHTMLGroup3, SWT.DROP_DOWN | SWT.READ_ONLY);
maxDepthCombo3.add("Unlimited");
for (int i = 0; i < 100; i++) {
maxDepthCombo3.add("" + i);
}
maxDepthCombo3.select(2);
maxDepthCombo3.setVisibleItemCount(21);
useHTML7 = new Button(typeHTMLGroup3, SWT.RADIO);
useHTML7.addSelectionListener(domainListener);
useHTML7.setSelection(true);
useHTML8 = new Button(typeHTMLGroup3, SWT.RADIO);
useHTML8.addSelectionListener(domainListener);
useHTML9 = new Button(typeHTMLGroup3, SWT.RADIO);
useHTML9.addSelectionListener(domainListener);
urlPath7 = new Label(typeHTMLGroup3, SWT.NONE);
urlPath7.setText("Unrestricted");
urlPath8 = new Label(typeHTMLGroup3, SWT.NONE);
urlPath8.setText("http://host_name/");
urlPath9 = new Label(typeHTMLGroup3, SWT.NONE);
urlPath9.setText("http://host_name/path");
urlPath9b = new Label(typeHTMLGroup3, SWT.NONE);
urlPath9b.setText("path");
urlPath9b.setFont(URL_PATH_FONT);
urlPath9b.setVisible(false);
maxDepthCombo3.addSelectionListener(comboListener);
restrictDomainLabel3 = new Label(typeHTMLGroup3, SWT.NONE);
restrictDomainLabel3.setText("Restrict Domain: ");
questionMarkButtonDomain3 = makeToolBarButton(typeHTMLGroup3, domainHelpListener, questionImages.QUESTION_SHADOW);
urlText3.addFocusListener(new TextFocusListener(urlText3, urlPath8, urlPath9, useHTML7, useHTML8, useHTML9, 3));
}
use of org.eclipse.swt.widgets.Group in project tdi-studio-se by Talend.
the class MultiSchemasUI method addGroupEscapeChar.
private void addGroupEscapeChar(final Composite mainComposite) {
// Composite Escape Char
//$NON-NLS-1$
Group group = Form.createGroup(mainComposite, 3, Messages.getString("FileStep2.groupEscapeCharSettings"), 100);
// CSV or Positionel Radio
csvRadio = new Button(group, SWT.RADIO);
csvRadio.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getConnection().setCsvOption(csvRadio.getSelection());
if (csvRadio.getSelection()) {
getConnection().setSplitRecord(false);
}
}
});
//$NON-NLS-1$
csvRadio.setText(Messages.getString("FileStep2.csv"));
delimitedRadio = new Button(group, SWT.RADIO);
//$NON-NLS-1$
delimitedRadio.setText(Messages.getString("FileStep2.delimited"));
GridData gridData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
gridData.horizontalSpan = 2;
delimitedRadio.setLayoutData(gridData);
getConnection().setCsvOption(false);
delimitedRadio.setSelection(true);
// escape Char Combo
escapeCharCombo = new LabelledCombo(group, Messages.getString("FileStep2.escapeChar"), //$NON-NLS-1$
Messages.getString("FileStep2.escapeCharTip"), ESCAPE_CHAR_DATA, 1, false, //$NON-NLS-1$
SWT.READ_ONLY);
escapeCharFlag = new Label(group, SWT.NONE);
//$NON-NLS-1$
escapeCharFlag.setText(" ");
// Text Enclosure Combo
textEnclosureCombo = new LabelledCombo(group, Messages.getString("FileStep2.textEnclosure"), //$NON-NLS-1$
Messages.getString("FileStep2.textEnclosureTip"), TEXT_ENCLOSURE_DATA, 1, false, //$NON-NLS-1$
SWT.READ_ONLY);
textEnclosureFlag = new Label(group, SWT.NONE);
//$NON-NLS-1$
textEnclosureFlag.setText(" ");
}
use of org.eclipse.swt.widgets.Group in project tdi-studio-se by Talend.
the class HL7OutputUI method addSchemaViewer.
private void addSchemaViewer(final Composite mainComposite, final int width, final int height) {
// Group Schema Viewer
final Group group = Form.createGroup(mainComposite, 1, "Linker Source", height);
// add by wzhang. add a combo for tFileOutputMSXML.
createCombo(group);
schemaViewer = new TableViewer(group);
// schemaViewer.set
// schemaViewer.getTable().setBackground(schemaViewer.getTable().getDisplay().getSystemColor(SWT.COLOR_WHITE));
HL7OutputTableViewerProvider provider = new HL7OutputTableViewerProvider();
schemaViewer.setContentProvider(provider);
schemaViewer.setLabelProvider(provider);
GridData data2 = new GridData(GridData.FILL_BOTH);
Table table = schemaViewer.getTable();
// see bug 7087
if (canModify || isRespo) {
table.setEnabled(false);
}
// table.setLinesVisible(true);
table.setHeaderVisible(true);
TableColumn column1 = new TableColumn(table, SWT.LEFT);
column1.setText("Schema List");
column1.setWidth(100);
table.setLayoutData(data2);
}
Aggregations