AnnGetHyperlinkString example for Visual J++

Note: This topic is for Document/Medical only.

The following example places calls to both the AnnSetHyperlinkString method and the AnnGetHyperlinkString method.

private void LEAD1_annHyperlinkMenu(Object source, LTOCXU.LEAD.AnnHyperlinkMenuEvent e)
{
   // Set AnnHyperLink to a URL
   for( int x = 0 ; x < e.uCount ; x++ )
   {
      int hObject = e.aObjects.toSafeArray().getInt( x );
      LEAD1.AnnSetHyperlinkString( hObject, (short) LTOCXU.AnnHyperlinkTypeConstants.ANNLINK_WEBPAGE, "http://www.leadtools.com" );

      // get the string to see what got set
      String strLink = LEAD1.AnnGetHyperlinkString( hObject );
      MessageBox.show( strLink );
   }
}