private String getIntegerString(Number num, NumberSettingsDefinition settingsDef) {
		long value = num.longValue();
		boolean decimalMode = !settingsDef.isHexModePreferred() && !isHexModeEnabled(settingsDef);
		if (!settingsDef.allowNegativeValue()) {
			byte[] bytes = BigEndianDataConverter.INSTANCE.getBytes(value);
			BigInteger unsignedValue = new BigInteger(1, bytes);
			if (decimalMode) {
				return unsignedValue.toString();
			}
			return "0x" + unsignedValue.toString(16);
		}
		if (decimalMode) {
			return Long.toString(value); // signed decimal
		}
		BigInteger signedValue = BigInteger.valueOf(value);
		String sign = "";
		if (signedValue.signum() < 0) {
			sign = "-";
			signedValue = signedValue.negate();
		}
		return sign + "0x" + signedValue.toString(16);
	}
Apply changes to settings.  This method must be ov
@throws CancelledException thrown if apply operation cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/AbstractSettingsDialog.java