CheckboxTableViewer attachmentTableViewer;
TableColumn tblclmnNewColumn;
ImageHyperlink lnkCC;
ComboViewer labelViewer;
FormText receiversText;
TableWrapData tableWrapData;
parent.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
sashForm = new SashForm(parent, SWT.NONE);
sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
messageTabFolder = new CTabFolder(sashForm, SWT.BOTTOM | SWT.FLAT);
messageTabFolder.setSelectionBackground(
new Color[] {
Display.getCurrent().getSystemColor(
SWT.COLOR_TITLE_BACKGROUND),
Display.getCurrent().getSystemColor(
SWT.COLOR_TITLE_BACKGROUND_GRADIENT),
Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND) },
new int[] { 50, 100 });
messageTabFolder.setBorderVisible(true);
messageTabFolder.setBackgroundMode(SWT.INHERIT_FORCE);
this.toolkit.adapt(messageTabFolder, true, true);
emailTab = new CTabItem(messageTabFolder, SWT.NONE);
emailTab.setText(MessageEditorMessages.getString("MessageEditor.emailTab.text")); //$NON-NLS-1$
Composite emailComposite = new Composite(messageTabFolder, SWT.NONE);
emailComposite.setLayout(new FillLayout());
this.toolkit.adapt(emailComposite);
emailTab.setControl(emailComposite);
browser = new Browser(emailComposite, SWT.NONE);
this.toolkit.adapt(browser, true, true);
sourceTab = new CTabItem(messageTabFolder, SWT.NONE);
sourceTab.setText(MessageEditorMessages.getString("MessageEditor.sourceTab.text")); //$NON-NLS-1$
Composite sourceComposite = new Composite(messageTabFolder, SWT.NONE);
sourceComposite.setLayout(new FillLayout());
this.toolkit.adapt(sourceComposite);
sourceTab.setControl(sourceComposite);
this.sourceViewer = new TextViewer(sourceComposite, SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY | SWT.H_SCROLL);
this.sourceViewer.setEditable(false);
this.toolkit.adapt(sashForm, true, true);
composite = this.toolkit.createComposite(sashForm, SWT.NONE);
composite.setBackgroundMode(SWT.INHERIT_FORCE);
gridLayout = new GridLayout();
gridLayout.numColumns = 2;
composite.setLayout(gridLayout);
this.toolkit.paintBordersFor(composite);
toolBar = new ToolBar(composite, SWT.FLAT);
toolBar.setBackgroundMode(SWT.INHERIT_FORCE);
gridData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1);
gridData.horizontalIndent = 5;
toolBar.setLayoutData(gridData);
this.toolkit.adapt(toolBar, true, true);
btnReply = new ToolItem(toolBar, SWT.PUSH);
btnReply.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/reply_small.png"));
btnReply.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnReply.toolTipText")); //$NON-NLS-1$
btnReplyAll = new ToolItem(toolBar, SWT.PUSH);
btnReplyAll.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/reply_all_small.png"));
btnReplyAll.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnReplyAll.toolTipText")); //$NON-NLS-1$
btnForward = new ToolItem(toolBar, SWT.PUSH);
btnForward.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/forward_small.png"));
btnForward.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnForward.toolTipText")); //$NON-NLS-1$
new ToolItem(toolBar, SWT.SEPARATOR);
btnDelete = new ToolItem(toolBar, SWT.PUSH);
btnDelete.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/delete_small.png"));
btnDelete.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnDelete.toolTipText")); //$NON-NLS-1$
btnSpam = new ToolItem(toolBar, SWT.CHECK);
btnSpam.setHotImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/virus-detected.png"));
btnSpam.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/virus-detected-2.png"));
btnSpam.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnSpam.toolTipText")); //$NON-NLS-1$
new ToolItem(toolBar, SWT.SEPARATOR);
btnCreateFilter = new ToolItem(toolBar, SWT.PUSH);
btnCreateFilter.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/kview.png"));
btnCreateFilter.setToolTipText(MessageEditorMessages.getString("MessageEditor.btnCreateFilter.toolTipText")); //$NON-NLS-1$
this.toolkit.createLabel(composite, MessageEditorMessages.getString("MessageEditor.label.text"), SWT.NONE); //$NON-NLS-1$
labelViewer = new ComboViewer(composite, SWT.READ_ONLY);
labelViewer.setLabelProvider(new ListLabelProvider());
labelViewer.setContentProvider(new ContentProvider_1());
labelViewer.setInput(new Object());
this.combo = labelViewer.getCombo();
this.toolkit.adapt(this.combo, true, true);
this.combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
scrolledForm = this.toolkit.createScrolledForm(composite);
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
body = scrolledForm.getBody();
body.setBackgroundMode(SWT.INHERIT_FORCE);
gridLayout = new GridLayout();
gridLayout.verticalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
gridLayout.horizontalSpacing = 0;
body.setLayout(gridLayout);
this.toolkit.paintBordersFor(body);
composite = this.toolkit.createComposite(body);
composite.setLayout(new TableWrapLayout());
gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.heightHint = 512;
composite.setLayoutData(gridData);
composite.setBackgroundMode(SWT.INHERIT_FORCE);
this.toolkit.paintBordersFor(composite);
sctnReceivers = this.toolkit.createSection(composite, ExpandableComposite.TWISTIE
| ExpandableComposite.EXPANDED
| ExpandableComposite.TITLE_BAR);
tableWrapData = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
tableWrapData.grabHorizontal = true;
sctnReceivers.setLayoutData(tableWrapData);
sctnReceivers.setText(MessageEditorMessages.getString("MessageEditor.sctnReceivers.text")); //$NON-NLS-1$
Composite receiverComposite = this.toolkit.createComposite(sctnReceivers, SWT.NONE);
receiverComposite.setLayout(new TableWrapLayout());
this.toolkit.paintBordersFor(receiverComposite);
sctnReceivers.setClient(receiverComposite);
receiversText = this.toolkit.createFormText(receiverComposite, false);
tableWrapData = new TableWrapData(TableWrapData.FILL, TableWrapData.FILL);
tableWrapData.grabHorizontal = true;
receiversText.setLayoutData(tableWrapData);
lnkTo = this.toolkit.createImageHyperlink(receiversText, SWT.NONE);
lnkTo.setBounds(0, 0, 130, 24);
lnkTo.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/abcard-item.png"));
lnkTo.setToolTipText("to: dummy@spotnik.de");
lnkTo.setText("Dummy");
lnkCC = this.toolkit.createImageHyperlink(receiversText, SWT.NONE);
lnkCC.setBounds(0, 0, 97, 24);
lnkCC.setImage(SWTResourceManager.getImage(MessageEditor.class, "/icons/ablist-item.png"));
lnkCC.setText("Jack Black");
receiversText.setControl("to", lnkTo);
receiversText.setControl("cc", lnkCC);
receiversText.setText("<form><p><control href=\"to\" /> <control href=\"cc\" /></p></form>", true, true);
toolBar = new ToolBar(sctnReceivers, SWT.NONE);
sctnReceivers.setTextClient(toolBar);
this.toolkit.adapt(toolBar, true, true);