当前位置: 首页>>代码示例>>Java>>正文


Java SWT.VIRTUAL属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.VIRTUAL属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.VIRTUAL属性的具体用法?Java SWT.VIRTUAL怎么用?Java SWT.VIRTUAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.VIRTUAL属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

public void init(int attributes) {
    if (table != null)
        throw new InvalidParameterException("init already called on table!");
    attributes |= SWT.VIRTUAL;
    isVirtual = (attributes & SWT.VIRTUAL) != 0;
    table = new Table(parent, attributes);
    table.setHeaderVisible(true);
    if (oddEvenColors)
        enableBasicOddEvenColors();

    changeTableLayout(numColumns);

    table.setData(this);
    if (sortMenu != null)
        table.setMenu(sortMenu);
    table.setFont(FontShop.tableFont());

    initCallbacks();
    addKeyBoardListener();
    addSelectionListener(this);
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:21,代码来源:SuperTable.java

示例2: InterfacesComponent

/**
 * Creates a new interfaces component inside the parent composite using the given model.
 *
 * @param interfacesContainingModel
 *            A interface containing model
 * @param container
 *            The component container
 */
public InterfacesComponent(InterfacesContainingModel interfacesContainingModel,
		WizardComponentContainer container) {
	super(container);
	this.model = interfacesContainingModel;

	Composite parent = getParentComposite();

	Label interfacesLabel = new Label(parent, SWT.NONE);

	GridData interfacesLabelGridData = fillLabelDefaults();
	interfacesLabelGridData.verticalAlignment = SWT.TOP;
	interfacesLabel.setLayoutData(interfacesLabelGridData);

	interfacesLabel.setText("Interfaces:");

	interfacesTable = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
	interfacesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	Composite interfacesButtonsComposite = new Composite(parent, SWT.NONE);
	interfacesButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().create());

	interfacesButtonsComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).margins(0, 0).create());

	interfacesAddButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesAddButton.setText("Add...");
	interfacesAddButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	interfacesRemoveButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesRemoveButton.setText("Remove");
	interfacesRemoveButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	setupBindings();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:41,代码来源:InterfacesComponentProvider.java

示例3: initTableViewer

private static void initTableViewer(TableViewer tableViewer, ElementTypes elementTypes, Object input,
        IElementBinding elementBinding) {

    IViewerType viewerType = new TableViewerType();

    Table table = tableViewer.getTable();
    Class<?> contentProviderInterfaceType = IStructuredContentProvider.class;
    if ((table.getStyle() & SWT.VIRTUAL) != 0) {
        contentProviderInterfaceType = ILazyContentProvider.class;
    }

    registerTableListeners(table);

    initViewer(tableViewer, elementTypes, input, elementBinding, viewerType, contentProviderInterfaceType);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:15,代码来源:ViewerFactory.java

示例4: createTable

private void createTable(Composite parent) {
	GridData gridData = new GridData();
	gridData.horizontalSpan = numColumns;
	gridData.horizontalAlignment = GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.verticalAlignment = GridData.FILL;
	table = new Table(parent, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
	table.setLayoutData(gridData);
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:XMLTableWizardPage.java

示例5: createTable

private void createTable() {
	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;
	table = new Table(this, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
	table.setLayoutData(gridData);
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:11,代码来源:SqlConnectorComposite.java

示例6: 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));

}
 
开发者ID:dakaraphi,项目名称:eclipse-plugin-commander,代码行数:27,代码来源:KaviList.java

示例7: 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;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:39,代码来源:ELTSWTWidgets.java

示例8: createContent

private void createContent() {
    treeViewer = new TMTreeViewer(this, SWT.VIRTUAL | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION);
    GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
    treeViewer.getControl().setLayoutData(layoutData);
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:5,代码来源:DBProcessesView.java

示例9: initTreeViewer

private static void initTreeViewer(TreeViewer treeViewer, ElementTypes elementTypes, Object input,
        IElementBinding elementBinding) {

    IViewerType viewerType = new TreeViewerType();

    Class<?> contentProviderInterfaceType = ITreeContentProvider.class;
    if ((treeViewer.getTree().getStyle() & SWT.VIRTUAL) != 0) {
        contentProviderInterfaceType = ILazyTreeContentProvider.class;
    }

    initViewer(treeViewer, elementTypes, input, elementBinding, viewerType, contentProviderInterfaceType);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:13,代码来源:ViewerFactory.java


注:本文中的org.eclipse.swt.SWT.VIRTUAL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。