use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class CategoryPropertiesEditionPartImpl method createSubCategoriesAdvancedTableComposition.
/**
* @param container
*/
protected Composite createSubCategoriesAdvancedTableComposition(Composite parent) {
this.subCategories = new ReferencesTable(getDescription(RequirementViewsRepository.Category.Category_.subCategories, RequirementMessages.CategoryPropertiesEditionPart_SubCategoriesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
subCategories.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
subCategories.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
subCategories.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
subCategories.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.subCategoriesFilters) {
this.subCategories.addFilter(filter);
}
this.subCategories.setHelpText(propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Category.Category_.subCategories, RequirementViewsRepository.SWT_KIND));
this.subCategories.createControls(parent);
this.subCategories.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData subCategoriesData = new GridData(GridData.FILL_HORIZONTAL);
subCategoriesData.horizontalSpan = 3;
this.subCategories.setLayoutData(subCategoriesData);
this.subCategories.setLowerBound(0);
this.subCategories.setUpperBound(-1);
subCategories.setID(RequirementViewsRepository.Category.Category_.subCategories);
// $NON-NLS-1$
subCategories.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class RepositoryPropertiesEditionPartImpl method createMainCategoriesAdvancedTableComposition.
/**
* @param container
*/
protected Composite createMainCategoriesAdvancedTableComposition(Composite parent) {
this.mainCategories = new ReferencesTable(getDescription(RequirementViewsRepository.Repository.Repository_.mainCategories, RequirementMessages.RepositoryPropertiesEditionPart_MainCategoriesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
mainCategories.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
mainCategories.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
mainCategories.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
mainCategories.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.mainCategoriesFilters) {
this.mainCategories.addFilter(filter);
}
this.mainCategories.setHelpText(propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Repository.Repository_.mainCategories, RequirementViewsRepository.SWT_KIND));
this.mainCategories.createControls(parent);
this.mainCategories.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData mainCategoriesData = new GridData(GridData.FILL_HORIZONTAL);
mainCategoriesData.horizontalSpan = 3;
this.mainCategories.setLayoutData(mainCategoriesData);
this.mainCategories.setLowerBound(0);
this.mainCategories.setUpperBound(-1);
mainCategories.setID(RequirementViewsRepository.Repository.Repository_.mainCategories);
// $NON-NLS-1$
mainCategories.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartForm method createActionsTableComposition.
/**
* @param container
*/
protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.actions = new ReferencesTable(getDescription(FlowViewsRepository.InitialState.Properties.actions, FlowMessages.InitialStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
actions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
actions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
actions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
actions.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.actionsFilters) {
this.actions.addFilter(filter);
}
this.actions.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.InitialState.Properties.actions, FlowViewsRepository.FORM_KIND));
this.actions.createControls(parent, widgetFactory);
this.actions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData actionsData = new GridData(GridData.FILL_HORIZONTAL);
actionsData.horizontalSpan = 3;
this.actions.setLayoutData(actionsData);
this.actions.setLowerBound(0);
this.actions.setUpperBound(-1);
actions.setID(FlowViewsRepository.InitialState.Properties.actions);
// $NON-NLS-1$
actions.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class SubflowStatePropertiesEditionPartForm method createActionsTableComposition.
/**
* @param container
*/
protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.actions = new ReferencesTable(getDescription(FlowViewsRepository.SubflowState.Properties.actions, FlowMessages.SubflowStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
actions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
actions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
actions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
actions.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.actionsFilters) {
this.actions.addFilter(filter);
}
this.actions.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.SubflowState.Properties.actions, FlowViewsRepository.FORM_KIND));
this.actions.createControls(parent, widgetFactory);
this.actions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData actionsData = new GridData(GridData.FILL_HORIZONTAL);
actionsData.horizontalSpan = 3;
this.actions.setLayoutData(actionsData);
this.actions.setLowerBound(0);
this.actions.setUpperBound(-1);
actions.setID(FlowViewsRepository.SubflowState.Properties.actions);
// $NON-NLS-1$
actions.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class ViewStatePropertiesEditionPartForm method createActionsTableComposition.
/**
* @param container
*/
protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.actions = new ReferencesTable(getDescription(FlowViewsRepository.ViewState.Properties.actions, FlowMessages.ViewStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
actions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
actions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
actions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
actions.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.actionsFilters) {
this.actions.addFilter(filter);
}
this.actions.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.ViewState.Properties.actions, FlowViewsRepository.FORM_KIND));
this.actions.createControls(parent, widgetFactory);
this.actions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData actionsData = new GridData(GridData.FILL_HORIZONTAL);
actionsData.horizontalSpan = 3;
this.actions.setLayoutData(actionsData);
this.actions.setLowerBound(0);
this.actions.setUpperBound(-1);
actions.setID(FlowViewsRepository.ViewState.Properties.actions);
// $NON-NLS-1$
actions.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
Aggregations