Java Desktop for X Window

Copyright © 2001-2004 The JD4X Project
Refer to the GNU General Public License for more details.

How To Configure The Default Desktop Menu.
From the introduction, you would have known why only the Programs menu is configurable. This section describes the configuration facilities provided by the default desktop to customize the application menu on the desktop. The default desktop allows you to add, remove and alter the application programs available on the desktop. Under the Programs menu, the user can also include other levels of submenu to better organize the different categories of application programs. The desktop menu allows the integration of both native and Java programs through its invokation interface.

Menu Editor
Default desktop Menu Editor screenshot.

The menu editor consist of two main panels. The left most panel is the Programs menu tree. The menu tree represents the actual position and organization of the items in the Programs menu. In-between the two panels is a split bar that allows the user to adjust the size of both panels that is under displayed. To adjust the sizes, just click and drag the split bar to the desired division size. If you want to only view a single panel, just click on the arrows at the top of the split bar in the opposite direction of the desired panel to be viewed. The right panel is the item configuration panel. It allows the user to select the Menu Type, Command Type, the individual configuration details and the desired functions to manipulate the Programs menu. A user can basically add, delete and update any item that they have selected. A selected item is the item that the user has clicked on in the menu tree and it is also the item that is currently highlighted. When a user add, delete or update an item in the menu tree, it does not directly take effect in the actual Programs menu until the user clicks on the Ok or Apply button to finalize the changes. If the Ok button is clicked, the changes will take effect on the Programs menu and the menu editor will be closed. The Apply button allows the changes to take effect but the menu editor will not be closed. The progress bar below the Add, Delete and Update buttons, shows the current progress of the update changes done to the Programs menu. When the user clicks on the Cancel button, no changes will occur to the actual Programs menu, however, the menu tree will retain its current changes.

Configuration Parameters
There are two main type of items that the user can choose from the Menu Type option check box. The first item is a Menu, which is a submenu branch in the Programs menu. An example is the Game submenu shown below. The second is a Menu Item, which represents an actual application program on the system. An example is the Chess game program shown below. The Command Type option check box on the other hand has three application types for the user to select from. Selecting any of the Command Type options will also disable the invalid configuration options that cannot be made available to that specific option. These invalid options will be automatically gray out. The example shown below makes it clear to the user that a native application do not require a Jvm Option or a fully qualified class (FQC).

The Native option allows a non-Java application program to be added to the Programs menu. This option allows applications like Mozilla, Xterm, OpenOffice, Gimp and etc. to be used on the Java desktop. The Native option also make use of the current Linux environment path settings to find the desktop applications. Therefore applications that have been properly installed into your Linux environment do not require an absolute file path name, only the application name is required to activate them.

Native Option
Native program activation screenshot.

One way that the default desktop differs from the other non-Java desktops in that it supports the Java invokation mechanism intuitively in its activation system. The Jar option allows a Java program zipped into a Jar file to be executed like a native application. No other additional options are required to execute a Jar file, only the absolute file path name to the Jar file is required. An example is the jEdit program shown below. The Jvm option only needs to be used if there are additional customization options required such as limiting the Jvm memory usage, using the server Jvm rather than the default client Jvm and etc.

Jar Option
Jar option invokation screenshot.

The Class option allows a class file Java program to be executed. This option allow raw class files to be executed but unlike the Jar option, you need to specify the class path as well as the fully qualified class definition in order to properly execute the program. FQC or fully qualified class means the full package and class name. It is similar to the import statement used in Java code files except that it excludes the key word, import. An example is shown below where there is a MyClass program (MyClass.class) and it resides in a package named MyPackage (package directory), which is found in the /usr/jd4x/jbin directory. If you require more help on this topic, please refer to the Java documentation distributed together with your Java toolkit.

Class Option
Class invokation option screenshot.

Adding A New Menu
A menu is used to categorize sets of applications that the user may like to group together. An example is to group all the desktop games into a submenu so that you don't have to look everywhere to find a particular game.

Adding A New Menu
Screenshot of adding a new menu.

To add a new menu, select the Menu option in the Menu Type check box. When you select the Menu option, you are not allowed to select the Command Type because a submenu does not require any commands to be associated with it. A menu can only have a label and/or an icon. If you want to find a desired icon file without having to type the entire path of the icon file name, you can click on the Browse button. It will produce a JD4X system file chooser for you to browse through your file system and select the desired file. Once the desired file has been selected, click on Accept to finalize your selection.

System File Chooser
System file chooser screenshot.

When all the parameters of the new menu to be added has been configured,  click on the add button to place it into the menu tree. You can add any item into any position of the menu tree by first selecting the existing item where you want the new item to be added. Performing an add function will always add the new item after the current selected item position. If no item has been currently selected, then the menu editor will assume that you are trying to add to the top level of the menu tree, which is directly in the Programs menu. The menu editor will also allow you to nest unlimited levels of submenu.

Add A New Menu Item
To add a new menu item, select the Menu Item option in the Menu Type check box. A menu item can have a label and/or an icon. Once that is done, you will need to select the correct Command Type to indicate what type of application the generated menu will have to execute. Only the necessary parameters will be enabled for you to configure. Refer to the section on configuration parameters for more details. Remember to finalize the changes by clicking the Apply or Ok button before closing the menu editor for it to take effect on the Programs menu after you are finished configuring the menu tree.

Deleting An Existing Menu or Menu Item
To delete a menu or menu item, just select the desired menu or menu item to be removed by clicking on the corresponding item on the menu tree and clicking the Delete button. The selected item in the menu tree will then be removed. Once you have finalized your changes, you can click on the Apply button for it to take effect on the actual Programs menu. Note that you can never remove the Programs menu. Selecting the Programs menu will only allow you to add, all other input parameters will also be disabled as shown below. Adding any item in this state will result in a new item entitled New Menu Item being added, you can then go back to select and edit it later.

Selecting Programs Menu
Selecting Programs menu screenshot.

Updating An Existing Menu or Menu Item
If at anytime, you need to alter any of the current settings, just select on the desired item and make your changes. Once you have made your alteration, click on the Update button to make the changes take effect first on the menu tree before clicking on the Apply or Ok button. If you fail to update the menu tree first, the changes will not be reflected on the Programs menu when you press the Apply or Ok button.

Previous   Home   Next