- All Known Implementing Classes:
AbstractSwingHandler
,BasicOptionHandler
,BoundsHandler
,LayoutHandler
,MarginHandler
,ModelHandler
,PositionHandler
,WindowHandler
public interface SwingHandler
SwingHandlers are used to implement the way each option annotation is
handled. Because this class uses the
ServiceManager
as a general
cache it is possible to add own annotations with own handlers.
This class is the top level handler in the generation process of every
gui. It is called after the Component
was initialized
and all annotations were read.
- Since:
- 1.0
- See Also:
ServiceManager
-
Field Summary
Fields Modifier and Type Field Description static ServiceManager<SwingHandler>
CACHE
The ServiceManager object storing all loadedSwingHandler
s. -
Method Summary
Modifier and Type Method Description java.lang.Class<? extends java.lang.annotation.Annotation>
annotationType()
void
onElement(FieldReference<?> reference, AnnotationContext<?> context)
Handles the incomingFieldReference
with itsComponentDesc
and the references field.
-
Field Details
-
CACHE
The ServiceManager object storing all loadedSwingHandler
s. They should call theServiceManager.register(Object)
in a static context to ensure the service wil be added.- Since:
- 1.0
-
-
Method Details
-
onElement
Handles the incomingFieldReference
with itsComponentDesc
and the references field.INFO: This method makes use of the thread-safe class
FieldReference
so that no external synchronization has to be done.- Parameters:
reference
- the field's referencecontext
- the loaded annotation wrapped into anAnnotationContext
-
annotationType
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()- Returns:
- the annotation type that can be handled
-