@Override
	public boolean isEnabledForContext(ActionContext context) {
		if (!super.isEnabledForContext(context)) {
			return false;
		}
		if (imagePanel.getImage() == null) {
			return false;
		}
		return imagePanel.isTranslated();
	}
An action to re-center the image on a NavigableImagePanel.
Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/actions/ResetTranslationAction.java