Skip to main content

Table 3 Integrating Seahawk into other Java code. Complete Java code required to integrate Seahawk into a DOM-based application. The developer might also want to add rules specific to their application.

From: Seahawk: moving beyond HTML in Web-based bioinformatics analysis

import ca.ucalgary.seahawk.util.MobyUtils;
import ca.ucalgary.seahawk.gui.MobyContentGUI;
MobyContentGUI mGUI = MobyUtils.getMobyContentGUI(null);
//Pick W3C DOM node 'contextNode' for rules eval, then...
popup = new JPopupMenu();
//Evaluate Seahawk's XPath rules, from that node
mGUI.addPopupOptions(contextNode, popup, true);//true=async