本文整理汇总了Java中org.eclipse.swt.SWT.FULL_SELECTION属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.FULL_SELECTION属性的具体用法?Java SWT.FULL_SELECTION怎么用?Java SWT.FULL_SELECTION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.FULL_SELECTION属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: createContents
@Override
protected void createContents() {
Label authInfoLabel = new Label(this, SWT.LEAD);
authInfoLabel.setText("Auth Info:");
authInfoLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
_AuthInfoComposite = new ZooKeeperConnectionAuthInfoComposite(this, SWT.NULL);
_AuthInfoComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
GridLayout authInfoCompositeLayout = new GridLayout(2, false);
authInfoCompositeLayout.marginWidth = 0;
authInfoCompositeLayout.marginHeight = 0;
authInfoCompositeLayout.horizontalSpacing = ((GridLayout) getLayout()).horizontalSpacing;
_AuthInfoComposite.setLayout(authInfoCompositeLayout);
Table table = new Table(_AuthInfoComposite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL
| SWT.V_SCROLL);
GridData tableLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
tableLayoutData.heightHint = 200;
table.setLayoutData(tableLayoutData);
_AuthInfoComposite.setTable(table);
Button addButton = new Button(_AuthInfoComposite, SWT.NULL);
addButton.setText("Add...");
addButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
_AuthInfoComposite.setAddButton(addButton);
final Button removeButton = new Button(_AuthInfoComposite, SWT.NULL);
removeButton.setText("Remove");
removeButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
_AuthInfoComposite.setRemoveButton(removeButton);
_AuthInfoComposite.init();
}
示例3: createMenu
private Composite createMenu ( final Composite parent )
{
final Composite menu = new Composite ( parent, SWT.NONE );
menu.setLayout ( new FillLayout () );
this.viewer = new TreeViewer ( menu, SWT.FULL_SELECTION );
this.treeContentProvider = new ObservableListTreeContentProvider ( new FactoryImpl (), null );
this.viewer.setContentProvider ( this.treeContentProvider );
this.viewer.setLabelProvider ( new TreeNodeLabelProvider ( this.viewer,
BeansObservables.observeMap ( this.treeContentProvider.getRealizedElements (), TreeNode.PROP_NAME ),
BeansObservables.observeMap ( this.treeContentProvider.getRealizedElements (), TreeNode.PROP_PROVIDER_SET )
) );
this.viewer.setInput ( this.manager.getRootNode () );
this.viewer.addSelectionChangedListener ( new ISelectionChangedListener () {
@Override
public void selectionChanged ( final SelectionChangedEvent event )
{
handleSelectionChanged ( event );
}
} );
this.viewer.setAutoExpandLevel ( 2 );
return menu;
}
示例4: createTable
/**
* This method initializes table
*
*/
private void createTable() {
int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL |
SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
table = new Table(this, style);
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.grabExcessVerticalSpace = true;
gridData.horizontalSpan = 3;
table.setLayoutData(gridData);
table.setLinesVisible(true);
table.setHeaderVisible(true);
}
示例5: CategoriesDialogTargetComposite
/**
* Create the composite.
*
* @param parent
* @param categoriesDialogSourceComposite
* @param style
*/
public CategoriesDialogTargetComposite(Composite parent, CategoriesDialogSourceComposite categoriesDialogSourceComposite, int style) {
super(parent, style);
setLayout(new GridLayout(2, false));
new Label(this, SWT.NONE);
Composite upperComposite = new Composite(this, SWT.NONE);
upperComposite.setLayout(new GridLayout(2, false));
GridData gd_upperComposite = new GridData(SWT.FILL, SWT.FILL, true, false, 0, 0);
gd_upperComposite.heightHint = 34;
upperComposite.setLayoutData(gd_upperComposite);
Label lblSelectedCategories = new Label(upperComposite, SWT.NONE);
lblSelectedCategories.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
lblSelectedCategories.setText("Selected Packages");
createDelButton(upperComposite);
createMiddleLayer();
targetList = new List(this, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION|SWT.V_SCROLL|SWT.H_SCROLL);
targetList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
loadPackagesFromPropertyFileSettingFolder();
addDropSupport();
linkSourceAndTarget(categoriesDialogSourceComposite);
}
示例6: createNewFilePage
@Override
protected WizardNewFileCreationPage createNewFilePage() {
return new NewFilePage(getSelection(), fileExt) {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
Composite control = (Composite) getControl();
Composite extensionGroup = new Composite(control, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
extensionGroup.setLayout(layout);
extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
refOccieLabel.setText(Messages.NewExtensionWizard_RefExtensionLabel);
refOccieLabel.setFont(parent.getFont());
Composite composite = new Composite(extensionGroup, SWT.NULL);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(layoutData);
TableColumnLayout tableLayout = new TableColumnLayout();
composite.setLayout(tableLayout);
Table table = new Table(composite,
SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
refExtensionViewer = new CheckboxTableViewer(table);
refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());
Collection<String> registeredExtensions = new ArrayList<String>(
OcciRegistry.getInstance().getRegisteredExtensions());
refExtensionViewer.setInput(registeredExtensions);
}
};
}
示例7: createPartControl
@Override
public void createPartControl(Composite content) {
content.setLayout(new GridLayout(1, false));
Util.removeMargins(content);
this.viewer = new TableViewer(content, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
viewer.setUseHashlookup(true);
viewer.getTable().setHeaderVisible(true);
viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createColumns();
viewer.setContentProvider(createContentProvider());
try {
queueConnection = service.createSubmitter(getUri(), getSubmissionQueueName());
queueConnection.setStatusTopicName(getTopicName());
updateQueue();
String name = getSecondaryIdAttribute("partName");
if (name!=null) setPartName(name);
createActions();
// We just use this submitter to read the queue
createTopicListener(getUri());
} catch (Exception e) {
logger.error("Cannot listen to topic of command server!", e);
}
selectionProvider = new DelegatingSelectionProvider(viewer);
getViewSite().setSelectionProvider(selectionProvider);
viewer.addSelectionChangedListener(event -> updateSelected() );
}
示例8: initialize
public void initialize(Composite composite, int defaultOrientation) {
display = composite.getDisplay();
composite.addDisposeListener((DisposeListener) this::dispose);
tableViewer = new TableViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL | SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED );
table = tableViewer.getTable();
GridData gridData = new GridData();
gridData.verticalAlignment = GridData.FILL;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
tableViewer.getControl().setLayoutData(gridData);
tableViewer.setContentProvider((ILazyContentProvider) rowIndex -> tableViewer.replace(contentProvider().getTableEntries().get(rowIndex), rowIndex));
table.addListener(SWT.Selection, event-> {
TableItem item = (TableItem) event.item;
contentProvider().setCursorIndex(contentProvider().getRowIndex((RankedItem<T>) item.getData()));
handleSelection();
});
composite.getShell().addListener(SWT.Resize, event -> autoAdjustColumnWidths(composite));
// TODO try throttleLast or custom scheduler
//subjectFilter.debounce(0, TimeUnit.MILLISECONDS).subscribe( filter -> handleRefresh(filter));
}
示例9: createViewer
protected void createViewer() {
FormLayout formLayout = new FormLayout();
setLayout(formLayout);
Composite con = new Composite(this, SWT.NONE);
FormData topData = new FormData();
topData.left = new FormAttachment(0,0);
topData.right = new FormAttachment(100,0);
topData.top = new FormAttachment(0,0);
con.setLayoutData(topData);
con.setLayout(new GridLayout(3,false));
createTopArea(con);
viewer = new TreeViewer(this, SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
contentProvider = new PrefsContentProvider();
viewer.setContentProvider(contentProvider);
viewer.getTree().setHeaderVisible(true);
viewer.getTree().setLinesVisible(true);
FormData viewerData = new FormData();
viewerData.top = new FormAttachment(con, 5);
viewerData.bottom = new FormAttachment(100,0);
viewerData.left = new FormAttachment(0,0);
viewerData.right = new FormAttachment(100,0);
viewer.getTree().setLayoutData(viewerData);
viewerFilter = new PreferenceFilter();
viewer.addFilter(viewerFilter);
filterJob = new SetFilterJob(viewer, viewerFilter);
}
示例10: addIn0InputFields
private void addIn0InputFields(Composite inputComposite2) {
List<FilterProperties> inputIn0PortFieldList = null;
if (lookupMappingGrid != null) {
if (lookupMappingGrid.getLookupInputProperties() != null
&& !lookupMappingGrid.getLookupInputProperties()
.isEmpty()) {
inputIn0PortFieldList = lookupMappingGrid
.getLookupInputProperties().get(0);
} else {
inputIn0PortFieldList = new ArrayList<>();
}
}
if (inputPorts != null) {
inputPorts.add(inputIn0PortFieldList);
if (inputIn0PortFieldList != null) {
for (FilterProperties inputField : inputIn0PortFieldList) {
allInputFields.add(IN0_PREFIX + inputField.getPropertyname());
}
}
}
TableViewer in0TableViewer = new TableViewer(inputComposite2, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
in0Table = in0TableViewer.getTable();
in0Table.setLinesVisible(true);
in0Table.setHeaderVisible(true);
in0Table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
in0TableViewer.setContentProvider(new ArrayContentProvider());
TableViewerColumn in0TableViewerColumn = new TableViewerColumn(
in0TableViewer, SWT.NONE);
TableColumn in0TblclmnInputFields = in0TableViewerColumn.getColumn();
in0TblclmnInputFields.setWidth(230);
in0TblclmnInputFields.setText(IN0_HEADER);
in0TableViewerColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
FilterProperties tableField = (FilterProperties) element;
return tableField.getPropertyname();
}
});
in0TableViewer.setInput(inputIn0PortFieldList);
Transfer[] in0Types = new Transfer[] { TextTransfer.getInstance() };
final String in0PortLabel = IN0_PREFIX;
int in0Operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
// final Table table = (Table) sourceControl;
DragSource in0Source = new DragSource(in0Table, in0Operations);
in0Source.setTransfer(in0Types);
in0Source.addDragListener(new DragSourceAdapter() {
public void dragSetData(DragSourceEvent event) {
// Set the data to be the first selected item's text
event.data = addDelimeter(in0PortLabel, in0Table.getSelection());
}
});
}
示例11: getTableStyle
protected int getTableStyle() {
return SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION;
}
示例12: getTableStyle
@Override
protected int getTableStyle() {
return SWT.SINGLE | SWT.FULL_SELECTION;
}
示例13: createTargetTable
private void createTargetTable(Composite container) {
targetTableViewer = new TableViewer(container, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
targetTable = targetTableViewer.getTable();
GridData gd_table_1 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
gd_table_1.heightHint = 401;
if(OSValidator.isMac()){
gd_table_1.widthHint = 363;
}else{
gd_table_1.widthHint = 352;
}
targetTable.setLayoutData(gd_table_1);
attachTargetTableListeners();
targetTableViewer.setContentProvider(new SecondaryColumnKeysContentProvider());
targetTableViewer.setLabelProvider(new SecondaryColumnKeysLabelProvider());
targetTableViewer.setInput(propertyList);
TableColumn targetTableColumnFieldName = new TableColumn(targetTable, SWT.LEFT);
targetTableColumnFieldName.setText(COLUMNNAME); //$NON-NLS-1$
TableColumn targetTableColumnSortOrder = new TableColumn(targetTable, SWT.LEFT_TO_RIGHT);
targetTableColumnSortOrder.setText(SORTORDER); //$NON-NLS-1$
for (int i = 0, n = targetTable.getColumnCount(); i < n; i++) {
targetTable.getColumn(i).pack();
}
targetTableColumnFieldName.setWidth(175);
if(OSValidator.isMac()){
targetTableColumnSortOrder.setWidth(128);
}else{
targetTableColumnSortOrder.setWidth(116);
}
targetTable.setHeaderVisible(true);
targetTable.setLinesVisible(true);
// enables the tab functionality
TableViewerEditor.create(targetTableViewer, new ColumnViewerEditorActivationStrategy(targetTableViewer),
ColumnViewerEditor.KEYBOARD_ACTIVATION | ColumnViewerEditor.TABBING_HORIZONTAL
| ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_VERTICAL);
final CellEditor propertyNameeditor = new TextCellEditor(targetTable);
ComboBoxViewerCellEditor propertyValueeditor = new ComboBoxViewerCellEditor(targetTable, SWT.READ_ONLY);
propertyValueeditor.setContentProvider(new ArrayContentProvider());
propertyValueeditor.setLabelProvider(new LabelProvider());
propertyValueeditor.setInput(new String[] { Constants.ASCENDING_SORT_ORDER, Constants.DESCENDING_SORT_ORDER, Constants.NONE_SORT_ORDER });
CellEditor[] editors = new CellEditor[] { propertyNameeditor, propertyValueeditor };
propertyNameeditor.setValidator(createNameEditorValidator(Messages.EmptyColumnNotification));
propertyValueeditor.setValidator(createValueEditorValidator(Messages.EmptySortOrderNotification));
targetTableViewer.setColumnProperties(PROPS);
targetTableViewer.setCellModifier(new SecondaryColumnKeysWidgetCellModifier(targetTableViewer));
targetTableViewer.setCellEditors(editors);
loadProperties(targetTableViewer);
if (propertyList.size() != 0) {
deleteButton.setEnabled(true);
}
if (propertyList.size() >= 2) {
upButton.setEnabled(true);
downButton.setEnabled(true);
}
dropTarget = new DropTarget(targetTable, DND.DROP_MOVE);
dropTarget.setTransfer(new Transfer[] { TextTransfer.getInstance() });
dropTarget.addDropListener(new DropTargetAdapter() {
public void drop(DropTargetEvent event) {
for (String fieldName : getformatedData((String) event.data))
addNewProperty(targetTableViewer, fieldName);
enableControlButtons();
}
});
}
示例14: getTreeViewerStyle
@Override
public int getTreeViewerStyle(AvroSchemaEditor editor, AvroContext context, DisplayMode displayMode) {
return SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL;
}
示例15: createPartControl
/**
* Creates an editor for the tree passed in
* @param parent
* @param tree which is edited. If this ControlTreeViewer was created without specifiying a default, this is cloned for the default.
* @param managers, may be null
* @throws Exception
*/
public Composite createPartControl(Composite parent, ControlTree tree, IContributionManager... managers) throws Exception {
if (viewer!=null) throw new IllegalArgumentException("The createPartControl() method must only be called once!");
if (defaultTree==null && tree==null) throw new IllegalArgumentException("No control tree has been defined!");
// Clone this tree so that they can reset it!
if (defaultTree==null) defaultTree = ControlTreeUtils.clone(tree);
if (tree == null) tree = ControlTreeUtils.clone(defaultTree);
if (setUseFilteredTree) {
FilteredTree ftree = new FilteredTree(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE, new NamedNodeFilter(), true);
this.viewer = ftree.getViewer();
this.content = ftree;
} else {
this.viewer = new TreeViewer(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
this.content = viewer.getTree();
}
viewer.getTree().setLinesVisible(true);
viewer.getTree().setHeaderVisible(false);
ViewerUtils.setItemHeight(viewer.getTree(), 30);
content.setLayoutData(new GridData(GridData.FILL_BOTH));
createColumns(viewer);
try {
viewer.setContentProvider(new ControlContentProvider());
} catch (Exception e) {
logger.error("Cannot create content provider", e);
}
viewer.setInput(tree);
viewer.expandAll();
createActions(viewer, tree, managers);
setSearchVisible(false);
try {
registerAll();
} catch (Exception ne) {
logger.error("Cannot listen to motor values changing...");
}
return content;
}