Vector items = new Vector(); ActionListener l = createPopupmenuHandler(); VDBFieldData field; JMenuItem menuitem;  if (isTarget()) { int count = 0; JMenu varlinkItem = new JMenu(varlinkString); JMenu menu = varlinkItem;  Enumeration e = recordData.getFieldsV().elements(); while (e.hasMoreElements()) { field = (VDBFieldData)(e.nextElement());  if (field.getType()!=DBDConstants.DBF_INLINK && field.getType()!=DBDConstants.DBF_OUTLINK && field.getType()!=DBDConstants.DBF_FWDLINK) { menuitem = new JMenuItem(field.getName()); menuitem.addActionListener(l); menu = PopUpMenu.addItem(menuitem, menu, count); count++; }  } if (count > 0) items.addElement(varlinkItem);  } else {  JMenu inlinks = new JMenu(inlinkString); JMenu outlinks = new JMenu(outlinkString); JMenu fwdlinks = new JMenu(fwdlinkString);    JMenu inMenu = inlinks; JMenu outMenu = outlinks; JMenu fwdMenu = fwdlinks;  int inpItems, outItems, fwdItems; inpItems=outItems=fwdItems=0;  Enumeration e = recordData.getFieldsV().elements(); while (e.hasMoreElements()) { field = (VDBFieldData)(e.nextElement()); if (field.getValue().equals(nullString)) { switch (field.getType()) { case DBDConstants.DBF_INLINK: menuitem = new JMenuItem(field.getName()); menuitem.addActionListener(l); inlinks = PopUpMenu.addItem(menuitem, inlinks, inpItems); inpItems++; break; case DBDConstants.DBF_OUTLINK: menuitem = new JMenuItem(field.getName()); menuitem.addActionListener(l); outlinks = PopUpMenu.addItem(menuitem, outlinks, outItems); outItems++; break; case DBDConstants.DBF_FWDLINK: menuitem = new JMenuItem(field.getName()); menuitem.addActionListener(l); fwdlinks = PopUpMenu.addItem(menuitem, fwdlinks, fwdItems); fwdItems++; break; } } }  if (inMenu.getItemCount() > 0) items.addElement(inMenu); if (outMenu.getItemCount() > 0) items.addElement(outMenu); if (fwdMenu.getItemCount() > 0) items.addElement(fwdMenu);  }  return items;
return getLinkMenus(recordData.getFieldsV().elements());
public Vector getItems() {	Vector items = new Vector();	ActionListener l = createPopupmenuHandler();	VDBFieldData field;	JMenuItem menuitem;		if (isTarget()) {		int count = 0;		JMenu varlinkItem = new JMenu(varlinkString);		JMenu menu = varlinkItem;				Enumeration e = recordData.getFieldsV().elements();		while (e.hasMoreElements()) {			field = (VDBFieldData)(e.nextElement());/*			switch (field.getType()) {				case DBDConstants.DBF_CHAR: 				case DBDConstants.DBF_UCHAR: 				case DBDConstants.DBF_SHORT: 				case DBDConstants.DBF_USHORT: 				case DBDConstants.DBF_LONG: 				case DBDConstants.DBF_ULONG: 				case DBDConstants.DBF_FLOAT: 				case DBDConstants.DBF_DOUBLE: 				case DBDConstants.DBF_STRING:				case DBDConstants.DBF_NOACCESS:		// added by request of APS				case DBDConstants.DBF_ENUM:				case DBDConstants.DBF_MENU:				case DBDConstants.DBF_DEVICE:  // ?				  menuitem = new JMenuItem(field.getName());				  menuitem.addActionListener(l);				  menu = PopUpMenu.addItem(menuitem, menu, count);				  count++; 			}*/			if (field.getType()!=DBDConstants.DBF_INLINK &&				field.getType()!=DBDConstants.DBF_OUTLINK &&				field.getType()!=DBDConstants.DBF_FWDLINK)			{				  menuitem = new JMenuItem(field.getName());				  menuitem.addActionListener(l);				  menu = PopUpMenu.addItem(menuitem, menu, count);				  count++; 			}		}		if (count > 0) items.addElement(varlinkItem);			}	else {				JMenu inlinks = new JMenu(inlinkString);		JMenu outlinks = new JMenu(outlinkString);		JMenu fwdlinks = new JMenu(fwdlinkString);				//boolean isSoft = recordData.canBePV_LINK(); !!! can be added		JMenu inMenu = inlinks;			JMenu outMenu = outlinks;			JMenu fwdMenu = fwdlinks;					int inpItems, outItems, fwdItems;		inpItems=outItems=fwdItems=0;		Enumeration e = recordData.getFieldsV().elements();		while (e.hasMoreElements()) {			field = (VDBFieldData)(e.nextElement());			if (field.getValue().equals(nullString)) {				switch (field.getType()) {					case DBDConstants.DBF_INLINK:						 menuitem = new JMenuItem(field.getName());						 menuitem.addActionListener(l);						 inlinks = PopUpMenu.addItem(menuitem, inlinks, inpItems); 						 inpItems++;						 break;					case DBDConstants.DBF_OUTLINK: 						 menuitem = new JMenuItem(field.getName());						 menuitem.addActionListener(l);						 outlinks = PopUpMenu.addItem(menuitem, outlinks, outItems); 						 outItems++;						 break;					case DBDConstants.DBF_FWDLINK:						 menuitem = new JMenuItem(field.getName());						 menuitem.addActionListener(l);						 fwdlinks = PopUpMenu.addItem(menuitem, fwdlinks, fwdItems); 						 fwdItems++;						 break;				}			}		}		if (inMenu.getItemCount() > 0)			items.addElement(inMenu);		if (outMenu.getItemCount() > 0)			items.addElement(outMenu);		if (fwdMenu.getItemCount() > 0)			items.addElement(fwdMenu);	}			return items;}