private String getRead() throws JsonProcessingException { return "<html><body style=\"margin: 0;\">" + "<textarea name=\"" + formVar + "\" style=\"margin: 0px; width: " + width + "; height: " + height2 + ";\">" + getString(value) + "</textarea>" + "</body></html>"; }
private String getRead() throws JsonProcessingException { return "<html><body style=\"margin: 0;\">" + "<textarea name=\"" + formVar + "\" style=\"margin: 0px; width: " + width + "; height: " + height2 + ";\">" + getString(value) + "</textarea>" + "</body></html>"; }
/** * Gets write. * * @return the write * @throws JsonProcessingException the json processing exception */ protected String getWrite() throws JsonProcessingException { return "<html><body style=\"margin: 0;\">" + "<form action=\"" + id + "\" method=\"POST\">" + "<textarea name=\"" + formVar + "\" style=\"margin: 0px; width: " + width + "; height: " + height1 + ";\">" + getString(value) + "</textarea>" + "<br/><input type=\"submit\">" + "</form></body></html>"; }
/** * Gets write. * * @return the write * @throws JsonProcessingException the json processing exception */ protected String getWrite() throws JsonProcessingException { return "<html><body style=\"margin: 0;\">" + "<form action=\"" + id + "\" method=\"POST\">" + "<textarea name=\"" + formVar + "\" style=\"margin: 0px; width: " + width + "; height: " + height1 + ";\">" + getString(value) + "</textarea>" + "<br/><input type=\"submit\">" + "</form></body></html>"; }
/** * Print string query. * * @param initial the initial * @return the string query */ public StringQuery<T> print(@Nonnull T initial) { value = initial; try { int textLines = getString(value).split("\n").length; int lines = (int) (Math.max(Math.min((textLines), 20), 3) * (200.0 / 12)); height1 = String.format("%dpx", lines); height2 = String.format("%dpx", lines + 40); } catch (JsonProcessingException e) { throw new RuntimeException(e); } log.p("<iframe src=" + id + " style=\"margin: 0px; width: 100%; height: " + height2 + ";\"></iframe>"); return this; }
/** * Print string query. * * @param initial the initial * @return the string query */ public StringQuery<T> print(@Nonnull T initial) { value = initial; try { int textLines = getString(value).split("\n").length; int lines = (int) (Math.max(Math.min((textLines), 20), 3) * (200.0 / 12)); height1 = String.format("%dpx", lines); height2 = String.format("%dpx", lines + 40); } catch (JsonProcessingException e) { throw new RuntimeException(e); } log.p("<iframe src=" + id + " style=\"margin: 0px; width: 100%; height: " + height2 + ";\"></iframe>"); return this; }