Moved all data objects to Serializable and some generics bits.
This commit is contained in:
parent
1b3e65fa83
commit
3bf185ad48
73 changed files with 228 additions and 181 deletions
|
|
@ -25,6 +25,7 @@ package net.forwardfire.vasc.frontend.swing;
|
|||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.JComboBox;
|
||||
|
|
@ -158,7 +159,7 @@ public class SwingActionPanel extends JPanel implements VascEntryFrontendEventLi
|
|||
return result;
|
||||
}
|
||||
|
||||
public void vascEvent(VascEntry entry,Object dataNotUsed) {
|
||||
public void vascEvent(VascEntry entry,Serializable dataNotUsed) {
|
||||
|
||||
init = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ package net.forwardfire.vasc.frontend.swing;
|
|||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.JButton;
|
||||
|
|
@ -81,7 +82,7 @@ public class SwingPagerPanel extends JPanel implements VascEntryFrontendEventLis
|
|||
}
|
||||
}
|
||||
|
||||
public void vascEvent(VascEntry entry, Object data) {
|
||||
public void vascEvent(VascEntry entry, Serializable data) {
|
||||
|
||||
for(Component c:result.getComponents()) {
|
||||
if (c instanceof JButton) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ package net.forwardfire.vasc.frontend.swing;
|
|||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ public class SwingPanelFrame implements SwingPanelIntegration {
|
|||
|
||||
entry.getVascFrontendController().addVascEntryFrontendEventListener(new VascEntryFrontendEventListener() {
|
||||
private static final long serialVersionUID = -6801954395965101748L;
|
||||
public void vascEvent(VascEntry entry, Object data) {
|
||||
public void vascEvent(VascEntry entry, Serializable data) {
|
||||
if (data instanceof Exception) {
|
||||
Exception e = (Exception)data;
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
|
||||
|
|
@ -56,7 +58,7 @@ public class SwingPanelTabbed implements SwingPanelIntegration {
|
|||
|
||||
entry.getVascFrontendController().addVascEntryFrontendEventListener(new VascEntryFrontendEventListener() {
|
||||
private static final long serialVersionUID = -6801954395965101748L;
|
||||
public void vascEvent(VascEntry entry, Object data) {
|
||||
public void vascEvent(VascEntry entry, Serializable data) {
|
||||
if (data instanceof Exception) {
|
||||
Exception e = (Exception)data;
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class SwingVascEditDialog extends JPanel {
|
|||
|
||||
// Set parameters
|
||||
try {
|
||||
Object selected = bean;
|
||||
Serializable selected = bean;
|
||||
for (String parameterName:vle.getEntryParameterFieldIdKeys()) {
|
||||
String fieldId = vle.getEntryParameterFieldId(parameterName);
|
||||
VascEntryField v = entry.getVascEntryFieldById(fieldId);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public class SwingVascFrontend extends AbstractVascFrontend {
|
|||
}
|
||||
|
||||
public void renderDelete() throws VascFrontendException {
|
||||
Object rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
Serializable rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
String beanValue = rowBean.toString();
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ public class SwingVascTableModel extends AbstractTableModel implements VascEntry
|
|||
entry.getVascFrontendController().addVascEntryFrontendEventListener(this);
|
||||
}
|
||||
|
||||
public void vascEvent(VascEntry entry,Object o) {
|
||||
public void vascEvent(VascEntry entry,Serializable o) {
|
||||
fireTableDataChanged();
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ public class SwingVascTableModel extends AbstractTableModel implements VascEntry
|
|||
* @see javax.swing.entry.entryModel#getValueAt(int, int)
|
||||
*/
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
Object bean = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex);
|
||||
Serializable bean = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex);
|
||||
|
||||
// TODO: this is slowing....
|
||||
List<VascEntryField> list = new ArrayList<VascEntryField>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue