Working with objects


While working in Forte for Java, Community Edition, you operate with objects rather than plain files. Each object represents one or more files on disk. Each object is shown with its own icon and properties. The following table shows the object types used in the IDE.

Table 2: Object Types
Icon
Object Type
Package - A package (folder)--on disk or in a JAR or ZIP archive.
Java object - Represents one Java source file (.java). Its children represent methods, variables, constructors, and inner classes acquired by parsing the Java source.
Form object - Represents one Java source file that can be edited visually in the Form Editor in Forte for Java. The two types of subnodes are: 1) classes with methods, variables, constructors, and inner classes acquired from parsing Java source; and 2) items representing components on the form (visual hierarchy).
Class object - Represents one Java class without source code. Children are methods, variables, constructors, and inner classes acquired from Java reflection.
Serialized prototypes - Files with a .ser extension, which are serialized objects.
HTML object - Represents an HTML file.
Text object - Represents a text file.
Image object - Represents GIF or JPEG images. You can view these with the built-in image viewer.

There are several ways of creating new objects including choosing the New From Template command in:

See Creating new objects from templates for more information.

You can also copy objects from one package and paste them in another using Copy and Paste from the contextual menus. There are special paste options for JavaBeans objects.

Objects can be removed by pressing DELETE on the keyboard.

Three advanced operations can be done with JavaBeans and serialized prototypes. You can:

The following table shows some of the commands available in the contextual menus for the various types of objects.

Table 3: Common Object Commands
Command
Description
Open
Opens the default viewer for the object type - usually the Editor window. Also opens up the Form Editor window and Component Inspector for visual classes.
Customize Bean
Displays a window with the property sheet for the selected class as well as the option to serialize it.
View
Opens an HTML object in the default applet viewer.
Compile
Compiles selected object(s).
Execute
Runs the selected object.
Cut / Copy / Paste / Delete / Rename
Standard clipboard-style operations.
New | Method (or Constructor, Initializer, Variable, Inner Class, Inner Interface)
Creates a new element (of the type chosen in the submenu) in the selected class or source file. These commands are available on the contextual menu for the relevant category node (for example, Fields)
New | Property
Brings up the New Property Pattern dialog for creating a new JavaBeans property for the selected bean.
Tools | Create Group...
Creates a group (object composed of links to one or more files, enabling you to access them from the same place in the IDE). See Group of Files.
Tools | Auto Comment...
Enables you to comment your source code automatically and view all parts of your source code (methods, constructors, inner classes, variables, and such) and document them individually.
Tools | Generate JavaDoc
Generates JavaDoc documentation for the selected classes or elements and places it in the directory that you specify.
Tools | Add to Component Palette
Adds selected object to the Component Palette.
Tools | Synchronize
Forces synchronization of the selected source file with the interfaces it implements.
Tools | Set As Project Main Class
Sets the selected project as the class to be executed when you choose the Execute Project command.
Tools | Add to Project
Adds the selected class to the project, making it subject to compilation when you choose the Compile Project command.
Save as Template
Publishes the selected object as a template for future use.
Properties
Opens a separate Properties window showing properties of the selected object(s).

Contents Prev Next Index