@Override
		protected void updateItem(MethodMember method, boolean empty) {
			super.updateItem(method, empty);
			if (empty || method == null) {
				setText(null);
				setGraphic(null);
				setOnMouseClicked(null);
				setContextMenu(null);
				if (onClickFilter != null)
					removeEventFilter(MouseEvent.MOUSE_PRESSED, onClickFilter);
				setOpacity(1);
			} else {
				onClickFilter = null;

				ClassInfo declaringClass = method.getDeclaringClass();
				if (declaringClass == null)
					return;

				ClassPathNode ownerPath = workspace.findClass(declaringClass.getName());
				if (ownerPath == null)
					return;

				ClassMemberPathNode methodPath = ownerPath.child(method);

				String methodOwnerName = declaringClass.getName();
				Text classText = new Text(format.filter(methodOwnerName, false, true, true));
				classText.setFill(Color.CADETBLUE);

				Text methodText = new Text(method.getName());
				if (method.hasStaticModifier()) methodText.setFill(Color.LIGHTGREEN);
				else methodText.setFill(Color.YELLOW);

				// Layout
				TextFlow textFlow = new TextFlow(classText, new Label("#"), methodText, new Label(method.getDescriptor()));
				HBox box = new HBox(configurationService.graphicOf(methodPath), textFlow);
				box.setSpacing(5);
				if (getTreeItem() instanceof CallGraphItem i && i.recursive) {
					box.getChildren().add(new FontIconView(CarbonIcons.CODE_REFERENCE));
					box.setOpacity(0.4);
				}
				setGraphic(box);

				// Context menu support
				ContextMenu contextMenu = configurationService.contextMenuOf(ContextSource.REFERENCE, methodPath);
				MenuItem focusItem = new MenuItem();
				focusItem.setGraphic(new FontIconView(CarbonIcons.CI_3D_CURSOR_ALT));
				focusItem.textProperty().bind(Lang.getBinding("menu.view.methodcallgraph.focus"));
				focusItem.setOnAction(e -> currentMethod.set(method));
				contextMenu.getItems().add(1, focusItem);
				setContextMenu(contextMenu);

				// Override the double click behavior to open the class. Doesn't work using the "setOn..." methods.
				onClickFilter = e -> {
					if (e.getButton().equals(MouseButton.PRIMARY) && e.getClickCount() >= 2) {
						e.consume();
						try {
							actions.gotoDeclaration(ownerPath).requestFocus(method);
						} catch (IncompletePathException ex) {
							// TODO: Log error
						}
					}
				};
				addEventFilter(MouseEvent.MOUSE_PRESSED, onClickFilter);
			}
		}
Cell of a class in the hierarchy.
recaf-ui/src/main/java/software/coley/recaf/ui/control/graph/MethodCallGraphPane.java