public void updateInfoAnnotation(final SelectEvent event) { //SystemUtils.LOG.info("updateInfoAnnotation " + event.getTopObject() + " " + theObjectInfoHash.get(event.getTopObject())); if (event.getEventAction().equals(SelectEvent.ROLLOVER) && theObjectInfoHash.get(event.getTopObject()) != null) { String info = theObjectInfoHash.get(event.getTopObject()); if (event.getTopObject() instanceof DirectedPath) { //SystemUtils.LOG.info("DirectedPath:::"); DirectedPath dp = (DirectedPath) event.getTopObject(); //dp.getAttributes().setOutlineMaterial(Material.WHITE); dp.setHighlighted(true); //dp.setAttributes(productLayer.dpHighlightAttrs); //theSelectedObjectLabel.setText("" + productLayer.theObjectInfoHash.get(dp)); theLastSelectedDP = dp; } theInfoAnnotation.setText(info); theInfoAnnotation.getAttributes().setVisible(true); //SystemUtils.LOG.info("selectedProduct " + getSelectedProduct()); //final ExecCommand command = datApp.getCommandManager().getExecCommand("showPolarWaveView"); //command.execute(2); } else if (event.getEventAction().equals(SelectEvent.LEFT_CLICK) && theSurfaceProductHash.get(event.getTopObject()) != null && theSurfaceSequenceHash.get(event.getTopObject()) != null) { //SystemUtils.LOG.info("click " + event.getTopObject()); OceanSwellTopComponent.setOSWRecord(theSurfaceProductHash.get(event.getTopObject()), theSurfaceSequenceHash.get(event.getTopObject())); } else { if (theLastSelectedDP != null) { theLastSelectedDP.setHighlighted(false); } theInfoAnnotation.getAttributes().setVisible(false); //theSelectedObjectLabel.setText(""); } }
theInfoAnnotation.setText(text); theInfoAnnotation.getAttributes().setVisible(false);