當前位置: 首頁>>代碼示例>>Java>>正文


Java ListViewer.getList方法代碼示例

本文整理匯總了Java中org.eclipse.jface.viewers.ListViewer.getList方法的典型用法代碼示例。如果您正苦於以下問題:Java ListViewer.getList方法的具體用法?Java ListViewer.getList怎麽用?Java ListViewer.getList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.viewers.ListViewer的用法示例。


在下文中一共展示了ListViewer.getList方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createDialogArea

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite container) {
	Composite parent = (Composite) super.createDialogArea(container);
	listViewer = new ListViewer(parent);
	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.heightHint = convertHeightInCharsToPixels(15);
	gd.widthHint = convertWidthInCharsToPixels(55);
	org.eclipse.swt.widgets.List list = listViewer.getList();
	list.setLayoutData(gd);
	list.setFont(container.getFont());

	if (values != null){
		list.setItems(values);
	}

	if (list.getItemCount() > 0){
		list.select(list.getItemCount() - 1);
	}
	addButtons(parent);
	return parent;
}
 
開發者ID:ShoukriKattan,項目名稱:ForgedUI-Eclipse,代碼行數:22,代碼來源:StringListDialog.java

示例2: createDialogArea

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
	setTitle(title);		
	setMessage("Select a class.", IMessageProvider.INFORMATION);
			
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	
	listViewer = new ListViewer(container, SWT.BORDER | SWT.V_SCROLL);
	list = listViewer.getList();
	list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	initValues();
	
	return container;
}
 
開發者ID:anatlyzer,項目名稱:anatlyzer,代碼行數:21,代碼來源:AskClasses.java

示例3: createDialogArea

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
/**
 * 
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 */
@Override
protected Control createDialogArea(Composite parent) {
	setMessage("In order to execute your requested operation, you have to select a server.");
	setTitle("Please select a Server");
	final Composite area = (Composite) super.createDialogArea(parent);
	final Composite container = new Composite(area, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	container.setLayoutData(new GridData(GridData.FILL_BOTH));

	listViewer = new ListViewer(container, SWT.BORDER | SWT.V_SCROLL);
	final List list = listViewer.getList();
	list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	listViewer.setContentProvider(ArrayContentProvider.getInstance());
	labelProvider = new ServerInfoLabelProvider();
	listViewer.setLabelProvider(labelProvider);
	listViewer.setInput(servers);
	if (servers.size() == 1) {
		listViewer.setSelection(new StructuredSelection(servers.get(0)));
	}
	return area;
}
 
開發者ID:edgarmueller,項目名稱:emfstore-rest,代碼行數:28,代碼來源:ServerInfoSelectionDialog.java

示例4: createChartsComposite

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
private void createChartsComposite (Composite container)
{
	Group grpResources = new Group(container, SWT.NONE);
	grpResources.setText("Resources");
	grpResources.setLayout(new FillLayout(SWT.HORIZONTAL));
	SashForm sashResources = new SashForm(grpResources, SWT.HORIZONTAL | SWT.SMOOTH);
	sashResources.setSashWidth(8);

	listViewer = new ListViewer(sashResources, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	listResources = listViewer.getList();// new List(sashResources,
											// SWT.BORDER | SWT.H_SCROLL |
											// SWT.V_SCROLL);
	listViewer.setContentProvider(new ArrayContentProvider());
	listViewer.setLabelProvider(new LabelProvider()
	{
		@Override
		public String getText(Object element)
		{
			return element.toString().replaceFirst("-org.spotter.demo.app.", "");
		}
	});
	canvasRes = new Canvas(sashResources, SWT.NONE);
	sashResources.setWeights(new int[] {3, 7});
	addCanvasListeners();
}
 
開發者ID:CloudScale-Project,項目名稱:Environment,代碼行數:26,代碼來源:ResultAlternativeComposite.java

示例5: WTimeZoneList

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
/**
 * Create an instance of WTimeZoneList, a single select list of available time zones.
 * @param parent
 * @param style
 */
public WTimeZoneList(Composite parent, int style) {
	super(parent, style);
	setLayout(new FillLayout(SWT.HORIZONTAL));
	
	listViewer = new ListViewer(this, SWT.BORDER | SWT.V_SCROLL);
	list = listViewer.getList();
	timeZonesIDs = TimeZone.getAvailableIDs();
	initList();
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:15,代碼來源:WTimeZoneList.java

示例6: WLocaleList

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
/**
 * Create an instance of WLocaleList, a single select list of available locales.
 * 
 * @param parent
 * @param style
 */
public WLocaleList(Composite parent, int style) {

	super(parent, style);
	setLayout(new FillLayout(SWT.HORIZONTAL));

	listViewer = new ListViewer(this, SWT.BORDER | SWT.V_SCROLL);
	list = listViewer.getList();
	locales = Locale.getAvailableLocales();
	initList();
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:17,代碼來源:WLocaleList.java

示例7: createPartControl

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
@Override
public void createPartControl(Composite parent) {
	parent.setLayout(new GridLayout(3, false));

	Label lblProject = new Label(parent, SWT.NONE);
	lblProject.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	lblProject.setText("Project");

	cProjects = new Combo(parent, SWT.NONE);
	cProjects.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Button bSync = new Button(parent, SWT.NONE);
	bSync.setText("Sync");
	new Label(parent, SWT.NONE);
	
	ListViewer listViewer = new ListViewer(parent, SWT.BORDER | SWT.V_SCROLL);
	List list = listViewer.getList();
	listViewer.setContentProvider(new ContentProvider());
	listViewer.setLabelProvider(new ViewerLabelProvider());
	new Label(parent, SWT.NONE);


	bSync.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			super.widgetSelected(e);
			updateProjects();
		}
	});

}
 
開發者ID:ploys,項目名稱:ecle,代碼行數:32,代碼來源:ProjectManagerView.java

示例8: RuntimeServiceSelectionComposite

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
/**
 * Create the composite.
 * @param parent
 * @param style
 */
public RuntimeServiceSelectionComposite(Composite parent, int style)
{
	super(parent, style);

	setLayout(new GridLayout(1, false));
	Label lblSelect = new Label(this, SWT.NONE);
	lblSelect.setText("Select platform runtime service");
	
	listViewer = new ListViewer(this, SWT.BORDER | SWT.V_SCROLL);
	List list = listViewer.getList();
	list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
}
 
開發者ID:CloudScale-Project,項目名稱:Environment,代碼行數:19,代碼來源:RuntimeServiceSelectionComposite.java

示例9: createContents

import org.eclipse.jface.viewers.ListViewer; //導入方法依賴的package包/類
@Override
protected Control createContents(Composite parent){
	Composite mainArea = new Composite(parent, SWT.NONE);
	mainArea.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true));
	
	TableWrapLayout layout = new TableWrapLayout();
	layout.numColumns = 2;
	layout.leftMargin = 0;
	layout.rightMargin = 0;
	layout.topMargin = 0;
	layout.bottomMargin = 0;
	mainArea.setLayout(layout);
	
	TableWrapData twd;
	Label label;
	
	Text infoText = new Text(mainArea, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
	infoText.setLayoutData(SWTHelper.getFillTableWrapData(2, true, 1, false));
	infoText.setText("Bitte wählen Sie die Labors aus, für welche Sie die Werte"
		+ " in der Praxis selber ermitteln.");
	
	label = new Label(mainArea, SWT.NONE);
	label.setText("Praxislabors:");
	
	ownLaborsList = new ListViewer(mainArea, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	List list = ownLaborsList.getList();
	twd = SWTHelper.getFillTableWrapData(1, true, 1, false);
	twd.heightHint = VISIBLE_NUMBER_OF_LABORS * list.getItemHeight();
	list.setLayoutData(twd);
	
	ownLaborsList.setContentProvider(new LaborsListContentProvider());
	ownLaborsList.setLabelProvider(new LaborsListLabelProvider());
	ownLaborsList.setInput(this);
	
	Label lblNoCols = new Label(mainArea, SWT.NONE);
	lblNoCols.setText("Spalten pro Seite:");
	
	spinnerNoCol = new Spinner(mainArea, SWT.BORDER);
	spinnerNoCol.setPageIncrement(1);
	spinnerNoCol.setMaximum(10);
	spinnerNoCol.setMinimum(1);
	spinnerNoCol.setSelection(7);
	
	loadFromConfig();
	
	return mainArea;
}
 
開發者ID:elexis,項目名稱:elexis-3-base,代碼行數:48,代碼來源:MesswertePreferences.java


注:本文中的org.eclipse.jface.viewers.ListViewer.getList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。