Guest User

Untitled

a guest
Apr 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.54 KB | None | 0 0
  1. public static String EnumerateTableData(TableHeader Th, LinkedList<TableRow> T)
  2.     {
  3.         String toReturn = "";
  4.         if(Th.FormAction != null) toReturn += "<form id='mainform' action='" + Th.FormAction + "'>";
  5.         toReturn += "<table border='0' width='100%' cellpadding='0' cellspacing='0' id='table'><tr>";
  6.         if(Th.Checkbox == true) toReturn += "<th class='table-header-check'><a id='toggle-all'></a></th>";
  7.         for(String Value : Th.Fields)
  8.         {
  9.             toReturn += "<th class='table-header-repeat line-left minwidth-1'><a href=''>" + Value + "</a></th>";
  10.         }
  11.         toReturn += "</tr><tr>";
  12.         int RowId = 0;
  13.         for(TableRow Row : T)
  14.         {
  15.             if(Th.Checkbox) toReturn += "<td><input type='checkbox' name='" + Row.Values[0] + "'></td>";
  16.             toReturn += "<tr>";
  17.             for(String Value : Row.Values)
  18.             {
  19.                 toReturn += "<td>" + Value + "</td>";
  20.             }
  21.             toReturn += "</tr>";
  22.             if(Th.Options)
  23.             {
  24.                 toReturn += "<tr><td class='options-width'>";
  25.                 for(int i = 0; i <= Row.OptionsGraphics.length; i++)
  26.                 {
  27.                     toReturn += "<a href='"+Row.OptionsHref[i]+"' class='";
  28.                     switch(Row.OptionsGraphics[i])
  29.                     {
  30.                     case Gear:
  31.                         toReturn += "icon-1";
  32.                         break;
  33.                     case Star:
  34.                         toReturn += "icon-3";
  35.                         break;
  36.                     case Buy:
  37.                         toReturn += "icon-4";
  38.                         break;
  39.                     case Check:
  40.                         toReturn += "icon-5";
  41.                         break;
  42.                     case X:
  43.                         toReturn += "icon-2";
  44.                         break;
  45.                     }
  46.                     toReturn += " info-tooltip'></a>";
  47.                 }
  48.                 toReturn += "</td>";
  49.             }
  50.             toReturn += "</tr>";
  51.         }
  52.         toReturn += "</table>";
  53.         return toReturn;
Add Comment
Please, Sign In to add comment