Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.FilterColumn


    }
  }
 
  private void processFilter (int row, int col, int field, Worksheet worksheet, Spreadsheet spreadsheet) {
    final AutoFilter autoFilter = worksheet.getAutoFilter();
    final FilterColumn filterColumn = autoFilter.getFilterColumn(field - 1);
    final String rangeAddr = autoFilter.getRangeAddress().formatAsString();
    final Range range = Ranges.range(worksheet, rangeAddr);
   
    spreadsheet.smartUpdate("autoFilterPopup",
      convertFilterInfoToJSON(row, col, field, rangeAddr, scanRows(field, filterColumn, range, worksheet)));
View Full Code Here


      int offcol = -1;
      final List<FilterColumn> fcs = af.getFilterColumns();
      final List<Map> fcsary = fcs != null ? new ArrayList<Map>(fcs.size()) : null;
      if (fcsary != null) {
        for(int col = left; col <= right; ++col) {
          final FilterColumn fc = af.getFilterColumn(col - left);
          final List<String> filters = fc != null ? fc.getFilters() : null;
          final boolean on = fc != null ? fc.isOn() : true;
          Map fcmap = new HashMap();
          fcmap.put("col", Integer.valueOf(col));
          fcmap.put("filter", filters);
          fcmap.put("on", on);
          int field = col - left + 1;
View Full Code Here

    synchronized (_sheet) {
      AutoFilter af = _sheet.getAutoFilter();
      if (af == null) {
        af = autoFilter();
      }
      final FilterColumn fc = BookHelper.getOrCreateFilterColumn(af, field-1);
      BookHelper.setProperties(fc, criteria1, filterOp, criteria2, visibleDropDown);
     
      //update rows
      final CellRangeAddress affectedArea = af.getRangeAddress();
      final int row1 = affectedArea.getFirstRow();
      final int col1 = affectedArea.getFirstColumn();
      final int col =  col1 + field - 1;
      final int row = row1 + 1;
      final int row2 = affectedArea.getLastRow();
      final Set cr1 = fc.getCriteria1();
 
      final Set<Ref> all = new HashSet<Ref>();
      for (int r = row; r <= row2; ++r) {
        final Cell cell = BookHelper.getCell(_sheet, r, col);
        final String val = BookHelper.isBlankCell(cell) ? "=" : BookHelper.getCellText(cell); //"=" means blank!
View Full Code Here

      return;
    }
    fieldIndex = (Integer) info[0];
    columnIndex = (Integer) info[1];
   
    final FilterColumn fc = af.getFilterColumn(fieldIndex - 1);
    final TreeSet<RowInfo> rowInfos = new TreeSet<RowInfo>(new MyComparator());
    final Set<RowInfo> selected = new HashSet<RowInfo>();
    fetchRowInfos(fc, range, rowInfos, selected);
   
    _filterListbox.setModel(new ListModelList(rowInfos));
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.FilterColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.