Display the start form in input format.
@param out The out stream.
@param iPrintOptions The view specific attributes.
971856
public void printDataStartField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("<tr>");
    }
80000
public boolean printControl(PrintWriter out, int iPrintOptions)
    {
        if (!this.getScreenField().isInputField())
            return false;
        if (this.getScreenField().isToolbar())
            return false;
        String strFieldDesc = DBConstants.BLANK;
        if (this.getScreenField().getConverter() != null)
            strFieldDesc = this.getScreenField().getConverter().getFieldDesc();
        String strFieldName = this.getScreenField().getSFieldParam();
        String strControlType = this.getInputType(null);
        String strFieldType = this.getInputType(ScreenModel.DOJO_TYPE);
        if ((this.getScreenField().isEnabled() == true) && (!this.getScreenField().getParentScreen().isPrintReport()))
        {   // Input field and not printing a report
            Convert converter = this.getScreenField().getConverter();
            int iMaxSize = 10;
            if (converter != null)
                iMaxSize = converter.getMaxLength();
            String strMaxSize = Integer.toString(iMaxSize);
            String strSize = DEFAULT_CONTROL_LENGTH;
            if (iMaxSize < 40)
                strSize = strMaxSize;
            String strValue = this.getScreenField().getSFieldValue(true, false);
        // Overriding methods will replace with: text int checkbox radio hidden float date url textbox
            strFieldDesc = Utility.replace(strFieldDesc, " ", "\240");  // spaces -> nbsp
            this.printInputControl(out, strFieldDesc, strFieldName, strSize, strMaxSize, strValue, strControlType, strFieldType);
        }
        else
            this.printDisplayControl(out, strFieldDesc, strFieldName, strFieldType);
        return true;
    }
12375
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        boolean bFieldsFound = false;
        int iNumCols = this.getSFieldCount();
        for (int iIndex = 0; iIndex < iNumCols; iIndex++)
        {
            ScreenField sField = this.getSField(iIndex);
            boolean bPrintControl = this.isPrintableControl(sField, iPrintOptions);
            if (this.isToolbar())
                if (sField.getConverter() == null)
                    bPrintControl = false;
            if (this instanceof BaseGridScreen)
                if (iIndex < ((BaseGridScreen)this).getNavCount())
                    bPrintControl = true;   // Move to isPrintable.
            if (bPrintControl)
            {
                if (!bFieldsFound)
                    this.printDataStartForm(out, iPrintOptions);    // First time
                this.printDataStartField(out, iPrintOptions);
                this.printScreenFieldData(sField, out, iPrintOptions);
                this.printDataEndField(out, iPrintOptions);
                bFieldsFound = true;
            }
        }
        if (bFieldsFound)
            this.printDataEndForm(out, iPrintOptions);
        return bFieldsFound;
    }
309032
public void printHtmlHeading(PrintWriter out)
    {
        if (this.getScreenField().getConverter() == null)
            return;
        String strField = this.getScreenField().getConverter().getFieldDesc();
        if ((strField == null) || (strField.length() == 0))
            strField = "&nbsp;";    //?"<br>";
        out.println("<th>" + strField + "</th>");
    }
131336
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType)
    {
        if (!HtmlConstants.BUTTON.equalsIgnoreCase(strControlType))
        {
            strFieldName = DBParams.COMMAND;
            strControlType = HtmlConstants.SUBMIT;
        }
        String strButtonDesc = ((SButtonBox)this.getScreenField()).getButtonDesc();
        if ((strButtonDesc == null)
            && (((SButtonBox)this.getScreenField()).getImageButtonName() != null))
        {
            if (this.getScreenField().getParentScreen() instanceof GridScreen)
            { // These are command buttons such as "Form" or "Detail"
                GridScreen gridScreen = (GridScreen)this.getScreenField().getParentScreen();
                Record record = gridScreen.getMainRecord();
                String strRecordClass = record.getClass().getName();
                String strImage = DBConstants.FORM;
                if (((SButtonBox)this.getScreenField()).getImageButtonName() != null)
                    strImage = ((SButtonBox)this.getScreenField()).getImageButtonName();
                String strButtonCommand = ((SButtonBox)this.getScreenField()).getButtonCommand();
                if ((strButtonCommand == null) || (strButtonCommand.length() == 0))
                    strButtonCommand = ThinMenuConstants.FORM;
//x                String strCommand = "&" + DBParams.COMMAND + "=" + strButtonCommand;
//?                try {
//?                    out.println("<td align=\"center\" valign=\"center\"><a href=\"" + "?record=" + strRecordClass + strCommand + "&" + DBConstants.STRING_OBJECT_ID_HANDLE + "=" + URLEncoder.encode(strBookmark, DBConstants.URL_ENCODING) + "\"><IMG SRC=\"" + HtmlConstants.IMAGE_DIR + "buttons/" + strImage + ".gif\" width=\"16\" height=\"16\" alt=\"Open this record\"></a></td>");
//?                } catch (java.io.UnsupportedEncodingException ex) {
//?                    ex.printStackTrace();
//?                }
                if (strButtonDesc == null)
                    strButtonDesc = DBConstants.BLANK;
                strButtonCommand = strButtonCommand + "&amp;record=" + strRecordClass + "&amp;objectID=";
                out.println(" <xfm:trigger name=\"" + strImage + "\" ref=\"" + strFieldName + "\" command=\"" + strButtonCommand + "\">");
                out.println("   <xfm:hint>" + strFieldDesc + "</xfm:hint>");
                out.println("   <xfm:image>" + strImage + "</xfm:image>");
                out.println("   <xfm:caption>" + strButtonDesc + "</xfm:caption>");
                out.println(" </xfm:trigger>");
            }
            else
            {
                strButtonDesc = ((SButtonBox)this.getScreenField()).getImageButtonName();
                strControlType = "image";
                strFieldType = "image";
//?             ? = this.getScreenField()).getImageButtonName();
                super.printInputControl(out, strFieldDesc, strFieldName, strSize, strMaxSize, strValue, strControlType, strFieldType);
            }
        }
        else
        {
            strControlType = "submit";
            if (strButtonDesc == null)
            {
                strButtonDesc = ((SButtonBox)this.getScreenField()).getButtonCommand();
//?                strControlType = "trigger";
            }
            String strImage = "Form";
            if (((SButtonBox)this.getScreenField()).getImageButtonName() != null)
                strImage = ((SButtonBox)this.getScreenField()).getImageButtonName();
//?            else if (!strButtonDesc.equals(((SButtonBox)this.getScreenField()).getButtonCommand()))
//?                strControlType = "trigger";
            if (this.getScreenField().getConverter() == null)
                strFieldName = strButtonDesc;   // Since this isn't tied to a field, set this to the command name.
//x            out.println("<td><input type=\"" + strControlType + "\" name=\"" + strFieldName + "\" value=\"" + strButtonDesc + "\"/></td>");
            out.println(" <xfm:" + strControlType + " name=\"" + strButtonDesc + "\" ref=\"" + strFieldName + "\">");
            out.println("   <xfm:hint>" + strFieldDesc + "</xfm:hint>");
            out.println("   <xfm:image>" + strImage + "</xfm:image>");
            out.println("   <xfm:caption>" + strButtonDesc + "</xfm:caption>");
            out.println(" </xfm:" + strControlType + ">");
        }
    }
265172
public void printDisplayControl(PrintWriter out)
    {
        Convert converter = this.getScreenField().getConverter();
        if (m_vDisplays == null)
        {
            String strField = null;
            if (converter != null) if (converter.getField() != null)
                strField = converter.getField().getString();
            this.scanTableItems();
            if (converter != null) if (converter.getField() != null)
                converter.getField().setString(strField);
        }
        String string = DBConstants.BLANK;
        int iIndex = 0;
        if (converter != null)
        {   // This is required for the display or popup fields because displayField() is never called to get the value.
            iIndex = converter.convertFieldToIndex();
            if (iIndex == -1)
            {
                super.printDisplayControl(out);
                return;
            }
            try {
                string = (String)m_vDisplays.get(iIndex);
            } catch (ArrayIndexOutOfBoundsException ex) {
                string = "&nbsp;";
            }
        }
        out.println("<td>" + string + "</td>");
    }
696853
public void printDataStartForm(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) != 0)
            out.println("<tr>\n<td colspan=\"20\">");
        out.println("<table border=\"0\" cellspacing=\"10\">\n<tr>");
    }
192623
void asPresentationML(XmlPrintStream out) {
    out.openElement(getMessageMLTag(), getAttributes());

    for (Element child : getChildren()) {
      child.asPresentationML(out);
    }

    out.closeElement();
  }
375995
public void printDataEndForm(PrintWriter out, int iPrintOptions)
    {
        out.println("</tr>\n</table>");
        if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) != 0)
            out.println("</td>\n</tr>");
    }
932118
@Override
	public void write(DataOutputView out) throws IOException {
		out.writeInt(length);
		out.writeInt(position);

		out.write(data, 0, position);
	}
317302
public void displayResults(boolean showMismatches,PrintStream out) throws IOException 
    {
        PrintfFormat fmt = new PrintfFormat("%s %3d %7.2f | %30s | %30s\n");
        for (int i=0; i<pairs.length; i++) {
            if (pairs[i]!=null) {
                String label = pairs[i].isCorrect() ? "+" : "-";
                String aText = (pairs[i].getA()==null) ? "***" : pairs[i].getA().unwrap();
                String bText = (pairs[i].getB()==null) ? "***" : pairs[i].getB().unwrap();
                if (showMismatches || "+".equals(label)) {
                    out.print( fmt.sprintf( new Object[] { 
                                label,
                                new Integer(i+1),
                                new Double(pairs[i].getDistance()),
                                aText,
                                bText
                            }));
                }
            }
        }
    }
916780
public static void renderIndex(final PrintWriter out, final Collection<? extends HelpPage> pages) {
    checkNotNull(out);
    checkNotNull(pages);

    checkArgument(!pages.isEmpty(), "No help pages to render index");

    // construct a printf format with sizing for showing columns
    int max = pages.stream().mapToInt(page -> page.getName().length()).max().orElse(0);
    String nameFormat = "%-" + max + 's';

    for (HelpPage page : pages) {
      String formattedName = String.format(nameFormat, page.getName());
      out.format("  @{bold %s}", formattedName);

      String description = page.getDescription();
      if (description != null) {
        out.printf("   %s%n", description);
      }
      else {
        out.println();
      }
    }
  }
216937
public void printControlEndForm(PrintWriter out, int iPrintOptions)
    {
        out.println(Utility.endTag(XMLTags.CONTROLS));
    }
119638
public void printTo(Writer out, ReadableInstant instant) throws IOException {
        printTo((Appendable) out, instant);
    }
1137857
private void writeForm(OutputStream out) throws IOException {
		if (CollectionUtil.isNotEmpty(this.form)) {
			StringBuilder builder = StrUtil.builder();
			for (Entry<String, Object> entry : this.form.entrySet()) {
				builder.append("--").append(BOUNDARY).append(StrUtil.CRLF);
				builder.append(StrUtil.format(CONTENT_DISPOSITION_TEMPLATE, entry.getKey()));
				builder.append(entry.getValue()).append(StrUtil.CRLF);
			}
			IoUtil.write(out, this.charset, false, builder);
		}
	}
17272
public void printHtmlHeading(PrintWriter out)
    {
        if (this.getScreenField().getConverter() != null)
            super.printHtmlHeading(out);
        else if (this.getScreenField().getParentScreen() instanceof GridScreen)
        { // These are command buttons such as "Form" or "Detail"
            String strImage = "Form";
            if (((SButtonBox)this.getScreenField()).getImageButtonName() != null)
                strImage = ((SButtonBox)this.getScreenField()).getImageButtonName();
            out.println("<th align=\"center\" valign=\"center\"><img src=\"" + HtmlConstants.IMAGE_DIR + "buttons/" + strImage + ".gif\" width=\"16\" height=\"16\" alt=\"Open this record\"></th>");
        }
    }
675140
public void printControlEndForm(PrintWriter out, int iPrintOptions)
    {
        if (((iPrintOptions & HtmlConstants.HEADING_SCREEN) == HtmlConstants.HEADING_SCREEN)
                || ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN)
                || ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN))
            return; // Don't need on nested forms
//?     out.println("  </instance>");
        out.println("</xform>");
//?     if (bFieldsFound)
        if (!this.getScreenField().isToolbar())
            this.printZmlToolbarControls(out, iPrintOptions | HtmlConstants.DETAIL_SCREEN); // Print this screen's toolbars
        else
            this.printToolbarControl(true, out, iPrintOptions);     // Print this toolbar's controls
        super.printControlEndForm(out, iPrintOptions);
    }