Package com.projity.pm.graphic.spreadsheet.editor

Examples of com.projity.pm.graphic.spreadsheet.editor.SpreadSheetCellEditorAdapter


      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()) {
          tc.setPreferredWidth(150);
          tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));
          // note that in Spreadsheet, there getCellEditor() is
          // overridden and dynamic combos are filled there
          tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SimpleComboBoxEditor(new DefaultComboBoxModel(field.getOptions(null)))));
        } else if (field.getRange() != null) {
          if (field.isPercent())
            tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new PercentRenderer()));
          else
            tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));
          tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SpinEditor(field)));
        } else if (field.isRate()) {
          tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new RateRenderer()));
          tc.setCellEditor(new SpreadSheetCellEditorAdapter(new RateEditor(null, field.isMoney(),field.isPercent(),true)));
        } else if (field.isMoney()) {
          tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));
          tc.setCellEditor(new SpreadSheetCellEditorAdapter(new MoneyEditor()));
        } else if (field.isPercent()) {
          tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new PercentRenderer()));
        } else if (field.isDate()) {
          tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new DateRenderer()));
        } else if (field.isBoolean()){
View Full Code Here


  protected void setAdaptedRenderer(Class columnClass,TableCellRenderer renderer) {
    setDefaultRenderer(columnClass,new SpreadSheetCellRendererAdapter(
        (renderer==null)?getDefaultRenderer(columnClass):renderer));
  }
  protected void setAdaptedEditor(Class columnClass,TableCellEditor editor) {
    setDefaultEditor(columnClass, new SpreadSheetCellEditorAdapter(
        (editor==null)?getDefaultEditor(columnClass):editor));
  }
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.spreadsheet.editor.SpreadSheetCellEditorAdapter

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.