TableMapper Fixes (again)
parent
0cfca19953
commit
6258fe062d
|
@ -0,0 +1,9 @@
|
|||
package org.hwo.models.TableMapper;
|
||||
|
||||
public enum ColumnResizePolicy {
|
||||
|
||||
FILL_LINEAR, // totalwidth < viewport : w = w * (totalwidth / viewport.width)
|
||||
FILL_LAST_COLUMN, // totalwidth < viewport : last volumns width is expanded
|
||||
|
||||
|
||||
}
|
|
@ -396,11 +396,14 @@ public class TableMapper extends AbstractTableModel
|
|||
}
|
||||
};
|
||||
|
||||
jTable.addMouseListener(mouseAdapter);
|
||||
|
||||
if (InteractiveObjectHelper.isInteractiveObject(editorObjectClass))
|
||||
setEditorEnabled(true);
|
||||
if (ObjectEditorUIHelper.isEditable(editorObjectClass))
|
||||
setEditorEnabled(true);
|
||||
|
||||
initializeJTable();
|
||||
}
|
||||
|
||||
private void initializeMapper()
|
||||
|
@ -437,7 +440,6 @@ public class TableMapper extends AbstractTableModel
|
|||
this.jTable.setRowSorter(new TableRowSorter<TableMapper>(this));
|
||||
} else {
|
||||
this.jTable.setRowSorter(null);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -543,7 +545,10 @@ public class TableMapper extends AbstractTableModel
|
|||
|
||||
public void openEditor()
|
||||
{
|
||||
System.err.println("TableMapper.openEditor()");
|
||||
if (!isEditorEnabled())
|
||||
return;
|
||||
|
||||
log(DEBUG,"TableMapper.openEditor()");
|
||||
for (TableMapperListener listener: this.tableMapperListeners){
|
||||
if (listener.editorRequest(this, getSelectedRow())){
|
||||
fireTableRowsUpdated(jTable.getSelectedRow(), jTable.getSelectedRow());
|
||||
|
@ -772,11 +777,6 @@ public class TableMapper extends AbstractTableModel
|
|||
int ind = this.p_rows.indexOf(before);
|
||||
this.p_rows.add(ind, row);
|
||||
|
||||
if (TableMapperValue.class.isInstance(row)){
|
||||
TableMapperValue tmv = (TableMapperValue)row;
|
||||
tmv.unassignTableMapper(this);
|
||||
}
|
||||
|
||||
fireTableRowsInserted(ind, ind);
|
||||
} else {
|
||||
this.p_rows.add(row);
|
||||
|
|
Loading…
Reference in New Issue