public void setCurrentButtonState(ButtonState<T> buttonState) {
		if (!buttonStates.contains(buttonState)) {
			throw new IllegalArgumentException("Attempted to set button state to unknown state");
		}
		this.currentButtonState = buttonState;
		setText(buttonState.getButtonText());
		String tooltip = buttonState.getDescription();

		setToolTipText(tooltip);
		getAccessibleContext().setAccessibleDescription(tooltip);
		stateChangedConsumer.accept(buttonState);
	}
Sets the active button state for this button.
@param buttonState the button state to be made active
Ghidra/Framework/Docking/src/main/java/docking/menu/MultiStateButton.java