Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  Registering an Application General Steps for Registering an Application Step 6: Creating Icons for the Application Icons Required for the Desktop  Previous   Contents   Next 
   
 

Step 7: Creating the Application Group


Note - For an example of creating the application group, see Step 7 of "Example of Creating a Registration Package".


Once you have created the action and data type definitions for the application, you must create the configuration files responsible for creating what the user actually sees--the application group and its contents.

The application group is a directory at the top level of the Application Manager (see Figure 5-1).

There are three steps to creating the application group:

  • Create the application group directory in the registration package.

  • Optional: configure the application group to use a unique icon. This involves creating the data type definition for the application group directory.

  • Create the contents of the application group.

Creating the Application Group Directory

To create an application group, create the directories in the registration package under appmanager, as shown in Figure 5-7.

Figure 5-7 The appmanager directory

Application Group Name

The <appgroup_name> in Figure 5-7 is the name for the application group.

Figure 5-8 The application group name (<appgroup_name>)

The name can be any allowable file (directory) name. Use a name that describes the application.

Configuring the Application Group To Use a Unique Icon

The desktop provides a default application-group icon. However, you will probably want to provide a custom icon.

If you want to provide a unique icon for the application group, you must create:

  • A data type for the directory that appears at the top level of Application Manager.

  • Open and Print actions for the data type.

    For example, suppose you want to create an application group named Media_Tools. The following data type definition, placed in a file app_root/dt/appconfig/types/language/name.dt, assigns a unique icon to the application group icon.

    DATA_ATTRIBUTES  Media_ToolsAppgroup
     {
        ACTIONS       OpenInPlace,OpenNewView
        ICON          MediaTools
        DESCRIPTION   Double-click to open the Media_Tools \
                      application group
     }
    DATA_CRITERIA		Media_ToolsAppgroupCriteria1
     {
        DATA_ATTRIBUTES_NAME Media_ToolsAppgroup
        MODE                 d
        PATH_PATTERN         */appmanager/*/Media_Tools
     } 

    The attributes section of the definition specifies the icon to be used. The criteria section of the definition specifies that the data type be defined to any directory named Media_Tools that is a subdirectory of a directory named appmanager.

    Figure 5-9 shows the relationship between the application group name and the data type definition. The PATH_PATTERN field in the data type definition connects a unique icon to the application group.

Figure 5-9 How an application group gets a unique icon

You should also create an Open and Print action for the application group data type:

ACTION Open
 {
 	ARG_TYPE			Media_ToolsAppGroup
 	TYPE				MAP
 	MAP_ACTION		OpenAppGroup
 }
ACTION Print
 {
 	ARG_TYPE			Media_ToolsAppGroup
 	TYPE				MAP
 	MAP_ACTION		PrintAppGroup
 }

OpenAppGroup and PrintAppGroup actions are built-in actions defined in /usr/dt/appconfig/types/language/dtappman.dt.

Creating the Contents of the Application Group

The most important item in the application group is an icon to start the application (an action icon). If the application group contains a suite of applications, there is usually an icon for each application.

In addition to one or more action icons, the application group may contain:

  • One or more README files

  • One or more sample data files

  • Templates

  • An icon the user can double-click to view help information

  • A man page

  • A specialized Front Panel control

    The application group can contain subdirectories.

Creating the Action File (Application Icon)

The application group should contain an icon that launches the application. If the group supplies a suite of applications, there should be an icon for each one. These icons are called application icons, or action icons, since they represent an underlying action.

An action icon is created by creating an executable file with the same name as the action it will run:

app_root/dt/appconfig/appmanager/appgroup_name/action_name

The file is called an action file, because its purpose is to create a visual representation of the underlying action.

For example, if you've created an action named BestTextEditor that runs the BestTextEditor application, you would create an executable file named BestTextEditor. In File Manager and the Application Manager, the action file will use the icon image specified in the action definition.

Figure 5-10 illustrates the relationship between the action definition, action file, and actual entry in the Application Manager window.

Figure 5-10 The application icon is a file in the application group

 
 
 
  Previous   Contents   Next