當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。