|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface describes a factory that builds user interfaces for services. Factories that implement this interface can be queried about the types of service interfaces they support, and the Java types of user interface objects they produce.
Additionally, UserInterfaceFactory implementations must
follow the following convention: for each type of user interface
object produced by the factory, there are one or more methods
that match this pattern:
Object
getX, where X is the name
of the user interface class type, minus the package name
Object - this is the service object to be adapted
For example, a user interface factory that produces user
interfaces of class java.awt.Frame might have
methods like this:
public class MyFactory
{
public java.awt.Frame getFrame(Object obj);
public java.awt.Frame getFrame(Object obj, GraphicsConfiguration gc);
public java.awt.Frame getFrame(Object obj, String title);
public java.awt.Frame getFrame(Object obj, String title, GraphicsConfiguration gc);
}
This example shows one factory method corresponding to each
Frame constructor:
An implication of this pattern is that classes that the factory
instantiates should support as many of the same constructors of
the requested base class as possible.
| Method Summary | |
java.lang.Class[] |
getSupportedServiceInterfaces()
This method is used to obtain the service interfaces for which this factory can build user interfaces. |
java.lang.Class[] |
getSupportedUIClasses()
This method is used to get the desired type of user interface for a service, based on the class of the UI object. |
| Method Detail |
public java.lang.Class[] getSupportedServiceInterfaces()
public java.lang.Class[] getSupportedUIClasses()
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||