public class ElementsDefinitionConstructor
extends java.lang.Object
perspectives() (which contain view
definitions) and footer definitions (see footers()). All of these can be used to instantiate the
perspectives (and views) and footers.
This class uses a WorkbenchElementsRepository to get the collected components as well as to access the
factory methods and annotations of the collected elements.
For deriving information, usually annotations are used. Those annotations are searched in the order as described in
BeanInformationRepository.from(Object). Based on this, the following strategies are applied in particular
cases:
View annotation is found, is considered as view in MiniFx. The view
annotation describes the perspective in which the view is displayed and the position within the view. Both values are
optional. If omitted, the view is displayed in the perspective Perspectives.DEFAULT_PERSPECTIVE at the
position Perspectives.DEFAULT_POSITION.
Icon annotation (both for views and perspectives). If none is
specified, then perspectives will get a default icon and views will have no icon.
Name, the value from there is used.
Names.nameFromNameMethod(Object).
Order annotation is specified for a view (or a perspective) then it is taken into
account.
| Constructor and Description |
|---|
ElementsDefinitionConstructor(WorkbenchElementsRepository elementsRepository,
BeanInformationExtractor beanInformationExtractor,
FxNodeFactory fxNodeFactory)
Constructor which requires an elements repository, which will be used to look up the collected elements as well
as annotations on them and factory methods.
|
| Modifier and Type | Method and Description |
|---|---|
DisplayProperties |
displayPropertiesFrom(java.lang.Object view,
Purpose purpose) |
java.util.Set<FooterDefinition> |
footers()
Returns a footer definition for each footer found in the repository
|
java.util.Set<PerspectiveDefinition> |
perspectives()
Returns a perspective definition for each perspective used by at least one of the views found in the repository.
|
public ElementsDefinitionConstructor(WorkbenchElementsRepository elementsRepository, BeanInformationExtractor beanInformationExtractor, FxNodeFactory fxNodeFactory)
elementsRepository - the repository to usebeanInformationExtractor - the instance who knows about the information of the beansfxNodeFactory - the factory to create java fx nodesjava.lang.NullPointerException - if the given repository is nullpublic java.util.Set<PerspectiveDefinition> perspectives()
public java.util.Set<FooterDefinition> footers()
public DisplayProperties displayPropertiesFrom(java.lang.Object view, Purpose purpose)