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


Java List.removeAll方法代碼示例

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


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

示例1: loadListOfServers

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
private void loadListOfServers(List list) {
	ServerStore serverStore = new ServerStore(
			uk.ac.york.mondo.integration.api.dt.Activator.getDefault().getPreferenceStore());
	java.util.List<Server> servers = serverStore.readAllServers();

	list.removeAll();
	
	list.add(CUSTOM_URL_TEXT);

	list.setSelection(0); // by default select option "Custom URL"

	for (Server server : servers) {
		list.add(server.getBaseURL());
	}
	userName.setEnabled(false);
	userName.setText("");
	frontRepoURL.setText("");
}
 
開發者ID:mondo-project,項目名稱:mondo-integration,代碼行數:19,代碼來源:MONDOServerView.java

示例2: setListData

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * 為List組件設置數據
 * @param list
 * @param data
 */
private void setListData(List list, Map<String, String> data) {
	list.removeAll();
	if (data == null) {
		return;
	}
	for (Entry<String, String> entry : data.entrySet()) {
		list.add(entry.getKey());
	}
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:15,代碼來源:CustomMatchConditionDialog.java

示例3: setListData

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * 為List組件設置數據
 * @param list
 * @param data
 */
private void setListData(List list, Map<String, String> data) {
	list.removeAll();
	if (data == null || data.size() == 0) {
		return;
	}
	for (Entry<String, String> entry : data.entrySet()) {
		list.add(entry.getKey());
	}
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:15,代碼來源:CustomFilterDialog.java

示例4: loadFieldList

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
public void loadFieldList(List listFields, String selection) throws ForceConnectionException, ForceRemoteException {
    if (project == null) {
        logger.warn("Unable to initialize controller - project is null");
        return;
    }

    listFields.removeAll();
    Hashtable<String, String> mergeFieldObjects = componentTypes.get(selection);
    if (Utils.isEmpty(mergeFieldObjects)) {
        DescribeSObjectResult describeSObjectResult =
                getDescribeObjectRegistry().getCachedDescribe(project, selection);
        mergeFieldObjects = new Hashtable<>(describeSObjectResult.getFields().length);

        Field[] fields = describeSObjectResult.getFields();
        if (Utils.isNotEmpty(fields)) {
            Arrays.sort(fields, new Comparator<Field>() {
                @Override
                public int compare(Field o1, Field o2) {
                    String name1 = (o1).getLabel();
                    String name2 = (o2).getLabel();
                    return name1.compareTo(name2);
                }
            });
        }

        for (Field field : fields) {
            mergeFieldObjects.put(field.getLabel(), field.getName());
        }
        componentTypes.put(selection, mergeFieldObjects);
    }

    Set<String> mergeFieldObjectKeys = mergeFieldObjects.keySet();
    TreeSet<String> sortedMergeFieldObjectKeys = new TreeSet<>();
    sortedMergeFieldObjectKeys.addAll(mergeFieldObjectKeys);
    for (String sortedMergeFieldObjectKey : sortedMergeFieldObjectKeys) {
        listFields.add(sortedMergeFieldObjectKey);
        listFields.setData(sortedMergeFieldObjectKey, mergeFieldObjects.get(sortedMergeFieldObjectKey));
    }
}
 
開發者ID:forcedotcom,項目名稱:idecore,代碼行數:40,代碼來源:SnippetDialogController.java

示例5: activeChangeCheck

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * If the active set is different from widget set, then update the widget set
 */
private void activeChangeCheck() {
	List myList = getListUnchecked();
	if (myList != null) {
		String[] items = myList.getItems();
		if (active.size() != items.length && !active.equals(Arrays.asList(items))) {
			myList.removeAll();
			for (String item : active) {
				myList.add(item);
			}
			setPresentsDefaultValue(checkDefaults(active));
			super.selectionChanged();
		}
	}    	
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:18,代碼來源:KbdMacroListEditor.java


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