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

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


  public TableCellEditor getCellEditor(int row, int column) {
    SpreadSheetModel model=(SpreadSheetModel) getModel();
    Field field = model.getFieldInColumn(column + 1);
    GraphicNode node=model.getNode(row);
    if (field != null && (field.isDynamicOptions() || field.hasFilter())) {
      return new SimpleComboBoxEditor(new DefaultComboBoxModel(field.getOptions(node.getNode().getImpl())));
    } else {
      return super.getCellEditor(row, column);
    }
  }
View Full Code Here


        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()));
View Full Code Here

TOP

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

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.