Java Code Examples for org.eclipse.swt.widgets.List#removeAll()

The following examples show how to use org.eclipse.swt.widgets.List#removeAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomMatchConditionDialog.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 为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());
	}
}
 
Example 2
Source File: CustomFilterDialog.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 为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());
	}
}
 
Example 3
Source File: CustomMatchConditionDialog.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 为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());
	}
}
 
Example 4
Source File: CustomFilterDialog.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 为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());
	}
}
 
Example 5
Source File: KbdMacroListEditor.java    From e4macs with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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();
		}
	}    	
}