2
0
Fork 0

Upgraded backend api with generics.

This commit is contained in:
Willem Cazander 2014-05-28 14:16:03 +02:00
parent 9a6227be5b
commit 1b3e65fa83
53 changed files with 282 additions and 256 deletions

View file

@ -27,6 +27,7 @@ import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.Serializable;
import javax.swing.BoxLayout;
import javax.swing.JButton;
@ -56,14 +57,14 @@ public class SwingVascEditDialog extends JPanel {
private static final long serialVersionUID = 10L;
private String headerText = null;
private String headerTextValue = null;
private Object result = null;
private Object bean = null;
private Serializable result = null;
private Serializable bean = null;
private VascEntry entry = null;
private SwingVascFrontend swingFrontend = null;
private SwingPanelIntegration panels = null;
private JPanel editView = null;
public SwingVascEditDialog(SwingVascFrontend swingFrontend,JPanel editView,VascEntry entry,Object bean,String beanValue,SwingPanelIntegration panels) throws VascException {
public SwingVascEditDialog(SwingVascFrontend swingFrontend,JPanel editView,VascEntry entry,Serializable bean,String beanValue,SwingPanelIntegration panels) throws VascException {
super();
this.headerText = "vasc.dialog.edit.message";
this.headerTextValue = beanValue;

View file

@ -33,6 +33,7 @@ import java.awt.event.MouseEvent;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
@ -156,7 +157,7 @@ public class SwingVascFrontend extends AbstractVascFrontend {
public void renderEdit() throws VascFrontendException {
logger.fine("Rending Edit View");
try {
Object rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
Serializable rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
String beanValue = rowBean.toString();
if (entry.getDisplayNameFieldId()!=null) {
VascEntryField v = entry.getVascEntryFieldById(entry.getDisplayNameFieldId());
@ -503,7 +504,7 @@ public class SwingVascFrontend extends AbstractVascFrontend {
if (rowIndex!=-1) {
// temp; gets index by sorter
//rowIndex = tableSorter.modelIndex(rowIndex);
Object data = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex);
Serializable data = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex);
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(data);
} else {
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);