/** Update the arrow head type on the currently selected links. */ private void onUpdateArrowType(int nArrowType) { if (!bJustSetting) { UIViewFrame frame = ProjectCompendium.APP.getCurrentFrame(); Model oModel = (Model) ProjectCompendium.APP.getModel(); if (frame instanceof UIMapViewFrame) { Vector vtUpdateLinks = new Vector(); UIMapViewFrame oMapFrame = (UIMapViewFrame) frame; UIViewPane pane = oMapFrame.getViewPane(); UILink link = null; LinkProperties props = null; for (Enumeration e = pane.getSelectedLinks(); e.hasMoreElements(); ) { link = (UILink) e.nextElement(); props = link.getLinkProperties(); if (nArrowType != props.getArrowType()) { vtUpdateLinks.addElement(props); } } if (vtUpdateLinks.size() > 0) { try { ((ViewService) oModel.getViewService()) .setArrowType( oModel.getSession(), pane.getView().getId(), vtUpdateLinks, nArrowType); int count = vtUpdateLinks.size(); for (int i = 0; i < count; i++) { props = (LinkProperties) vtUpdateLinks.elementAt(i); props.setArrowType(nArrowType); } } catch (SQLException ex) { ProjectCompendium.APP.displayError( LanguageProperties.getString( LanguageProperties.TOOLBARS_BUNDLE, "UIToolBarFormatLink.unableUpdateArrowType") + ":\n\n" + ex.getMessage()); // $NON-NLS-1$ } } } } }