code: public String dialog(int segment, String attributes) {
  
          if (segment == HTML_START) {
              StringBuffer html = new StringBuffer(512);
              if (useNewStyle()) {
                  html.append(dialogTitle());
              }
              html.append("<table class=\"dialog\" cellpadding=\"0\" cellspacing=\"0\"");
              if (attributes != null) {
                  html.append(" ");
                  html.append(attributes);
              }
              html.append("><tr><td>\n<table class=\"dialogbox\" cellpadding=\"0\" cellspacing=\"0\">\n");
              html.append("<tr><td>\n");
              if (useNewStyle() && getToolManager().hasToolPathForUrl(getJsp().getRequestContext().getUri())) {
                  html.append(getAdminTool().groupHtml(this));
              }
              return html.toString();
          } else {
              return "</td></tr></table>\n</td></tr></table>\n<p>&nbsp;</p>\n";
          }
      }
docs: Builds the outer dialog window border.<p>
  
  @param segment the HTML segment (START / END)
  @param attributes optional additional attributes for the opening dialog table
  
  @return a dialog window start / end segment