public interface Generator
A Generator can support multiple base classes. The specific base classes are registered in the ide.properties files in the following format:
jdeveloper.<ui type>.generator.<base class>=<fully qualified generator class name>
For example, the generator for java.awt.Frame classes used by the Frame Builder is entered as jdeveloper.frame.generator.java.awt.frame=oracle.jdeveloper.wizard.frame.FrameGenerator
Modifier and Type | Method and Description |
---|---|
void |
generate(JavaManager mgr,
SourceFile srcFile)
Tells the Generator to add whatever custom code it requires.
|
javax.swing.JComponent |
getAttributes(java.lang.String baseType)
Provides the Attributes panel supported by this Generator.
|
java.lang.String |
getClassDescription(java.lang.String baseType)
Provides a description of the class being generated by this UIGenerator.
|
java.lang.String[] |
getLibraries(java.lang.String baseType)
Provides a list of JDeveloper libraries required by the code generated by
this Generator for the specified base type.
|
void |
setContext(Context ctx)
Sets the context in which the generator is being accessed.
|
void |
setEnabled(boolean isEnabled)
Sets the enabled state of all UI present on the object returned by
getAttributes.
|
boolean |
validateAttributes()
Allows the supplied Attributes panel to be validated.
|
javax.swing.JComponent getAttributes(java.lang.String baseType)
baseType
- The base class for which the attributes are requested.JContainer
object representing the available
attributes for the base class.boolean validateAttributes()
ClassBuilderPanel.validateAndWriteToState(oracle.jdeveloper.wizard.common.BaliWizardState)
true
if the settings in the Attributes panel are
valid, and false
otherwise.void setEnabled(boolean isEnabled)
isEnabled
- The enabled state to set all UI controls to.void generate(JavaManager mgr, SourceFile srcFile)
mgr
- The JavaManager
object representing the
current project.srcFile
- The SourceFile
object representing the
new file.java.lang.String[] getLibraries(java.lang.String baseType)
baseType
- The base class for which the list of libraries are requested.java.lang.String getClassDescription(java.lang.String baseType)
baseType
- The base class of the class.void setContext(Context ctx)
ctx
- the current context.