|
Oculus Layout Builder Plugin API Documentation November 25, 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.oculustech.layoutbuilder.pluginapi.AbstractComponentMetaInfo
Abstract implementation of ComponentMetaInfo. Provides default code generation facilities.
Constructor Summary | |
AbstractComponentMetaInfo()
|
Method Summary | |
boolean |
canInlineConstruction()
Return true iif it is OK to inline the construction of this component in the add() call. |
java.lang.String[] |
defaultInspectorFieldsToExclude()
Returns the set of fields that should be excluded when fields are automatically generated by reflection. |
boolean |
doIncludeDefaultInspectorFields()
If this returns true, the system will automatically generate fields in the inspector by reflecting on the component's class. |
java.lang.String |
generateCode(java.lang.String variableName,
boolean asInlinedInstance,
boolean asLocalVariable)
Generate code for this component. |
java.lang.String |
generateDeclaration(java.lang.String variableName)
This should generate a class declaration for this component. |
java.lang.Class |
getComponentClass()
Returns class of object returned by getComponent(). |
protected java.lang.String |
getDeclarationType()
Returns the class name to use in the generated code (getComponentClass().getName() with package adjusted to be more user friendly). |
static FieldInfo |
getFieldInfo(ComponentMetaInfo cmi,
java.lang.String fieldName)
Returns the FieldInfo for the field of the given name within cmi. |
FieldInfo |
getFieldInfo(java.lang.String name)
Gets the FieldInfo for the field of the given name. |
static boolean |
hasTextConstructor(java.lang.Class c)
Returns true if given class has a constructor taking one argument of type String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.oculustech.layoutbuilder.pluginapi.ComponentMetaInfo |
getComponent, getFields |
Constructor Detail |
public AbstractComponentMetaInfo()
Method Detail |
protected java.lang.String getDeclarationType()
Default implementation returns class of object returned by getComponent(). Strips off java.awt or javax.swing package names; leaves others.
public java.lang.Class getComponentClass()
public boolean canInlineConstruction()
Default implementation returns false except for trivial JLabel instances.
canInlineConstruction
in interface ComponentMetaInfo
public java.lang.String generateDeclaration(java.lang.String variableName)
Default implementation creates trivial declaration as per above.
generateDeclaration
in interface ComponentMetaInfo
public java.lang.String generateCode(java.lang.String variableName, boolean asInlinedInstance, boolean asLocalVariable)
Default implementation uses text constructor if Text field is set, default constructor otherwise, and then sets all fields that are not default values.
generateCode
in interface ComponentMetaInfo
public boolean doIncludeDefaultInspectorFields()
Default implementation returns true.
doIncludeDefaultInspectorFields
in interface ComponentMetaInfo
public java.lang.String[] defaultInspectorFieldsToExclude()
Default implementation returns empty array.
defaultInspectorFieldsToExclude
in interface ComponentMetaInfo
public static boolean hasTextConstructor(java.lang.Class c)
public FieldInfo getFieldInfo(java.lang.String name)
public static FieldInfo getFieldInfo(ComponentMetaInfo cmi, java.lang.String fieldName)
|
Oculus Layout Builder Plugin API Documentation November 25, 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |