TOC PREV NEXT INDEX



Adding a new action


This brief example adds a new menuItem called "beep", which beeps, using the class= command. First a new class is created, then the addition to the IDEmenu.config file is described.

First a new BeepAction class must be created and compiled:

import java.awt.event.*;
import datarep.ide.config.Action;
public class BeepAction extends Action {
public void actionPerformed(ActionEvent event) {
getToolkit().beep();
}
}

Next the following addition needs to be made to the IDEmenu.config file. Note that the class which is used in the action tag is the new BeepAction class.

<menuItem label=beep> <action class=BeepAction> </menuItem>

Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX