[svn r276] made import work almost
This commit is contained in:
parent
e120304436
commit
b1aee18d36
|
@ -29,7 +29,6 @@ package com.idcanet.vasc.core;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
|
|
|
@ -44,6 +44,7 @@ import com.idcanet.vasc.core.ui.VascUIComponent;
|
||||||
*/
|
*/
|
||||||
public class VascTable {
|
public class VascTable {
|
||||||
|
|
||||||
|
|
||||||
private String name = null;
|
private String name = null;
|
||||||
private String headerName = null;
|
private String headerName = null;
|
||||||
private String headerImage = null;
|
private String headerImage = null;
|
||||||
|
|
|
@ -149,6 +149,7 @@ public class DefaultVascTableController implements VascTableController {
|
||||||
* @see com.idcanet.vasc.core.VascTableController#refreshData()
|
* @see com.idcanet.vasc.core.VascTableController#refreshData()
|
||||||
*/
|
*/
|
||||||
public void refreshData(VascTable table) throws Exception {
|
public void refreshData(VascTable table) throws Exception {
|
||||||
|
table.setSelectedObject(null);
|
||||||
table.setTableData(table.getVascDataSource().execute());
|
table.setTableData(table.getVascDataSource().execute());
|
||||||
fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, null);
|
fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,11 @@ public class SwingVascViewRenderer implements VascViewRenderer {
|
||||||
try {
|
try {
|
||||||
result = table.getVascDataSource().merge(rowBean);
|
result = table.getVascDataSource().merge(rowBean);
|
||||||
} finally {
|
} finally {
|
||||||
|
// todo: make faster
|
||||||
|
// add to table at position old old object
|
||||||
|
// then remove old object
|
||||||
|
// send refresh
|
||||||
|
|
||||||
table.getVascTableController().refreshData(table);
|
table.getVascTableController().refreshData(table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,6 +169,8 @@ public class SwingVascViewRenderer implements VascViewRenderer {
|
||||||
);
|
);
|
||||||
if (response==JOptionPane.YES_OPTION) {
|
if (response==JOptionPane.YES_OPTION) {
|
||||||
table.getVascDataSource().delete(rowBean);
|
table.getVascDataSource().delete(rowBean);
|
||||||
|
table.getTableData().remove(rowBean);
|
||||||
|
table.setSelectedObject(null);
|
||||||
table.getVascTableController().fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, rowBean);
|
table.getVascTableController().fireVascEvent(VascEventListener.VascEventType.DATA_UPDATE, rowBean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,22 +29,17 @@ package com.idcanet.vasc.impl.swing.ui;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ItemEvent;
|
|
||||||
import java.awt.event.ItemListener;
|
|
||||||
|
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.ListCellRenderer;
|
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.VascTable;
|
||||||
import com.idcanet.vasc.core.ui.AbstractVascUIComponent;
|
import com.idcanet.vasc.core.ui.AbstractVascUIComponent;
|
||||||
import com.idcanet.vasc.core.ui.VascList;
|
import com.idcanet.vasc.core.ui.VascList;
|
||||||
import com.idcanet.vasc.core.ui.VascSelectItem;
|
import com.idcanet.vasc.core.ui.VascSelectItem;
|
||||||
import com.idcanet.vasc.core.ui.VascUIComponent;
|
|
||||||
import com.idcanet.vasc.core.ui.VascValueModel;
|
import com.idcanet.vasc.core.ui.VascValueModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ public class SwingTextField extends AbstractVascUIComponent {
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TextListener implements DocumentListener {
|
class TextListener implements DocumentListener {
|
||||||
|
|
Loading…
Reference in a new issue