本文整理汇总了Java中org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField类的典型用法代码示例。如果您正苦于以下问题:Java ListDialogField类的具体用法?Java ListDialogField怎么用?Java ListDialogField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListDialogField类属于org.eclipse.jdt.internal.ui.wizards.dialogfields包,在下文中一共展示了ListDialogField类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: customButtonPressed
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public void customButtonPressed(ListDialogField<ClientBundleResource> field, int index) {
List<ClientBundleResource> resourcesBefore = resourcesField.getElements();
switch (index) {
case IDX_ADD:
addResource();
break;
case IDX_ADD_MULTIPLE:
addMultipleResources();
break;
case IDX_EDIT:
editSelectedResource();
break;
case IDX_REMOVE:
removeSelectedResources();
break;
}
// Notify the listener if our list of modules changes
if (listener != null && !getResources().equals(resourcesBefore)) {
listener.onResourcesChanged();
}
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:BundledResourcesSelectionBlock.java
示例2: createListField
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void createListField() {
String[] buttons = new String[] {
"Add...", "Add Multiple...", "Edit", null, "Remove", null};
resourcesField =
new ListDialogField<ClientBundleResource>(new SelectionAdapter(), buttons,
new ColumnLabelProvider());
resourcesField.setLabelText(labelText);
String[] columnNames = {"File", "Type", "Method name"};
ColumnLayoutData[] columnLayouts = {
new ColumnPixelData(100), new ColumnPixelData(100),
new ColumnPixelData(100)};
resourcesField.setTableColumns(new ListDialogField.ColumnsDescription(
columnLayouts, columnNames, false));
// Edit and Remove buttons disabled by default
resourcesField.enableButton(IDX_EDIT, false);
resourcesField.enableButton(IDX_REMOVE, false);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:22,代码来源:BundledResourcesSelectionBlock.java
示例3: createListContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private ListDialogField<String> createListContents(CPListElement entryToEdit, String key, String label, ImageDescriptor descriptor, String[] buttonLabels) {
ExclusionPatternAdapter adapter= new ExclusionPatternAdapter();
ListDialogField<String> patternList= new ListDialogField<String>(adapter, buttonLabels, new ExclusionInclusionLabelProvider(descriptor));
patternList.setDialogFieldListener(adapter);
patternList.setLabelText(label);
patternList.setRemoveButtonIndex(IDX_REMOVE);
patternList.enableButton(IDX_EDIT, false);
IPath[] pattern= (IPath[]) entryToEdit.getAttribute(key);
ArrayList<String> elements= new ArrayList<String>(pattern.length);
for (int i= 0; i < pattern.length; i++) {
elements.add(pattern[i].toString());
}
patternList.setElements(elements);
patternList.selectFirstElement();
patternList.enableButton(IDX_ADD_MULTIPLE, fCurrSourceFolder != null);
patternList.setViewerComparator(new ViewerComparator());
return patternList;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:22,代码来源:ExclusionInclusionDialog.java
示例4: createListDialogField
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void createListDialogField(Composite composite, ListDialogField<String> dialogField) {
Control list= dialogField.getListControl(composite);
GridData gd= new GridData();
gd.horizontalAlignment= GridData.FILL;
gd.grabExcessHorizontalSpace= true;
gd.verticalAlignment= GridData.FILL;
gd.grabExcessVerticalSpace= true;
gd.widthHint= convertWidthInCharsToPixels(50);
list.setLayoutData(gd);
Composite buttons= dialogField.getButtonBox(composite);
gd= new GridData();
gd.horizontalAlignment= GridData.FILL;
gd.grabExcessHorizontalSpace= false;
gd.verticalAlignment= GridData.FILL;
gd.grabExcessVerticalSpace= true;
buttons.setLayoutData(gd);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:MembersOrderPreferencePage.java
示例5: createFavoriteList
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void createFavoriteList(Composite parent) {
String[] buttonLabels= new String[] {
PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_newType_button,
PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_newMember_button,
PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_edit_button,
PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_remove_button
};
ListAdapter adapter= new ListAdapter();
fList= new ListDialogField<String>(adapter, buttonLabels, new ListLabelProvider());
fList.setDialogFieldListener(adapter);
fList.setLabelText(PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_description);
fList.setRemoveButtonIndex(IDX_REMOVE);
fList.enableButton(IDX_EDIT, false);
fList.setViewerComparator(new ViewerComparator());
PixelConverter pixelConverter= new PixelConverter(parent);
fList.doFillIntoGrid(parent, 3);
LayoutUtil.setHorizontalSpan(fList.getLabelControl(null), 2);
LayoutUtil.setWidthHint(fList.getLabelControl(null), pixelConverter.convertWidthInCharsToPixels(60));
LayoutUtil.setHorizontalGrabbing(fList.getListControl(null));
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:25,代码来源:CodeAssistFavoritesConfigurationBlock.java
示例6: ProjectsWorkbookPage
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public ProjectsWorkbookPage(ListDialogField<CPListElement> classPathList, IWorkbenchPreferenceContainer pageContainer) {
fClassPathList= classPathList;
fPageContainer= pageContainer;
fSWTControl= null;
String[] buttonLabels= new String[] {
NewWizardMessages.ProjectsWorkbookPage_projects_add_button,
null,
NewWizardMessages.ProjectsWorkbookPage_projects_edit_button,
NewWizardMessages.ProjectsWorkbookPage_projects_remove_button
};
ProjectsAdapter adapter= new ProjectsAdapter();
fProjectsList= new TreeListDialogField<CPListElement>(adapter, buttonLabels, new CPListLabelProvider());
fProjectsList.setDialogFieldListener(adapter);
fProjectsList.setLabelText(NewWizardMessages.ProjectsWorkbookPage_projects_label);
fProjectsList.enableButton(IDX_REMOVE, false);
fProjectsList.enableButton(IDX_EDIT, false);
fProjectsList.setViewerComparator(new CPListElementSorter());
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:ProjectsWorkbookPage.java
示例7: createListContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private ListDialogField<String> createListContents(CPListElement entryToEdit, String key, String label, ImageDescriptor descriptor, String[] buttonLabels) {
ExclusionPatternAdapter adapter= new ExclusionPatternAdapter();
ListDialogField<String> patternList= new ListDialogField<String>(adapter, buttonLabels, new ExclusionInclusionLabelProvider(descriptor));
patternList.setDialogFieldListener(adapter);
patternList.setLabelText(label);
patternList.enableButton(IDX_EDIT, false);
IPath[] pattern= (IPath[]) entryToEdit.getAttribute(key);
ArrayList<String> elements= new ArrayList<String>(pattern.length);
for (int i= 0; i < pattern.length; i++) {
String patternName= pattern[i].toString();
if (patternName.length() > 0)
elements.add(patternName);
}
patternList.setElements(elements);
patternList.selectFirstElement();
patternList.enableButton(IDX_ADD_MULTIPLE, fCurrSourceFolder != null);
patternList.setViewerComparator(new ViewerComparator());
return patternList;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:SetFilterWizardPage.java
示例8: addMultipleEntries
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void addMultipleEntries(ListDialogField<String> field) {
String title, message;
if (isExclusion(field)) {
title= NewWizardMessages.ExclusionInclusionDialog_ChooseExclusionPattern_title;
message= NewWizardMessages.ExclusionInclusionDialog_ChooseExclusionPattern_description;
} else {
title= NewWizardMessages.ExclusionInclusionDialog_ChooseInclusionPattern_title;
message= NewWizardMessages.ExclusionInclusionDialog_ChooseInclusionPattern_description;
}
IPath[] res= ExclusionInclusionEntryDialog.chooseExclusionPattern(getShell(), fCurrSourceFolder, title, message, null, true);
if (res != null) {
for (int i= 0; i < res.length; i++) {
field.addElement(res[i].toString());
}
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:SetFilterWizardPage.java
示例9: selectionChanged
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
@Override
public void selectionChanged(ListDialogField<IProject> field)
{
List<IProject> elements = fProject.getSelectedElements();
if( elements.isEmpty() )
{
selected = null;
}
else
{
selected = elements.get(0);
}
}
开发者ID:equella,项目名称:Equella,代码行数:14,代码来源:NewJPFPluginWizardPageOne.java
示例10: createExcludedJarsComponent
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void createExcludedJarsComponent(Composite parent) {
excludedJarsComponent = new Composite(parent, SWT.NONE);
GridData excludedJarsComponentGridData = new GridData(GridData.FILL_BOTH);
excludedJarsComponentGridData.horizontalSpan = ((GridLayout) parent.getLayout()).numColumns;
excludedJarsComponentGridData.grabExcessVerticalSpace = true;
excludedJarsComponent.setLayoutData(excludedJarsComponentGridData);
GridLayout containerGridLayout = new GridLayout(3, false);
containerGridLayout.marginTop = 16;
excludedJarsComponent.setLayout(containerGridLayout);
Label label = new Label(excludedJarsComponent, SWT.NONE);
GridData labelGridData = new GridData(GridData.FILL_HORIZONTAL);
labelGridData.horizontalSpan = 3;
label.setLayoutData(labelGridData);
label.setText("Suppress warnings about these build path entries being outside of WEB-INF/lib:");
String[] buttons = new String[] { "Add...", null, "Remove" };
excludedJarsField = new ListDialogField(new ExcludedJarSelectionAdapter(), buttons, new ExcludedJarLabelProvider());
ColumnLayoutData[] columns = new ColumnLayoutData[] { new ColumnWeightData(1, 100, true),
new ColumnWeightData(2, 100, true) };
String[] columnHeaderNames = { "JAR file", "Location" };
excludedJarsField.setTableColumns(new ListDialogField.ColumnsDescription(columns, columnHeaderNames, false));
excludedJarsField.setRemoveButtonIndex(IDX_REMOVE);
excludedJarsField.doFillIntoGrid(excludedJarsComponent, 3);
GridData layoutData = (GridData) excludedJarsField.getListControl(excludedJarsComponent).getLayoutData();
layoutData.grabExcessHorizontalSpace = true;
layoutData.grabExcessVerticalSpace = true;
excludedJarsField.getListControl(excludedJarsComponent).setLayoutData(layoutData);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:32,代码来源:WebappProjectPropertyPage.java
示例11: customButtonPressed
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
@Override
public void customButtonPressed(ListDialogField<String> field, int index) {
List<String> beforeModules = modulesField.getElements();
if (index == IDX_ADD) {
addEntry();
} else if (index == IDX_REMOVE) {
removeSelectedEntries();
} else if (index == IDX_SET_DEFAULTS) {
setDefaults();
}
// Notify the listener if our list of modules changes
notifyListenerIfChanged(beforeModules);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:16,代码来源:EntryPointModulesSelectionBlock.java
示例12: createListField
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void createListField() {
String[] buttons = new String[] {"Add...", "Remove", null, "Restore Defaults"};
modulesField = new ListDialogField<String>(new ModulesSelectionAdapter(), buttons, new ModulesLabelProvider());
modulesField.setLabelText(labelText);
modulesField.setTableColumns(new ListDialogField.ColumnsDescription(1, false));
// Remove button disabled by default
modulesField.enableButton(IDX_REMOVE, false);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:11,代码来源:EntryPointModulesSelectionBlock.java
示例13: customButtonPressed
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public void customButtonPressed(ListDialogField<IModule> field, int index) {
if (index == ADD_INHERITS_BUTTON_GROUP_INDEX) {
moduleAddInheritsButtonPressed();
} else {
moduleRemoveInheritsButtonPressed();
}
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:8,代码来源:NewModuleWizardPage.java
示例14: NewModuleWizardPage
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public NewModuleWizardPage() {
super("newModuleWizardPage");
setTitle("New GWT Module");
setDescription("Create a new GWT Module.");
ModuleDialogFieldAdapter adapter = new ModuleDialogFieldAdapter();
modulePackageField = new StringButtonStatusDialogField(adapter);
modulePackageField.setDialogFieldListener(adapter);
modulePackageField.setLabelText("Package:");
modulePackageField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_package_button);
modulePackageField.setStatusWidthHint(NewWizardMessages.NewTypeWizardPage_default);
modulePackageCompletionProcessor = new JavaPackageCompletionProcessor();
moduleNameField = new StringDialogField();
moduleNameField.setDialogFieldListener(adapter);
moduleNameField.setLabelText("Module name:");
String[] addButtons = new String[] {
NewWizardMessages.NewTypeWizardPage_interfaces_add,
/* 1 */null, NewWizardMessages.NewTypeWizardPage_interfaces_remove};
moduleInheritsDialogField =
new ListDialogField<IModule>(adapter, addButtons,
new ModuleSelectionLabelProvider());
moduleInheritsDialogField.setDialogFieldListener(adapter);
moduleInheritsDialogField.setTableColumns(new ListDialogField.ColumnsDescription(
1, false));
moduleInheritsDialogField.setLabelText("Inherited modules:");
moduleInheritsDialogField.setRemoveButtonIndex(REMOVE_INHERITS_BUTTON_GROUP_INDEX);
String[] buttonNames = new String[] {
"Create public resource path", "Create package for client source"};
moduleCreateElementsCheckboxes = new SelectionButtonDialogFieldGroup(
SWT.CHECK, buttonNames, 1);
moduleContainerStatus = new StatusInfo();
modulePackageStatus = new StatusInfo();
moduleNameStatus = new StatusInfo();
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:41,代码来源:NewModuleWizardPage.java
示例15: createPreferenceList
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
/**
* Create a list dialog field.
*
* @param parent the composite
*/
private void createPreferenceList(Composite parent) {
String[] buttonLabels= new String[] {
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newType_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newMember_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_edit_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_remove_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_restoreDefaults_button
};
ListAdapter adapter= new ListAdapter();
fList= new ListDialogField<String>(adapter, buttonLabels, new ListLabelProvider());
fList.setDialogFieldListener(adapter);
fList.setLabelText(CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_description);
fList.setRemoveButtonIndex(IDX_REMOVE);
fList.enableButton(IDX_EDIT, false);
fList.setViewerComparator(new ViewerComparator());
PixelConverter pixelConverter= new PixelConverter(parent);
fList.doFillIntoGrid(parent, 3);
LayoutUtil.setHorizontalSpan(fList.getLabelControl(null), 2);
LayoutUtil.setWidthHint(fList.getLabelControl(null), pixelConverter.convertWidthInCharsToPixels(60));
LayoutUtil.setHorizontalGrabbing(fList.getListControl(null));
Control listControl= fList.getListControl(null);
GridData gd= (GridData)listControl.getLayoutData();
gd.verticalAlignment= GridData.FILL;
gd.grabExcessVerticalSpace= true;
gd.heightHint= pixelConverter.convertHeightInCharsToPixels(10);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:37,代码来源:ExpandWithConstructorsConfigurationBlock.java
示例16: selectionChanged
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
/**
* @see IListAdapter#selectionChanged(ListDialogField)
*/
public void selectionChanged(ListDialogField<JavadocLinkRef> field) {
List<JavadocLinkRef> selection= fListDialogField.getSelectedElements();
if (selection.size() != 1) {
fListDialogField.enableButton(2, false);
} else {
fListDialogField.enableButton(2, true);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:JavadocStandardWizardPage.java
示例17: updateEnableState
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
private void updateEnableState(boolean isCustom, final ListDialogField<IJavaProject> settingsField, Button configureCustom, BulletListBlock bulletListBlock) {
settingsField.getListControl(null).setEnabled(!isCustom);
if (isCustom) {
fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null));
} else if (fEnableState != null) {
fEnableState.restore();
fEnableState= null;
}
bulletListBlock.setEnabled(isCustom);
configureCustom.setEnabled(isCustom);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:12,代码来源:CleanUpRefactoringWizard.java
示例18: customButtonPressed
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void customButtonPressed(ListDialogField<String> field, int index) {
if (index == SELECT_ALL) {
fCategoryList.checkAll(true);
fCategoryList.refresh();
} else if (index == DESELECT_ALL) {
fCategoryList.checkAll(false);
fCategoryList.refresh();
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:CategoryFilterActionGroup.java
示例19: TodoTaskConfigurationBlock
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public TodoTaskConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) {
super(context, project, getKeys(), container);
TaskTagAdapter adapter= new TaskTagAdapter();
String[] buttons= new String[] {
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_add_button,
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_edit_button,
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_remove_button,
null,
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_setdefault_button,
};
fTodoTasksList= new ListDialogField<TodoTask>(adapter, buttons, new TodoTaskLabelProvider());
fTodoTasksList.setDialogFieldListener(adapter);
fTodoTasksList.setRemoveButtonIndex(IDX_REMOVE);
String[] columnsHeaders= new String[] {
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_name_column,
PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_priority_column,
};
fTodoTasksList.setTableColumns(new ListDialogField.ColumnsDescription(columnsHeaders, true));
fTodoTasksList.setViewerComparator(new TodoTaskSorter());
fCaseSensitiveCheckBox= new SelectionButtonDialogField(SWT.CHECK);
fCaseSensitiveCheckBox.setLabelText(PreferencesMessages.TodoTaskConfigurationBlock_casesensitive_label);
fCaseSensitiveCheckBox.setDialogFieldListener(adapter);
unpackTodoTasks();
if (fTodoTasksList.getSize() > 0) {
fTodoTasksList.selectFirstElement();
} else {
fTodoTasksList.enableButton(IDX_EDIT, false);
fTodoTasksList.enableButton(IDX_DEFAULT, false);
}
fTaskTagsStatus= new StatusInfo();
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:39,代码来源:TodoTaskConfigurationBlock.java
示例20: customButtonPressed
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入依赖的package包/类
public void customButtonPressed(ListDialogField<CPVariableElement> field, int index) {
switch (index) {
case IDX_EXTEND: /* extend */
extendButtonPressed();
break;
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:8,代码来源:NewVariableEntryDialog.java
注:本文中的org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论