2
0
Fork 0

[svn r276] made import work almost

This commit is contained in:
willemc 2007-08-24 23:18:39 +02:00
parent e120304436
commit b1aee18d36
6 changed files with 9 additions and 7 deletions

View file

@ -29,7 +29,6 @@ package com.idcanet.vasc.core;
import java.util.List;
import java.util.Set;
/**
*
* @author Willem Cazander

View file

@ -44,6 +44,7 @@ import com.idcanet.vasc.core.ui.VascUIComponent;
*/
public class VascTable {
private String name = null;
private String headerName = null;
private String headerImage = null;

View file

@ -149,6 +149,7 @@ public class DefaultVascTableController implements VascTableController {
* @see com.idcanet.vasc.core.VascTableController#refreshData()
*/
public void refreshData(VascTable table) throws Exception {
table.setSelectedObject(null);
table.setTableData(table.getVascDataSource().execute());
fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, null);
}

View file

@ -147,6 +147,11 @@ public class SwingVascViewRenderer implements VascViewRenderer {
try {
result = table.getVascDataSource().merge(rowBean);
} finally {
// todo: make faster
// add to table at position old old object
// then remove old object
// send refresh
table.getVascTableController().refreshData(table);
}
}
@ -164,6 +169,8 @@ public class SwingVascViewRenderer implements VascViewRenderer {
);
if (response==JOptionPane.YES_OPTION) {
table.getVascDataSource().delete(rowBean);
table.getTableData().remove(rowBean);
table.setSelectedObject(null);
table.getVascTableController().fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, rowBean);
}
}

View file

@ -29,22 +29,17 @@ package com.idcanet.vasc.impl.swing.ui;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.idcanet.vasc.core.VascTable;
import com.idcanet.vasc.core.ui.AbstractVascUIComponent;
import com.idcanet.vasc.core.ui.VascList;
import com.idcanet.vasc.core.ui.VascSelectItem;
import com.idcanet.vasc.core.ui.VascUIComponent;
import com.idcanet.vasc.core.ui.VascValueModel;

View file

@ -52,7 +52,6 @@ public class SwingTextField extends AbstractVascUIComponent {
return def;
}
}
class TextListener implements DocumentListener {