本文整理汇总了Java中org.eclipse.swt.SWT.MULTI属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.MULTI属性的具体用法?Java SWT.MULTI怎么用?Java SWT.MULTI使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.MULTI属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContent
private void createContent() {
toolBar = new ToolBar(this, SWT.HORIZONTAL);
toolBar.setEnabled(false);
GridLayout layout = new GridLayout();
GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, false);
toolBar.setLayout(layout);
toolBar.setLayoutData(layoutData);
ToolItem cancelProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
cancelProcessToolItem.setText(resourceBundle.getString("cancel_process"));
cancelProcessToolItem.addListener(SWT.Selection, event -> {
listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewCancelProcessToolItemClicked);
});
ToolItem terminateProcessToolItem = new ToolItem(toolBar, SWT.PUSH);
terminateProcessToolItem.setText(resourceBundle.getString("kill_process"));
terminateProcessToolItem.addListener(SWT.Selection, event -> {
listeners.forEach(DBProcessInfoViewListener::dbProcessInfoViewTerminateProcessToolItemClicked);
});
processInfoText = new Text(this, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
GridData textLayoutData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
textLayoutData.heightHint = 200;
processInfoText.setLayoutData(textLayoutData);
}
示例2: createControl
/**
* @wbp.parser.entryPoint
*/
@Override
public void createControl(Composite parent) {
fRootControl = new Composite(parent, SWT.NULL);
fRootControl.setLayout(new FillLayout(SWT.HORIZONTAL));
viewer = new TreeViewer(fRootControl, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new ViewLabelProvider(createImageDescriptor())));
viewer.addDoubleClickListener(new IDoubleClickListener () {
@Override
public void doubleClick(DoubleClickEvent evt) {
TreeSelection sel = (TreeSelection) evt.getSelection();
IFile file = (IFile) sel.getFirstElement();
if (isModelFile(file)) {
JDTManager.openEditor(file, "org.gw4e.eclipse.studio.editor.GW4EEditor", null);
return;
}
JDTManager.openEditor(file, null);
}
});
files = new ArrayList<IFile>();
}
示例3: ServersViewer
public ServersViewer ( final Composite parent )
{
parent.setLayout ( new FillLayout () );
this.viewer = new TreeViewer ( parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL );
this.contentProvider = new ObservableSetTreeContentProvider ( new ObservableFactoryImpl (), null );
this.viewer.setContentProvider ( this.contentProvider );
this.labelProvider = new ServerLabelProvider ( this.contentProvider.getKnownElements () );
this.viewer.setLabelProvider ( this.labelProvider );
this.viewer.setInput ( HivesPlugin.getDefault ().getServerManager () );
this.viewer.getControl ().addDisposeListener ( new DisposeListener () {
@Override
public void widgetDisposed ( final DisposeEvent e )
{
handleDispose ();
}
} );
ColumnViewerToolTipSupport.enableFor ( this.viewer );
}
示例4: createSourceTable
private void createSourceTable(SashForm sashForm) {
avaliableFieldTableViewer = new TableViewer(sashForm, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
table_1 = avaliableFieldTableViewer.getTable();
table_1.setLinesVisible(true);
table_1.setHeaderVisible(true);
avaliableFieldTableViewer.setContentProvider(new IStructuredContentProvider() {
@Override
public Object[] getElements(Object inputElement) {
return ((List) inputElement).toArray();
}
});
avaliableFieldTableViewer.setInput(schemaFields);
TableViewerColumn tableViewerColumn_2 = new TableViewerColumn(avaliableFieldTableViewer, SWT.NONE);
TableColumn tblclmnNewColumn_2 = tableViewerColumn_2.getColumn();
tblclmnNewColumn_2.setWidth(196);
tblclmnNewColumn_2.setText(Messages.AVAILABLE_FIELDS_HEADER);
tableViewerColumn_2.setLabelProvider(new ColumnLabelProvider());
attachDragListener();
}
示例5: createComponents
private void createComponents ()
{
final FillLayout layout = new FillLayout ( SWT.VERTICAL );
layout.marginHeight = 12;
layout.marginWidth = 12;
setLayout ( layout );
final Text filterTextField = new Text ( this, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL );
filterTextField.setText ( this.filter );
filterTextField.addKeyListener ( new KeyAdapter () {
@Override
public void keyReleased ( final KeyEvent e )
{
verifyFilter ( filterTextField.getText () );
}
} );
}
示例6: attachToPropertySubGroup
@Override
public void attachToPropertySubGroup(AbstractELTContainerWidget container) {
ELTDefaultSubgroupComposite defaultSubgroupComposite = new ELTDefaultSubgroupComposite(
container.getContainerControl());
defaultSubgroupComposite.createContainerWidget();
AbstractELTWidget eltDefaultLable = new ELTDefaultLable(Messages.EXECUTION_COMMAND);
defaultSubgroupComposite.attachWidget(eltDefaultLable);
styledText=new StyledText(defaultSubgroupComposite.getContainerControl(), SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
GridData gridData=new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.heightHint=80;
styledText.setLayoutData(gridData);
txtDecorator = WidgetUtility.addDecorator(styledText, Messages.bind(Messages.EMPTY_FIELD, Messages.EXECUTION_COMMAND));
ListenerHelper helper = new ListenerHelper();
helper.put(HelperType.CONTROL_DECORATION, txtDecorator);
populateWidget();
styledText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if(StringUtils.isNotBlank(styledText.getText())){
txtDecorator.hide();
}else{
txtDecorator.show();
}
showHideErrorSymbol(widgets);
propertyDialogButtonBar.enableApplyButton(true);
}
});
}
示例7: initialize
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;
cicsData = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
cicsData.setEditable(false);
cicsData.setBackground(new Color(null,253,253,244));
cicsData.setFont(new Font(null,"Courier New",10,1));
cicsData.setLayoutData(gridData);
cicsData.setText("");
this.setLayout(new GridLayout());
setSize(new Point(300, 200));
}
示例8: createDialogArea
@Override
protected Control createDialogArea(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(2, false));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
new Label(container, SWT.NONE).setText(Messages.FeedBackDialog_subject);
txtSubject = new Text(container, SWT.BORDER);
txtSubject.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
new Label(container, SWT.NONE).setText(Messages.e_mail);
emailFrom = new Text(container, SWT.BORDER);
emailFrom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
new Label(container, SWT.NONE).setText(Messages.feedback_message);
txtMessage = new Text(container, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = new PixelConverter(container).convertHeightInCharsToPixels(8);
txtMessage.setLayoutData(gd);
new Label(container, SWT.NONE);
btnCheckLog = new Button(container, SWT.CHECK);
btnCheckLog.setText(Messages.add_log);
return container;
}
示例9: createOperationInputTable
private void createOperationInputTable() {
Composite operationInputFieldComposite = new Composite(mainComposite, SWT.NONE);
operationInputFieldComposite.setLayout(new GridLayout(1, false));
GridData gridDataOperationInputFieldComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gridDataOperationInputFieldComposite.heightHint = 200;
gridDataOperationInputFieldComposite.widthHint = 159;
operationInputFieldComposite.setLayoutData(gridDataOperationInputFieldComposite);
Composite buttonComposite = new Composite(operationInputFieldComposite, SWT.NONE);
buttonComposite.setLayout(new GridLayout(2, false));
GridData gd_buttonComposite = new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1);
gd_buttonComposite.heightHint = 36;
gd_buttonComposite.widthHint = 139;
buttonComposite.setLayoutData(gd_buttonComposite);
addButtonInputTable = new Button(buttonComposite, SWT.NONE);
addButtonInputTable.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
deletButtonInputTable = new Button(buttonComposite, SWT.NONE);
deletButtonInputTable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
deletButtonInputTable.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
inputTableViewer = new TableViewer(operationInputFieldComposite, SWT.BORDER | SWT.FULL_SELECTION|SWT.MULTI);
inputTable = inputTableViewer.getTable();
inputTable.setLinesVisible(true);
inputTable.setHeaderVisible(true);
inputTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
inputTable.setVisible(true);
addButtonInputTable.setToolTipText(Messages.ADD_SCHEMA_TOOLTIP);
deletButtonInputTable.setToolTipText(Messages.DELETE_SCHEMA_TOOLTIP);
}
示例10: workaround_383750
private void workaround_383750 (Composite composite) {
//
List dummy = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
dummy.setBackground(composite.getBackground());
FormData fd_dummy = new FormData();
fd_dummy.top = new FormAttachment(0, 0);
fd_dummy.left = new FormAttachment(0, 1);
fd_dummy.right = new FormAttachment(0, 1);
dummy.setLayoutData(fd_dummy);
}
示例11: createTableViewer
public TableViewer createTableViewer(Composite composite, String[] prop,
int[] bounds, int columnWidth,
IStructuredContentProvider iStructuredContentProvider,
ITableLabelProvider iTableLabelProvider) {
final TableViewer tableViewer = new TableViewer(composite, SWT.BORDER
| SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
Table table = tableViewer.getTable();
table.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
tableViewer.setContentProvider(iStructuredContentProvider);
tableViewer.setLabelProvider(iTableLabelProvider);
tableViewer.setColumnProperties(prop);
tableViewer.getTable().addTraverseListener(new TraverseListener() {
@Override
public void keyTraversed(TraverseEvent e) {
if (e.keyCode == SWT.ARROW_UP) {
e.doit = false;
} else if (e.keyCode == SWT.ARROW_DOWN) {
e.doit = false;
} else if (e.keyCode == SWT.TRAVERSE_ARROW_NEXT) {
e.doit = false;
} else if (e.keyCode == SWT.TRAVERSE_ARROW_PREVIOUS) {
e.doit = false;
}
}
});
table.setVisible(true);
table.setLinesVisible(true);
table.setHeaderVisible(true);
/*
* createTableColumns(table,prop, columnWidth); CellEditor[] editors
* =createCellEditorList(table,1); tableViewer.setCellEditors(editors);
*/
return tableViewer;
}
示例12: createMappingTable
private Table createMappingTable(Composite composite_6) {
mappingTableViewer = new TableViewer(composite_6, SWT.BORDER
| SWT.FULL_SELECTION | SWT.MULTI);
Table table = mappingTableViewer.getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
GridData gd_table = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_table.widthHint = 374;
table.setLayoutData(gd_table);
mappingTableViewer.setContentProvider(new ArrayContentProvider());
ColumnViewerToolTipSupport.enableFor(mappingTableViewer);
return table;
}
示例13: createPartControl
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setSorter(new NameSorter());
viewer.setInput(getViewSite());
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
示例14: 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);
}
示例15: createControl
@Override
@PostConstruct
public void createControl(final Composite parent) {
setPageComplete(true);
this.container = new Composite(parent, SWT.NONE);
setControl(this.container);
this.container.setLayout(new FillLayout(SWT.VERTICAL));
this.list = new org.eclipse.swt.widgets.List(this.container, SWT.BORDER | SWT.MULTI);
for (int i = 0; i < this.fields.size(); i++) {
this.list.add(this.fields.get(i).getName());
}
}