public String getSelectedPagesNumbersText() {
		int[] nums = getSelPgsNumbers();
		StringBuilder sb = new StringBuilder();
		int num = Integer.MAX_VALUE;
		int pnum = Integer.MAX_VALUE;
		int s = Integer.MAX_VALUE;
		int dif;
		for (int i = 0; i < nums.length; i++) {
			num = nums[i];
			dif = num - pnum;
			if (dif > 1) {
				if ((pnum - s) > 1) {
					sb.append(s + "-" + pnum + ",");
					if (i == nums.length - 1)
						sb.append(num);
				}
				else {
					sb.append(s + ",");
					if (i == nums.length - 1)
						sb.append(num);
				}
				s = num;
			}
			else {
				if (i == nums.length - 1) {
					if ((num - s) >= 1)
						sb.append(s + "-" + num);
					else
						sb.append(num);
				}

				if (dif < 1)
					s = num;
			}

			pnum = num;
		}
		return sb.toString();
	}