コード例 #1
0
  // ZSS-901
  public String getAutoFilterBorder() {

    StringBuffer sb = new StringBuffer();

    final SAutoFilter filter = _sheet.getAutoFilter();
    if (filter == null) return "____"; // empty

    // must check in top/left/bottom/right order
    final CellRegion rgn = filter.getRegion();
    final int t = rgn.getRow();
    final int l = rgn.getColumn();
    final int b = rgn.getLastRow();
    final int r = rgn.getLastColumn();

    final int r0 = _cell.getRowIndex();
    final int c0 = _cell.getColumnIndex();
    sb.append(r0 == t && l <= c0 && c0 <= r ? "t" : "_");
    sb.append(c0 == l && t <= r0 && r0 <= b ? "l" : "_");
    sb.append(r0 == b && l <= c0 && c0 <= r ? "b" : "_");
    sb.append(c0 == r && t <= r0 && r0 <= b ? "r" : "_");
    return sb.toString();
  }
コード例 #2
0
 // ZSS-1019
 protected void importAutoFilterColumns(
     AutoFilter poiFilter, SAutoFilter zssFilter, int numberOfColumn) {
   for (int i = 0; i < numberOfColumn; i++) {
     FilterColumn srcColumn = poiFilter.getFilterColumn(i);
     if (srcColumn == null) {
       continue;
     }
     NFilterColumn destColumn = zssFilter.getFilterColumn(i, true);
     destColumn.setProperties(
         PoiEnumConversion.toFilterOperator(srcColumn.getOperator()),
         srcColumn.getCriteria1(),
         srcColumn.getCriteria2(),
         srcColumn.isOn());
   }
 }