弹出输入框

@param title 标题
@param header 信息头
@param content 内容
@param defaultValue 输入框默认值

@return 输入的内容
427666
public static String showInputDialog(String title, String header, String content, String defaultValue) {
        TextInputDialog dialog = new TextInputDialog(defaultValue);
        dialog.setTitle(title);
        dialog.setHeaderText(header);
        dialog.setContentText(content);

        Optional<String> result = dialog.showAndWait();
        return result.orElse(null);
    }
976986
@Override
    public Content getModuleHeader(String heading) {
        HtmlTree bodyTree = getBody(true, getWindowTitle(mdle.getQualifiedName().toString()));
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
                ? HtmlTree.HEADER()
                : bodyTree;
        addTop(htmlTree);
        addNavLinks(true, htmlTree);
        if (configuration.allowTag(HtmlTag.HEADER)) {
            bodyTree.addContent(htmlTree);
        }
        HtmlTree div = new HtmlTree(HtmlTag.DIV);
        div.addStyle(HtmlStyle.header);
        Content annotationContent = new HtmlTree(HtmlTag.P);
        addAnnotationInfo(mdle, annotationContent);
        div.addContent(annotationContent);
        Content label = mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL)
                ? contents.openModuleLabel : contents.moduleLabel;
        Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
                HtmlStyle.title, label);
        tHeading.addContent(Contents.SPACE);
        Content moduleHead = new RawHtml(heading);
        tHeading.addContent(moduleHead);
        div.addContent(tHeading);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            mainTree.addContent(div);
        } else {
            bodyTree.addContent(div);
        }
        return bodyTree;
    }
442807
public T header(String title, Iterable<HtmlResource> resources) throws IOException {
		return (T) begin("html")
			.begin("head")
			.begin("title").text("Simon Console: ").text(title).end("title")
			.resources(resources)
			.end("head")
			.begin("body")
			.begin("h1")
			.write("<img id=\"logo\" src=\"../resource/images/logo.png\" alt=\"Logo\" />")
			.text("Simon Console: ").text(title)
			.end("h1");
	}
796413
public static void addDefaultHeader(String key, String value) {
		if (isNotBlank(key) && isNotBlank(value)) {
			if (defaultHeader == null) {
				defaultHeader = new HashMap<String, String>();
			}
			defaultHeader.put(key, value);
		}
	}
1142376
public static boolean getBoolean(final String title, final boolean defaultValue) {
        final String val = ConsoleMenu.selectOne(title, new String[] { "Yes", "No" },
                new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() }, defaultValue ? 1 : 2);

        return Boolean.valueOf(val);
    }
679367
public static Alert getAlert(String title, String header, String content, AlertType alertType, Modality modality,
                                 Window window, StageStyle style) {
        Alert alert = new Alert(alertType);

        alert.setTitle(title);
        alert.setHeaderText(header);
        alert.setContentText(content);

        alert.initModality(modality);
        alert.initOwner(window);
        alert.initStyle(style);

        return alert;
    }
502140
public void addTitle(String title) {
		XmpArray array = new XmpArray(XmpArray.ALTERNATIVE);
		array.add(title);
		setProperty(TITLE, array);
	}
552512
private void writeTitleProperty(Node node, Hashtable properties) {

        String title = "";
        // the title string is stored in the first child node
        NodeList children = node.getChildNodes();
        if (children != null) {
            Node titleNode = children.item(0);
            if (titleNode != null) {
                title = titleNode.getNodeValue();
            }
        }
        // add the title property if we have one
        if ((title != null) && (title.length() > 0)) {

            properties.put(CmsPropertyDefinition.PROPERTY_TITLE, CmsStringUtil.substitute(title, "{subst}", "&#"));
            // the title will be used as navtext if no other navtext is
            // given
            if (properties.get(CmsPropertyDefinition.PROPERTY_NAVTEXT) == null) {
                properties.put(
                    CmsPropertyDefinition.PROPERTY_NAVTEXT,
                    CmsStringUtil.substitute(title, "{subst}", "&#"));
            }
        }

    }
336839
public static Optional<ButtonType> showError(String title, String content) {
        return showError(title, null, content);
    }
1370380
public void setTitle(java.util.Collection<StringFilter> title) {
        if (title == null) {
            this.title = null;
            return;
        }

        this.title = new java.util.ArrayList<StringFilter>(title);
    }
273894
public static Long getValue(final Long value, final Long defaultValue) {

    return value == null ? defaultValue : value;
  }
970084
public Result with(String headerName, String headerContent) {
        headers.put(headerName, headerContent);
        return this;
    }
1158583
private String getSimpleHeaderValue(String header, HttpResponse httpResponse) {
    return getSimpleHeaderValue(header, httpResponse, true);
  }
576367
public static Optional<ButtonType> showWarning(String title, String header, String content) {
        return alert(title, header, content, AlertType.WARNING);
    }
213832
public static Optional<ButtonType> alert(String title, String content) {
        return alert(title, null, content);
    }
548969
public static String getTitle(String htmlContent) {
		Document doc = Jsoup.parse(htmlContent);
		Elements titleNode = doc.select("head > title");
		return titleNode.isEmpty() ? null : doc.title();
	}
608185
public void setTitle(final String title) {
        if (title == null && this.title == null) {
            return;
        } else if (title == null) {
            removeChild(this.title);
            this.title = null;
        } else if (this.title == null) {
            this.title = new KeyValueNode<String>(CommonConstants.CS_TITLE_TITLE, title);
            appendChild(this.title, false);
        } else {
            this.title.setValue(title);
        }
    }