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


Java List.setVisible方法代碼示例

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


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

示例1: showRefs

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
private void showRefs(Scanner input, ArrayList<String> refStrings) {
	while(input.hasNext()){
		String line = input.nextLine();
		if (!line.equals("") && line.length() > 0)
			refStrings.add(line);

	}
	if (refStrings.size() == 0){
		MessageBox dialog = 
				new MessageBox(parent.getShell(), SWT.ERROR | SWT.OK);
		dialog.setText("Error");
		dialog.setMessage("No refactoring information was found!");
		dialog.open();
	} else{
		list = new List(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
		list.setBounds (20, 100, 250, 250);
		list.setVisible(true);
		for (int i = 0; i < refStrings.size(); i++) {
			list.add(refStrings.get(i));
		}
	}
}
 
開發者ID:SEAL-UCLA,項目名稱:Ref-Finder,代碼行數:23,代碼來源:RefDistillerView.java

示例2: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * @see Dialog#createDialogArea(Composite)
 */
protected Control createDialogArea(Composite parent) {
	Composite result = new Composite(parent, SWT.NONE);
	result.setLayout(new GridLayout());
	result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	macList = new List(result, SWT.BORDER | SWT.MULTI );
	macList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	if (macroArray != null){
		for (int i=0; i< macroArray.size(); i++){
			macList.add(getLabel(macroArray.get(i)));
		}
		macList.pack(true);
		macList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		macList.setVisible(true);
	} 
	result.setVisible(true);
	macList.addDisposeListener(new DisposeListener() {
		public void widgetDisposed(DisposeEvent e) {
			macList = null;
		}
	});
	return result;
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:26,代碼來源:KbdMacroListEditor.java

示例3: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * @see Dialog#createDialogArea(Composite)
 */
protected Control createDialogArea(Composite parent) {
	Composite result = new Composite(parent, SWT.NONE);
	result.setLayout(new GridLayout());
	result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	catList = new List(result, SWT.BORDER | SWT.MULTI );
	catList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	if (categoryArray != null){
		for (int i=0; i< categoryArray.size(); i++){
			catList.add(getLabel(categoryArray.get(i)));
		}
		catList.pack(true);
		catList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		catList.setVisible(true);
	} 
	result.setVisible(true);
	catList.addDisposeListener(new DisposeListener() {
		public void widgetDisposed(DisposeEvent e) {
			catList = null;
		}
	});
	return result;
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:26,代碼來源:CommandCategoryEditor.java


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