|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.gui.ViewFactory
This is a generic view factory. It can be configured to use any constructor to build views of any type.
Nested Class Summary | |
static class |
ViewFactory.UnhandledViewTypeException
Thrown to indicate that a ViewFactory is unable to build a view of the given type because no constructor is associated to this type of view. |
Constructor Summary | |
ViewFactory()
|
Method Summary | |
CompositeView |
createCompositeView(String label,
String viewType,
DisplayContext context)
|
CompositeView |
createCompositeView(String label,
String viewType,
Object[] params,
DisplayContext context)
|
FieldEditor |
createEditor(String label,
String viewType,
Object[] params,
DisplayContext context)
|
View |
createObjectView(String label,
Object object,
DisplayContext context)
Creates a view for an object, using the most specific view constructor available for the type of the object. |
View |
createObjectView(String label,
Object object,
Object substance,
FieldItem field,
DisplayContext context)
Creates a view for an object, using the most specific view constructor available for the type of the object. |
View |
createView(String label,
String viewType,
DisplayContext context)
|
View |
createView(String label,
String viewType,
Object[] params,
DisplayContext context)
Create a view of a given type. |
View |
createView(String label,
String viewType,
String[] params,
DisplayContext context)
Convert Strings into the type expected by the view constructor. |
boolean |
hasViewerFor(String viewType)
Tells wether a view factory is able to build a view for given type. |
static void |
init(String type,
ViewFactory f)
Init a swing factory by setting the constuctor types. |
void |
setViewConstructor(String viewType,
AbstractMethodItem constructor)
Set the constructor for a type of view |
void |
setViewConstructor(String viewType,
String constructor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewFactory()
Method Detail |
public static void init(String type, ViewFactory f)
public View createView(String label, String viewType, Object[] params, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
label
- the name of the viewviewType
- the type of the view (for instance, "Object" or "Tree".params
- the parameters to pass to the view constructor
ViewFactory.UnhandledViewTypeException
public View createView(String label, String viewType, String[] params, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
ViewFactory.UnhandledViewTypeException
public View createObjectView(String label, Object object, DisplayContext context)
label
- the label of the view to createobject
- the object for which to create a viewcontext
- the display contextpublic View createObjectView(String label, Object object, Object substance, FieldItem field, DisplayContext context)
label
- the label of the view to createobject
- the object for which to create a viewsubstance
- field
- context
- the display contextpublic CompositeView createCompositeView(String label, String viewType, Object[] params, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
ViewFactory.UnhandledViewTypeException
public View createView(String label, String viewType, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
ViewFactory.UnhandledViewTypeException
public CompositeView createCompositeView(String label, String viewType, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
ViewFactory.UnhandledViewTypeException
public FieldEditor createEditor(String label, String viewType, Object[] params, DisplayContext context) throws ViewFactory.UnhandledViewTypeException
ViewFactory.UnhandledViewTypeException
public void setViewConstructor(String viewType, AbstractMethodItem constructor)
viewType
- the type of the viewconstructor
- the constructor to be used to build view of
that type. It should take a ViewFactory as the first parameterpublic void setViewConstructor(String viewType, String constructor)
public boolean hasViewerFor(String viewType)
viewType
- the type of the viewsetViewConstructor(String,AbstractMethodItem)
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |