public class TypedElementSelectionValidator extends Object implements ISelectionStatusValidator
ISelectionValidator
to validate the
type of an element.
Empty selections are not accepted.Constructor and Description |
---|
TypedElementSelectionValidator(Class<?>[] acceptedTypes,
boolean allowMultipleSelection) |
TypedElementSelectionValidator(Class<?>[] acceptedTypes,
boolean allowMultipleSelection,
Collection<?> rejectedElements) |
public TypedElementSelectionValidator(Class<?>[] acceptedTypes, boolean allowMultipleSelection)
acceptedTypes
- The types accepted by the validatorallowMultipleSelection
- If set to true
, the validator
allows multiple selection.public TypedElementSelectionValidator(Class<?>[] acceptedTypes, boolean allowMultipleSelection, Collection<?> rejectedElements)
acceptedTypes
- The types accepted by the validatorallowMultipleSelection
- If set to true
, the validator
allows multiple selection.rejectedElements
- A list of elements that are not acceptedpublic IStatus validate(Object[] elements)
validate
in interface ISelectionStatusValidator
Copyright © 2008, 2018 Borland Software Corporation and others. All Rights Reserved.