TableMapper Updates

thobaben_diagram
Harald Wolff 2016-04-28 16:31:10 +02:00
parent 5c3b2f81d9
commit acf247559f
3 changed files with 22 additions and 0 deletions

View File

@ -32,6 +32,7 @@ import org.hwo.interactiveobjects.ObjectEditorUIHelper;
import org.hwo.ui.KeyStrokeHelper;
import org.hwo.ui.KeyStrokeListener;
import org.hwo.ui.KeyStrokeParameters;
import org.w3c.dom.views.AbstractView;
public class TableMapper extends AbstractTableModel
{
@ -774,6 +775,7 @@ public class TableMapper extends AbstractTableModel
}
csv.saveToFile(exportFile);
return true;
}

View File

@ -39,6 +39,7 @@ class TableMapperColumnModel implements TableColumnModel{
ColumnInfo ci = tableMapper.getColumnInfo().get(i);
TableColumn tc = new TableColumn(i, ci.getWidth());
tc.setPreferredWidth(ci.getWidth());
tc.setMinWidth(ci.getWidth());
tc.setHeaderValue(ci.getLabel());
tc.addPropertyChangeListener(new PropertyChangeListener() {

View File

@ -0,0 +1,19 @@
package org.hwo.ui;
import javax.swing.JTable;
import org.hwo.models.TableMapper.TableMapper;
public class JMappedTable extends JTable {
private TableMapper tableMapper;
public JMappedTable(Class<?> clazz){
this.tableMapper = new TableMapper(clazz, this);
}
public TableMapper getTableMapper() {
return tableMapper;
}
}