Program: 51164
Project: 51164
Buggy source:
public Component getTableCellEditorComponent(final JTable table,Object value,boolean isSelected,final int row,final int column){
  PropertyTableModel tableModel=(PropertyTableModel)table.getModel();
  Class parentClassz=null;
  if (tableModel.getParentTarget() != null) {
    parentClassz=tableModel.getParentTarget().getClass();
  }
  Class targetClassz=tableModel.target.getClass();
  String propertyName=tableModel.getRowName(row);
  String selectedFactTable=tableModel.getFactTable();
  String selectedFactTableSchema=tableModel.getFactTableSchema();
  listEditorValue=null;
  if (targetClassz == MondrianGuiDef.UserDefinedFunction.class && propertyName.equals("String_Node_Str")) {
    Vector udfs=getUdfs();
    ComboBoxModel cAlludfs=new DefaultComboBoxModel(udfs);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAlludfs);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    Vector formatStrs=getFormatStrings();
    ComboBoxModel cAllformatStrs=new DefaultComboBoxModel(formatStrs);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllformatStrs);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Measure._aggregator_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Measure._datatype_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.SQL.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.SQL._dialect_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._hideMemberIf_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._levelType_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Dimension.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Dimension._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.DimensionUsage.class && propertyName.equals("String_Node_Str")) {
    Vector source=getSource();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((tableModel.target instanceof MondrianGuiDef.Grant || tableModel.target instanceof MondrianGuiDef.MemberGrant) && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    ComboBoxModel cAccess=new DefaultComboBoxModel(MondrianGuiDef.Grant._access_values);
    if (targetClassz == MondrianGuiDef.SchemaGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
    }
 else     if (targetClassz == MondrianGuiDef.CubeGrant.class || targetClassz == MondrianGuiDef.DimensionGrant.class || targetClassz == MondrianGuiDef.MemberGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str"});
    }
 else     if (targetClassz == MondrianGuiDef.HierarchyGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
    }
    listEditor.setModel(cAccess);
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.DimensionGrant.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.HierarchyGrant.class && propertyName.equals("String_Node_Str"))) {
    Vector source=getDimensions();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.HierarchyGrant.class && (propertyName.equals("String_Node_Str") || propertyName.equals("String_Node_Str")))) {
    Vector source=getLevels(((MondrianGuiDef.HierarchyGrant)tableModel.target).hierarchy);
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (((targetClassz == MondrianGuiDef.VirtualCubeDimension.class || targetClassz == MondrianGuiDef.VirtualCubeMeasure.class) && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.CubeGrant.class && propertyName.equals("String_Node_Str"))) {
    Vector source=getCubes();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Dimension.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.DimensionUsage.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str"))) {
    Vector fks=new Vector(jdbcMetaData.getFactTableFKs(selectedFactTableSchema,selectedFactTable));
    fks.add(0,getResourceConverter().getString("String_Node_Str","String_Node_Str"));
    Vector allcols=new Vector(jdbcMetaData.getAllColumns(selectedFactTableSchema,selectedFactTable));
    ComboBoxModel cFks=new DefaultComboBoxModel(fks);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    if ((fks.size() > 1) && propertyName.equals("String_Node_Str")) {
      allcols.add(0,getResourceConverter().getString("String_Node_Str","String_Node_Str"));
      ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
      listEditor.setModel(cFks);
      selOptions=cFks;
      allOptions=cAllcols;
      listEditor.addActionListener(al);
    }
 else {
      ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
      listEditor.setModel(cAllcols);
    }
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Hierarchy.class && propertyName.equals("String_Node_Str")) {
    MondrianGuiDef.Hierarchy hProps=(MondrianGuiDef.Hierarchy)tableModel.getValue();
    String pkTable=hProps.primaryKeyTable;
    String schemaName=null;
    Vector allcols=jdbcMetaData.getAllColumns(schemaName,pkTable);
    String pk=jdbcMetaData.getTablePK(schemaName,pkTable);
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    if (value == null || ((String)value).equals("String_Node_Str")) {
      listEditor.setSelectedItem(pk);
    }
 else {
      listEditor.setSelectedItem((String)value);
      listEditorValue=(String)value;
    }
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Closure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Closure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Property.class && propertyName.equals("String_Node_Str"))) {
    MondrianGuiDef.Level lProps;
    if (targetClassz == MondrianGuiDef.Level.class) {
      lProps=(MondrianGuiDef.Level)tableModel.getValue();
    }
 else {
      lProps=(MondrianGuiDef.Level)this.getParentObject();
    }
    String lTable=lProps.table;
    Vector allcols;
    if (lTable != null) {
      allcols=jdbcMetaData.getAllColumns(null,lTable);
    }
 else {
      allcols=jdbcMetaData.getAllColumns(selectedFactTableSchema,null);
    }
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Property.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Property._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.AggFactCount.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.AggIgnoreColumn.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.AggLevel.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggMeasure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggForeignKey.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggForeignKey.class && propertyName.equals("String_Node_Str"))) {
    Vector allcols;
    allcols=jdbcMetaData.getAllColumns(null,null);
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Table.class && propertyName.equals("String_Node_Str")) {
    Vector allschemas=jdbcMetaData.getAllSchemas();
    ComboBoxModel cAllschemas=new DefaultComboBoxModel(allschemas);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllschemas);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Table.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Hierarchy.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))) {
    String schema="String_Node_Str";
    if (targetClassz == MondrianGuiDef.Table.class) {
      MondrianGuiDef.Table tProps=(MondrianGuiDef.Table)tableModel.getValue();
      schema=tProps.schema;
    }
    Vector factTables=new Vector(jdbcMetaData.getFactTables(schema));
    Vector allTablesMinusFact=new Vector(jdbcMetaData.getAllTables(schema,selectedFactTable));
    Vector allTables=new Vector(jdbcMetaData.getAllTables(schema));
    Vector dimeTables=new Vector(jdbcMetaData.getDimensionTables(schema,selectedFactTable));
    ComboBoxModel cFactTables=new DefaultComboBoxModel(factTables);
    ComboBoxModel cAllTables=new DefaultComboBoxModel((allTablesMinusFact.size() > 0) ? allTablesMinusFact : allTables);
    ComboBoxModel cDimeTables=new DefaultComboBoxModel(dimeTables);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllTables);
    allOptions=cAllTables;
    boolean toggleModel=false;
    if (parentClassz == MondrianGuiDef.Cube.class) {
      cAllTables=new DefaultComboBoxModel(allTables);
      allOptions=cAllTables;
      if (factTables.size() > 0) {
        ((DefaultComboBoxModel)cFactTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        ((DefaultComboBoxModel)cAllTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        listEditor.setModel(cFactTables);
        selOptions=cFactTables;
        toggleModel=true;
      }
    }
 else {
      if (dimeTables.size() > 0) {
        ((DefaultComboBoxModel)cDimeTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        ((DefaultComboBoxModel)cAllTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        listEditor.setModel(cDimeTables);
        selOptions=cDimeTables;
        toggleModel=true;
      }
    }
    if (toggleModel) {
      listEditor.addActionListener(al);
    }
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (value instanceof String) {
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
 else   if (value instanceof Boolean) {
    activeEditor=booleanEditor;
    booleanEditor.setSelected((Boolean)value);
  }
 else   if (value instanceof Integer) {
    activeEditor=integerEditor;
    integerEditor.setText((String)value);
  }
 else   if (value == null) {
    value="String_Node_Str";
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
 else   if (value.getClass() == MondrianGuiDef.Join.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_JOIN);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.NameExpression.class) {
    return null;
  }
 else   if (value.getClass() == MondrianGuiDef.RelationOrJoin.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_RELATION);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
    return null;
  }
 else   if (value.getClass() == MondrianGuiDef.OrdinalExpression.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,((MondrianGuiDef.OrdinalExpression)value).expressions[0],SchemaExplorer.DEF_SQL);
    ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Formula.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_FORMULA);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.CalculatedMemberProperty.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_CALCULATED_MEMBER_PROPERTY);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Table.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_TABLE);
    ptm.setFactTable(selectedFactTable);
    if (targetClassz == MondrianGuiDef.Cube.class) {
      ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    }
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.AggFactCount.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_AGG_FACT_COUNT);
    ptm.setFactTable(selectedFactTable);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Closure.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_CLOSURE);
    ptm.setFactTable(selectedFactTable);
    if (targetClassz == MondrianGuiDef.Level.class) {
      ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    }
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    spcr.setTableRendererHeight(tableEditor,null);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Property.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_PROPERTY);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else {
    value="String_Node_Str";
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
  activeEditor.setVisible(true);
  table.changeSelection(row,column,false,false);
  activeEditor.setBackground(new java.awt.Color(224,249,255));
  activeEditor.requestFocusInWindow();
  return activeEditor;
}

Fixed version (ground truth):
public Component getTableCellEditorComponent(final JTable table,Object value,boolean isSelected,final int row,final int column){
  PropertyTableModel tableModel=(PropertyTableModel)table.getModel();
  Class parentClassz=null;
  if (tableModel.getParentTarget() != null) {
    parentClassz=tableModel.getParentTarget().getClass();
  }
  Class targetClassz=tableModel.target.getClass();
  String propertyName=tableModel.getRowName(row);
  String selectedFactTable=tableModel.getFactTable();
  String selectedFactTableSchema=tableModel.getFactTableSchema();
  listEditorValue=null;
  Object parent=this.getParentObject();
  if (targetClassz == MondrianGuiDef.UserDefinedFunction.class && propertyName.equals("String_Node_Str")) {
    Vector udfs=getUdfs();
    ComboBoxModel cAlludfs=new DefaultComboBoxModel(udfs);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAlludfs);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    Vector formatStrs=getFormatStrings();
    ComboBoxModel cAllformatStrs=new DefaultComboBoxModel(formatStrs);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllformatStrs);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Measure._aggregator_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Measure._datatype_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.SQL.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.SQL._dialect_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._hideMemberIf_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._levelType_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Level._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Dimension.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Dimension._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.DimensionUsage.class && propertyName.equals("String_Node_Str")) {
    Vector source=getSource();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((tableModel.target instanceof MondrianGuiDef.Grant || tableModel.target instanceof MondrianGuiDef.MemberGrant) && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    ComboBoxModel cAccess=new DefaultComboBoxModel(MondrianGuiDef.Grant._access_values);
    if (targetClassz == MondrianGuiDef.SchemaGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
    }
 else     if (targetClassz == MondrianGuiDef.CubeGrant.class || targetClassz == MondrianGuiDef.DimensionGrant.class || targetClassz == MondrianGuiDef.MemberGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str"});
    }
 else     if (targetClassz == MondrianGuiDef.HierarchyGrant.class) {
      cAccess=new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
    }
    listEditor.setModel(cAccess);
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.DimensionGrant.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.HierarchyGrant.class && propertyName.equals("String_Node_Str"))) {
    Vector source=getDimensions();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.HierarchyGrant.class && (propertyName.equals("String_Node_Str") || propertyName.equals("String_Node_Str")))) {
    Vector source=getLevels(((MondrianGuiDef.HierarchyGrant)tableModel.target).hierarchy);
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (((targetClassz == MondrianGuiDef.VirtualCubeDimension.class || targetClassz == MondrianGuiDef.VirtualCubeMeasure.class) && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.CubeGrant.class && propertyName.equals("String_Node_Str"))) {
    Vector source=getCubes();
    ComboBoxModel cAllsource=new DefaultComboBoxModel(source);
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllsource);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Dimension.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.DimensionUsage.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Measure.class && propertyName.equals("String_Node_Str"))) {
    Vector fks=new Vector(jdbcMetaData.getFactTableFKs(selectedFactTableSchema,selectedFactTable));
    fks.add(0,getResourceConverter().getString("String_Node_Str","String_Node_Str"));
    Vector allcols=new Vector(jdbcMetaData.getAllColumns(selectedFactTableSchema,selectedFactTable));
    ComboBoxModel cFks=new DefaultComboBoxModel(fks);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    if ((fks.size() > 1) && propertyName.equals("String_Node_Str")) {
      allcols.add(0,getResourceConverter().getString("String_Node_Str","String_Node_Str"));
      ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
      listEditor.setModel(cFks);
      selOptions=cFks;
      allOptions=cAllcols;
      listEditor.addActionListener(al);
    }
 else {
      ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
      listEditor.setModel(cAllcols);
    }
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Hierarchy.class && propertyName.equals("String_Node_Str")) {
    MondrianGuiDef.Hierarchy hProps=(MondrianGuiDef.Hierarchy)tableModel.getValue();
    String pkTable=hProps.primaryKeyTable;
    String schemaName=null;
    Vector allcols=jdbcMetaData.getAllColumns(schemaName,pkTable);
    String pk=jdbcMetaData.getTablePK(schemaName,pkTable);
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    if (value == null || ((String)value).equals("String_Node_Str")) {
      listEditor.setSelectedItem(pk);
    }
 else {
      listEditor.setSelectedItem((String)value);
      listEditorValue=(String)value;
    }
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Closure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Closure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.Property.class && propertyName.equals("String_Node_Str"))) {
    MondrianGuiDef.Level lProps;
    if (targetClassz == MondrianGuiDef.Level.class) {
      lProps=(MondrianGuiDef.Level)tableModel.getValue();
    }
 else {
      lProps=(MondrianGuiDef.Level)this.getParentObject();
    }
    String lTable=lProps.table;
    Vector allcols;
    if (targetClassz == MondrianGuiDef.Level.class && parent != null) {
      if (parent instanceof MondrianGuiDef.Hierarchy) {
        MondrianGuiDef.RelationOrJoin relation=((MondrianGuiDef.Hierarchy)parent).relation;
        if (relation instanceof MondrianGuiDef.Table) {
          lTable=((MondrianGuiDef.Table)relation).name;
        }
 else         if (relation instanceof MondrianGuiDef.Join) {
          lTable=SchemaExplorer.getTableNameForAlias(relation,lTable);
        }
      }
    }
    if (lTable != null) {
      allcols=jdbcMetaData.getAllColumns(null,lTable);
    }
 else {
      allcols=jdbcMetaData.getAllColumns(selectedFactTableSchema,null);
    }
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Property.class && propertyName.equals("String_Node_Str")) {
    listEditor.setEditable(false);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(new DefaultComboBoxModel(MondrianGuiDef.Property._type_values));
    listEditor.setSelectedItem((String)value);
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.AggFactCount.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.AggIgnoreColumn.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.AggLevel.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggMeasure.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggForeignKey.class && propertyName.equals("String_Node_Str"))|| (targetClassz == MondrianGuiDef.AggForeignKey.class && propertyName.equals("String_Node_Str"))) {
    Vector allcols;
    allcols=jdbcMetaData.getAllColumns(null,null);
    ComboBoxModel cAllcols=new DefaultComboBoxModel(allcols);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllcols);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if (targetClassz == MondrianGuiDef.Table.class && propertyName.equals("String_Node_Str")) {
    Vector allschemas=jdbcMetaData.getAllSchemas();
    ComboBoxModel cAllschemas=new DefaultComboBoxModel(allschemas);
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllschemas);
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
  }
 else   if ((targetClassz == MondrianGuiDef.Table.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Hierarchy.class && propertyName.equals("String_Node_Str")) || (targetClassz == MondrianGuiDef.Level.class && propertyName.equals("String_Node_Str"))) {
    String schema="String_Node_Str";
    if (targetClassz == MondrianGuiDef.Table.class) {
      MondrianGuiDef.Table tProps=(MondrianGuiDef.Table)tableModel.getValue();
      schema=tProps.schema;
    }
    Vector factTables=new Vector(jdbcMetaData.getFactTables(schema));
    Vector allTablesMinusFact=new Vector(jdbcMetaData.getAllTables(schema,selectedFactTable));
    Vector allTables=new Vector(jdbcMetaData.getAllTables(schema));
    Vector dimeTables=new Vector(jdbcMetaData.getDimensionTables(schema,selectedFactTable));
    ComboBoxModel cFactTables=new DefaultComboBoxModel(factTables);
    ComboBoxModel cAllTables=new DefaultComboBoxModel((allTablesMinusFact.size() > 0) ? allTablesMinusFact : allTables);
    ComboBoxModel cDimeTables=new DefaultComboBoxModel(dimeTables);
    if (targetClassz == MondrianGuiDef.Level.class && parent != null) {
      if (parent instanceof MondrianGuiDef.Hierarchy) {
        MondrianGuiDef.RelationOrJoin relation=((MondrianGuiDef.Hierarchy)parent).relation;
        if (relation instanceof MondrianGuiDef.Join) {
          TreeSet joinTables=new TreeSet();
          SchemaExplorer.getTableNamesForJoin(relation,joinTables);
          cAllTables=new DefaultComboBoxModel(new Vector(joinTables));
        }
      }
    }
    listEditor.setEditable(true);
    listEditor.setToolTipText(null);
    listEditor.removeActionListener(al);
    listEditor.setModel(cAllTables);
    allOptions=cAllTables;
    boolean toggleModel=false;
    if (parentClassz == MondrianGuiDef.Cube.class) {
      cAllTables=new DefaultComboBoxModel(allTables);
      allOptions=cAllTables;
      if (factTables.size() > 0) {
        ((DefaultComboBoxModel)cFactTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        ((DefaultComboBoxModel)cAllTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        listEditor.setModel(cFactTables);
        selOptions=cFactTables;
        toggleModel=true;
      }
    }
 else {
      if (dimeTables.size() > 0) {
        ((DefaultComboBoxModel)cDimeTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        ((DefaultComboBoxModel)cAllTables).insertElementAt(workbench.getResourceConverter().getString("String_Node_Str","String_Node_Str"),0);
        listEditor.setModel(cDimeTables);
        selOptions=cDimeTables;
        toggleModel=true;
      }
    }
    if (toggleModel) {
      listEditor.addActionListener(al);
    }
    listEditor.setSelectedItem((String)value);
    listEditorValue=(String)value;
    activeEditor=listEditor;
    if (targetClassz == MondrianGuiDef.Level.class && propertyName.equals(SchemaExplorer.DEF_LEVEL[1]) && parent != null) {
      if (parent instanceof MondrianGuiDef.Hierarchy) {
        MondrianGuiDef.RelationOrJoin relation=((MondrianGuiDef.Hierarchy)parent).relation;
        if (relation instanceof MondrianGuiDef.Table) {
          activeEditor=stringEditor;
          stringEditor.setText((String)value);
        }
      }
    }
  }
 else   if (value instanceof String) {
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
 else   if (value instanceof Boolean) {
    activeEditor=booleanEditor;
    booleanEditor.setSelected((Boolean)value);
  }
 else   if (value instanceof Integer) {
    activeEditor=integerEditor;
    integerEditor.setText((String)value);
  }
 else   if (value == null) {
    value="String_Node_Str";
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
 else   if (value.getClass() == MondrianGuiDef.Join.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_JOIN);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.NameExpression.class) {
    return null;
  }
 else   if (value.getClass() == MondrianGuiDef.RelationOrJoin.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_RELATION);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
    return null;
  }
 else   if (value.getClass() == MondrianGuiDef.OrdinalExpression.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,((MondrianGuiDef.OrdinalExpression)value).expressions[0],SchemaExplorer.DEF_SQL);
    ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Formula.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_FORMULA);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.CalculatedMemberProperty.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_CALCULATED_MEMBER_PROPERTY);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Table.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_TABLE);
    ptm.setFactTable(selectedFactTable);
    if (targetClassz == MondrianGuiDef.Cube.class) {
      ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    }
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.AggFactCount.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_AGG_FACT_COUNT);
    ptm.setFactTable(selectedFactTable);
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Closure.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench,jdbcMetaData);
    for (int i=listeners.size() - 1; i >= 0; i--) {
      spce.addCellEditorListener(((CellEditorListener)listeners.get(i)));
    }
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_CLOSURE);
    ptm.setFactTable(selectedFactTable);
    if (targetClassz == MondrianGuiDef.Level.class) {
      ptm.setParentTarget(((PropertyTableModel)table.getModel()).target);
    }
    tableEditor.setModel(ptm);
    tableEditor.getColumnModel().getColumn(0).setMaxWidth(100);
    tableEditor.getColumnModel().getColumn(0).setMinWidth(100);
    spcr.setTableRendererHeight(tableEditor,null);
    activeEditor=tableEditor;
  }
 else   if (value.getClass() == MondrianGuiDef.Property.class) {
    SchemaPropertyCellEditor spce=new SchemaPropertyCellEditor(workbench);
    tableEditor.setDefaultEditor(Object.class,spce);
    SchemaPropertyCellRenderer spcr=new SchemaPropertyCellRenderer(workbench);
    tableEditor.setDefaultRenderer(Object.class,spcr);
    PropertyTableModel ptm=new PropertyTableModel(workbench,value,SchemaExplorer.DEF_PROPERTY);
    tableEditor.setModel(ptm);
    activeEditor=tableEditor;
  }
 else {
    value="String_Node_Str";
    activeEditor=stringEditor;
    stringEditor.setText((String)value);
  }
  activeEditor.setVisible(true);
  table.changeSelection(row,column,false,false);
  activeEditor.setBackground(new java.awt.Color(224,249,255));
  activeEditor.requestFocusInWindow();
  return activeEditor;
}