public void computeIndicators ( ) { Map < SceneObject , SceneObjectIndicator > _unupdated = Maps . newHashMap ( _indicators ) ; for ( int ii = 0 , nn = _vizobjs . size ( ) ; ii < nn ; ii ++ ) { SceneObject scobj = _vizobjs . get ( ii ) ; String action = scobj . info . action ; // if the object has no action, skip it if ( StringUtil . isBlank ( action ) ) { continue ; } // if we have an object action handler, possibly let them veto // the display of this tooltip and action ObjectActionHandler oah = ObjectActionHandler . lookup ( action ) ; if ( oah != null && ! oah . isVisible ( action ) ) { continue ; } String tiptext = getTipText ( scobj , action ) ; if ( tiptext != null ) { Icon icon = getTipIcon ( scobj , action ) ; SceneObjectIndicator indic = _unupdated . remove ( scobj ) ; if ( indic == null ) { // let the object action handler create the indicator if it exists, otherwise // just use a regular tip if ( oah != null ) { indic = oah . createIndicator ( this , tiptext , icon ) ; } else { indic = new SceneObjectTip ( tiptext , icon ) ; } _indicators . put ( scobj , indic ) ; } else { indic . update ( icon , tiptext ) ; } dirtyIndicator ( indic ) ; } } // clear out any no longer used indicators for ( SceneObject toremove : _unupdated . keySet ( ) ) { SceneObjectIndicator indic = _indicators . remove ( toremove ) ; indic . removed ( ) ; dirtyIndicator ( indic ) ; } _indicatorsLaidOut = false ; }
Compute the indicators for any objects in the scene .