private Rectangle createArrowRegion() {
		if (buttonStates.size() == 1) {
			return new Rectangle(0, 0, 0, 0);
		}
		Dimension size = getSize();
		Border border = getBorder();

		// Depending on the theme, the button may have thick borders to compensate for the extra
		// space we requested in the preferred size method. Some themes do this via a compound
		// border and using the outside border's right inset works very well to move the icon
		// inside the border.
		// Otherwise, we just use 3 as a decent compromise. Nimbus looks best with 3, but flat 
		// themes look best with 2 as they have a thinner "outside" border
		int rightMargin = 3;
		if (border instanceof CompoundBorder compoundBorder) {
			Border outsideBorder = compoundBorder.getOutsideBorder();
			Insets borderInsets = outsideBorder.getBorderInsets(this);
			rightMargin = borderInsets.right;
		}
		int w = arrowIcon.getIconWidth() + rightMargin;
		int h = size.height;
		return new Rectangle(size.width - w, 0, w, h);
	}
Sets the active button state to the state that is associated with the given client data.
@param clientData the client data to make its associated button state the active state
Ghidra/Framework/Docking/src/main/java/docking/menu/MultiStateButton.java