Create Class
The Add Class SmartGuide lets you create a new class or
add an existing one from the repository.
To create an new class:
- In the Project field, provide the name of a project to contain the new
class. This can be a new name, in which case the SmartGuide creates the project before it
creates the class. Alternatively, you can select an existing project. Click Browse
to choose from a list of projects in the workspace.
- Likewise provide a new or existing package name for the class in the Package
field.
- Select the Create a new class radio button.
- Enter a name for the class.
- Specify a super class (the class the new one extends). If you selected a class in
the workspace before you started the SmartGuide, it will be inserted here by default.
Click Browse to select from a list of all classes in the
workspace. The new class will extend java.lang.Object if no other class
is specified.
- If you want to open a class browser on the class once it has been generated, enable the Browse
class when finished check box.
- If you want to use the Visual Composition Editor to create a visual
class, enable the Compose the class visually check box.
- Click Next to specify more options, including import statements,
interfaces, access modifiers, and generated method stubs, or click Finish.
To add a class from the repository:
- In the Project field, provide the name of an existing project to
contain the class. Click Browse to choose from a list of projects in the
workspace.
- Likewise provide an existing package name for the class in the Package
field.
- Select the Add classes from the repository radio button.
- The Available classes list shows the classes that are available for the
project and package. Select one by enabling its check box. Note: Only
those classes that were created for the selected package can be added back to the package.
- The Available editions list shows the editions of the selected class in
the repository. Select one by enabling its check box.
- If needed, select more than one class to add to the workspace by repeating the two
previous steps.
- Click Finish.
