Example #1
0
 @Override
 public String getLine(int index) {
   if (noProperContent())
     return index <= 0 ? environment.staticStr(LangStatic.TABLE_NO_CONTENT) : "";
   if (index < 0 || index >= model.getRowCount()) return "";
   final int currentCol = getColUnderPos(hotPointX);
   String line = getStringOfLen(appearance.getRowPrefix(model, index), initialHotPointX, "", "");
   if (index != hotPointY || currentCol < 0) {
     for (int i = 0; i < model.getColCount(); ++i)
       line += getStringOfLen(appearance.getCellText(model, i, index), colWidth[i], ">", " ");
     return line;
   }
   if (currentCol > 0)
     for (int i = 0; i < currentCol; ++i)
       line += getStringOfLen(appearance.getCellText(model, i, index), colWidth[i], ">", " ");
   String currentColText = appearance.getCellText(model, currentCol, index);
   if (cellShift > 0 && cellShift < currentColText.length())
     currentColText = currentColText.substring(cellShift);
   line += getStringOfLen(currentColText, colWidth[currentCol], ">", " ");
   if (currentCol + 1 < colWidth.length)
     for (int i = currentCol + 1; i < colWidth.length; ++i)
       line += getStringOfLen(appearance.getCellText(model, i, index), colWidth[i], ">", " ");
   return line;
 }
Example #2
0
 private boolean noContentCheck() {
   if (!noProperContent()) return false;
   environment.hint(environment.staticStr(LangStatic.TABLE_NO_CONTENT), Hints.NO_CONTENT);
   return true;
 }