Package com.projity.pm.graphic.spreadsheet.renderer

Examples of com.projity.pm.graphic.spreadsheet.renderer.SpreadSheetColumnHeaderRenderer


      }
    }
  }

  public void addColumn(TableColumn tc) {
    tc.setHeaderRenderer(new SpreadSheetColumnHeaderRenderer());

    if (columnIndex == 0) {
      Field field = (Field) originalFieldArray.get(columnIndex);
      tc.setIdentifier(field); // store the field with the column
      // tc.setIdentifier(null); // store the field with the column
      tc.setPreferredWidth(0);

      colWidth = 0;
      // nothing
    } else {
      super.addColumn(tc);
      Field field = (Field) originalFieldArray.get(columnIndex);
      tc.setIdentifier(field); // store the field with the column
//      System.out.println("setting column " + columnIndex + " to field " + field + " ok = " + (field == getFieldInColumn(columnIndex)));

      if (field.isNameField()) {
        tc.setPreferredWidth((svg)?170:150);
        tc.setCellRenderer(new SpreadSheetNameCellRenderer());
//        tc.setCellEditor(new SpreadSheetNameCellEditor(new SimpleEditor(String.class)));
        tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SimpleEditor(String.class)));
      } else if (field == Configuration.getFieldFromId("Field.indicators")) {
        tc.setPreferredWidth(50);
        tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new IndicatorsRenderer()));
        tc.setHeaderRenderer(new SpreadSheetColumnHeaderRenderer(IndicatorsRenderer.getCellHeader()));
      } else if (field.getLookupTypes() != null) {
        tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new LookupRenderer()));
      } else {
        tc.setPreferredWidth(150);
        if (field.hasOptions()) {
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.spreadsheet.renderer.SpreadSheetColumnHeaderRenderer

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.