diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..727be5a
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..6f15e5d
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ com.idcanet.vasc
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/build/vasc-bin-jar.xml b/build/vasc-bin-jar.xml
new file mode 100644
index 0000000..aafe4d8
--- /dev/null
+++ b/build/vasc-bin-jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/vasc-javadocs.xml b/build/vasc-javadocs.xml
new file mode 100644
index 0000000..d58367d
--- /dev/null
+++ b/build/vasc-javadocs.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/vasc-src-jar.xml b/build/vasc-src-jar.xml
new file mode 100644
index 0000000..eb65622
--- /dev/null
+++ b/build/vasc-src-jar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/README.txt b/doc/README.txt
new file mode 100644
index 0000000..9b0610e
--- /dev/null
+++ b/doc/README.txt
@@ -0,0 +1,4 @@
+
+---- Object tree:
+
+
diff --git a/lib/hibernate3.jar b/lib/hibernate3.jar
new file mode 100644
index 0000000..cb9449c
Binary files /dev/null and b/lib/hibernate3.jar differ
diff --git a/lib/idcanet-serv5-bin.jar b/lib/idcanet-serv5-bin.jar
new file mode 100644
index 0000000..2098c9c
Binary files /dev/null and b/lib/idcanet-serv5-bin.jar differ
diff --git a/lib/idcanet-x4o-bin.jar b/lib/idcanet-x4o-bin.jar
new file mode 100644
index 0000000..2ec1c38
Binary files /dev/null and b/lib/idcanet-x4o-bin.jar differ
diff --git a/lib/idcanet-xtes-bin.jar b/lib/idcanet-xtes-bin.jar
new file mode 100644
index 0000000..24664ae
Binary files /dev/null and b/lib/idcanet-xtes-bin.jar differ
diff --git a/lib/jgoodies-binding.jar b/lib/jgoodies-binding.jar
new file mode 100644
index 0000000..5b312e9
Binary files /dev/null and b/lib/jgoodies-binding.jar differ
diff --git a/lib/juel-2.1.0-rc1-impl.jar b/lib/juel-2.1.0-rc1-impl.jar
new file mode 100644
index 0000000..40b1a25
Binary files /dev/null and b/lib/juel-2.1.0-rc1-impl.jar differ
diff --git a/lib/juel-2.1.0-rc1.jar b/lib/juel-2.1.0-rc1.jar
new file mode 100644
index 0000000..805f86e
Binary files /dev/null and b/lib/juel-2.1.0-rc1.jar differ
diff --git a/lib/junit-4.1.jar b/lib/junit-4.1.jar
new file mode 100644
index 0000000..2c46d67
Binary files /dev/null and b/lib/junit-4.1.jar differ
diff --git a/lib/org.eclipse.jface_3.2.1.jar b/lib/org.eclipse.jface_3.2.1.jar
new file mode 100644
index 0000000..f5da69b
Binary files /dev/null and b/lib/org.eclipse.jface_3.2.1.jar differ
diff --git a/lib/swtbinding-20051212111010.jar b/lib/swtbinding-20051212111010.jar
new file mode 100644
index 0000000..c19959c
Binary files /dev/null and b/lib/swtbinding-20051212111010.jar differ
diff --git a/src/com/idcanet/vasc/core/VascDataSource.java b/src/com/idcanet/vasc/core/VascDataSource.java
new file mode 100644
index 0000000..148369d
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascDataSource.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+import java.util.List;
+
+import com.idcanet.xtes.xpql.query.Query;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascDataSource {
+
+ public List executeQuery(Query query) throws Exception;
+
+ public void persist(Object object) throws Exception;
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascRecordCreator.java b/src/com/idcanet/vasc/core/VascRecordCreator.java
new file mode 100644
index 0000000..62c2f44
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascRecordCreator.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascRecordCreator {
+
+ public Object newRecord(VascTable table) throws Exception;
+
+ public Class getObjectClass();
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascTable.java b/src/com/idcanet/vasc/core/VascTable.java
new file mode 100644
index 0000000..0bb8fbe
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascTable.java
@@ -0,0 +1,326 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+import com.idcanet.vasc.core.actions.ColumnVascAction;
+import com.idcanet.vasc.core.actions.GlobalVascAction;
+import com.idcanet.vasc.core.actions.RowVascAction;
+import com.idcanet.vasc.core.column.VascTableColumn;
+import com.idcanet.xtes.xpql.query.Query;
+
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class VascTable {
+
+ private String name = null;
+ private String headerName = null;
+ private String description = null;
+ private String toolTip = null;
+ private List tableColumns = null;
+ private List rowActions = null;
+ private List columnActions = null;
+ private List globalActions = null;
+ private VascDataSource vascDataSource = null;
+ private Query query = null;
+ private List tableData = null;
+ private Object selectedObject = null;
+ private VascRecordCreator vascRecordCreator = null;
+ private VascViewRenderer vascViewRenderer = null;
+ private VascTextValue vascTextValue = null;
+ private List userOptions = null;
+ private String helpId = null;
+
+ public VascTable() {
+ tableColumns = new ArrayList(6);
+ rowActions = new ArrayList(6);
+ columnActions = new ArrayList(6);
+ globalActions = new ArrayList(6);
+ tableData = new ArrayList(6);
+ userOptions = new ArrayList(6);
+ }
+
+ /**
+ * @return the columnActions
+ */
+ public List getColumnActions() {
+ return columnActions;
+ }
+
+ /**
+ * @param columnActions the columnActions to set
+ */
+ public void addColumnActions(ColumnVascAction columnAction) {
+ columnActions.add(columnAction);
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the globalActions
+ */
+ public List getGlobalActions() {
+ return globalActions;
+ }
+
+ /**
+ * @param globalActions the globalActions to set
+ */
+ public void addGlobalActions(GlobalVascAction globalAction) {
+ globalActions.add(globalAction);
+ }
+
+ /**
+ * @return the headerName
+ */
+ public String getHeaderName() {
+ return headerName;
+ }
+
+ /**
+ * @param headerName the headerName to set
+ */
+ public void setHeaderName(String headerName) {
+ this.headerName = headerName;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the query
+ */
+ public Query getQuery() {
+ return query;
+ }
+
+ /**
+ * @param query the query to set
+ */
+ public void setQuery(Query query) {
+ this.query = query;
+ }
+
+ /**
+ * @return the rowActions
+ */
+ public List getRowActions() {
+ return rowActions;
+ }
+
+ /**
+ * @param rowActions the rowActions to set
+ */
+ public void addRowActions(RowVascAction rowAction) {
+ rowActions.add(rowAction);
+ }
+
+ /**
+ * @return the selectedObject
+ */
+ public Object getSelectedObject() {
+ return selectedObject;
+ }
+
+ /**
+ * @param selectedObject the selectedObject to set
+ */
+ public void setSelectedObject(Object selectedObject) {
+ this.selectedObject = selectedObject;
+ }
+
+ /**
+ * @return the tableColumns
+ */
+ public List getTableColumns() {
+ return tableColumns;
+ }
+
+ /**
+ * @param tableColumns the tableColumns to set
+ */
+ public void addTableColumns(VascTableColumn tableColumn) {
+ tableColumns.add(tableColumn);
+ }
+
+ /**
+ * @return the tableData
+ */
+ public List getTableData() {
+ return tableData;
+ }
+
+ /**
+ * @param tableData the tableData to set
+ */
+ public void setTableData(List tableData) {
+ this.tableData = tableData;
+ }
+
+ /**
+ * @return the toolTip
+ */
+ public String getToolTip() {
+ return toolTip;
+ }
+
+ /**
+ * @param toolTip the toolTip to set
+ */
+ public void setToolTip(String toolTip) {
+ this.toolTip = toolTip;
+ }
+
+ /**
+ * @return the userOptions
+ */
+ public List getUserOptions() {
+ return userOptions;
+ }
+
+ /**
+ * @param userOptions the userOptions to set
+ */
+ public void addUserOptions(VascUserOption userOption) {
+ userOptions.add(userOption);
+ }
+
+ /**
+ * @return the vascDataSource
+ */
+ public VascDataSource getVascDataSource() {
+ return vascDataSource;
+ }
+
+ /**
+ * @param vascDataSource the vascDataSource to set
+ */
+ public void setVascDataSource(VascDataSource vascDataSource) {
+ this.vascDataSource = vascDataSource;
+ }
+
+ /**
+ * @return the vascRecordCreator
+ */
+ public VascRecordCreator getVascRecordCreator() {
+ return vascRecordCreator;
+ }
+
+ /**
+ * @param vascRecordCreator the vascRecordCreator to set
+ */
+ public void setVascRecordCreator(VascRecordCreator vascRecordCreator) {
+ this.vascRecordCreator = vascRecordCreator;
+ }
+
+ /**
+ * @return the vascTextValue
+ */
+ public VascTextValue getVascTextValue() {
+ return vascTextValue;
+ }
+
+ /**
+ * @param vascTextValue the vascTextValue to set
+ */
+ public void setVascTextValue(VascTextValue vascTextValue) {
+ this.vascTextValue = vascTextValue;
+ }
+
+ /**
+ * @return the vascViewRenderer
+ */
+ public VascViewRenderer getVascViewRenderer() {
+ return vascViewRenderer;
+ }
+
+ /**
+ * @param vascViewRenderer the vascViewRenderer to set
+ */
+ public void setVascViewRenderer(VascViewRenderer vascViewRenderer) {
+ this.vascViewRenderer = vascViewRenderer;
+ }
+
+ /**
+ * @return the helpId
+ */
+ public String getHelpId() {
+ return helpId;
+ }
+
+ /**
+ * @param helpId the helpId to set
+ */
+ public void setHelpId(String helpId) {
+ this.helpId = helpId;
+ }
+
+ static public Integer getTotalColumnSize(VascTable table) {
+ int result = 0;
+ for(VascTableColumn c:table.getTableColumns()) {
+ if(c.getWidth()==null) {
+ Logger.getLogger(VascTable.class.getName()).finer("Column no size: "+c.getName());
+ return null;
+ }
+ result=+c.getWidth();
+ }
+ return result;
+ }
+
+}
+
diff --git a/src/com/idcanet/vasc/core/VascTextValue.java b/src/com/idcanet/vasc/core/VascTextValue.java
new file mode 100644
index 0000000..6b8c3b9
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascTextValue.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascTextValue {
+
+ public String getTextValue(String text);
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascUserOption.java b/src/com/idcanet/vasc/core/VascUserOption.java
new file mode 100644
index 0000000..7be7fdd
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascUserOption.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascUserOption {
+
+ public Object createUserOptionRenderer(VascTable table);
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascViewRenderer.java b/src/com/idcanet/vasc/core/VascViewRenderer.java
new file mode 100644
index 0000000..879be6a
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascViewRenderer.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascViewRenderer {
+
+ public void renderView(VascTable table);
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/actions/ColumnVascAction.java b/src/com/idcanet/vasc/core/actions/ColumnVascAction.java
new file mode 100644
index 0000000..3429d6a
--- /dev/null
+++ b/src/com/idcanet/vasc/core/actions/ColumnVascAction.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.actions;
+
+import com.idcanet.vasc.core.VascTable;
+import com.idcanet.vasc.core.column.VascTableColumn;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface ColumnVascAction extends VascAction {
+
+ public void doColumnAction(VascTable table,VascTableColumn column);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/actions/GlobalVascAction.java b/src/com/idcanet/vasc/core/actions/GlobalVascAction.java
new file mode 100644
index 0000000..8c57c0e
--- /dev/null
+++ b/src/com/idcanet/vasc/core/actions/GlobalVascAction.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.actions;
+
+import com.idcanet.vasc.core.VascTable;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface GlobalVascAction extends VascAction {
+
+ public void doGlobalAction(VascTable table);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/actions/RowVascAction.java b/src/com/idcanet/vasc/core/actions/RowVascAction.java
new file mode 100644
index 0000000..6d15f82
--- /dev/null
+++ b/src/com/idcanet/vasc/core/actions/RowVascAction.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.actions;
+
+import com.idcanet.vasc.core.VascTable;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface RowVascAction extends VascAction {
+
+ public void doRowAction(VascTable table,Object rowObject);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/actions/VascAction.java b/src/com/idcanet/vasc/core/actions/VascAction.java
new file mode 100644
index 0000000..d8fab98
--- /dev/null
+++ b/src/com/idcanet/vasc/core/actions/VascAction.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.actions;
+
+import com.idcanet.vasc.core.VascTable;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascAction {
+
+ public String getName();
+ public String getToolTip();
+
+ public Object createActionObject(VascTable table);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/column/VascColumnEditor.java b/src/com/idcanet/vasc/core/column/VascColumnEditor.java
new file mode 100644
index 0000000..166561c
--- /dev/null
+++ b/src/com/idcanet/vasc/core/column/VascColumnEditor.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.column;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascColumnEditor {
+
+ public Object createColumnEditor(VascTableColumn column);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/column/VascColumnRenderer.java b/src/com/idcanet/vasc/core/column/VascColumnRenderer.java
new file mode 100644
index 0000000..69bdce2
--- /dev/null
+++ b/src/com/idcanet/vasc/core/column/VascColumnRenderer.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.column;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascColumnRenderer {
+
+ public Object createColumnRender(VascTableColumn column);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/column/VascColumnValue.java b/src/com/idcanet/vasc/core/column/VascColumnValue.java
new file mode 100644
index 0000000..9588b60
--- /dev/null
+++ b/src/com/idcanet/vasc/core/column/VascColumnValue.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.column;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public interface VascColumnValue {
+
+ public Object getValue(VascTableColumn column);
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/column/VascTableColumn.java b/src/com/idcanet/vasc/core/column/VascTableColumn.java
new file mode 100644
index 0000000..a2c7ca8
--- /dev/null
+++ b/src/com/idcanet/vasc/core/column/VascTableColumn.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core.column;
+
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class VascTableColumn {
+
+ private String name = null;
+ private String toolTip = null;
+ private Object defaultValue = null;
+ private Integer width = null;
+ private String helpId = null;
+
+ private VascColumnValue vascColumnValue = null;
+ private VascColumnRenderer vascColumnRenderer = null;
+ private VascColumnEditor vascColumnEditor = null;
+
+ private Object columnRenderer = null;
+ private Object columnEditor = null;
+
+ /**
+ * @return the defaultValue
+ */
+ public Object getDefaultValue() {
+ return defaultValue;
+ }
+ /**
+ * @param defaultValue the defaultValue to set
+ */
+ public void setDefaultValue(Object defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return the toolTip
+ */
+ public String getToolTip() {
+ return toolTip;
+ }
+ /**
+ * @param toolTip the toolTip to set
+ */
+ public void setToolTip(String toolTip) {
+ this.toolTip = toolTip;
+ }
+ /**
+ * @return the vascColumnEditor
+ */
+ public VascColumnEditor getVascColumnEditor() {
+ return vascColumnEditor;
+ }
+ /**
+ * @param vascColumnEditor the vascColumnEditor to set
+ */
+ public void setVascColumnEditor(VascColumnEditor vascColumnEditor) {
+ this.vascColumnEditor = vascColumnEditor;
+ }
+ /**
+ * @return the vascColumnRenderer
+ */
+ public VascColumnRenderer getVascColumnRenderer() {
+ return vascColumnRenderer;
+ }
+ /**
+ * @param vascColumnRenderer the vascColumnRenderer to set
+ */
+ public void setVascColumnRenderer(VascColumnRenderer vascColumnRenderer) {
+ this.vascColumnRenderer = vascColumnRenderer;
+ }
+ /**
+ * @return the vascColumnValue
+ */
+ public VascColumnValue getVascColumnValue() {
+ return vascColumnValue;
+ }
+ /**
+ * @param vascColumnValue the vascColumnValue to set
+ */
+ public void setVascColumnValue(VascColumnValue vascColumnValue) {
+ this.vascColumnValue = vascColumnValue;
+ }
+ /**
+ * @return the width
+ */
+ public Integer getWidth() {
+ return width;
+ }
+ /**
+ * @param width the width to set
+ */
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ /**
+ * @return the columnEditor
+ */
+ public Object getColumnEditor() {
+ return columnEditor;
+ }
+
+ /**
+ * @param columnEditor the columnEditor to set
+ */
+ public void setColumnEditor(Object columnEditor) {
+ this.columnEditor = columnEditor;
+ }
+
+ /**
+ * @return the columnRenderer
+ */
+ public Object getColumnRenderer() {
+ return columnRenderer;
+ }
+
+ /**
+ * @param columnRenderer the columnRenderer to set
+ */
+ public void setColumnRenderer(Object columnRenderer) {
+ this.columnRenderer = columnRenderer;
+ }
+
+ /**
+ * @return the helpId
+ */
+ public String getHelpId() {
+ return helpId;
+ }
+ /**
+ * @param helpId the helpId to set
+ */
+ public void setHelpId(String helpId) {
+ this.helpId = helpId;
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/BeanVascRecordCreator.java b/src/com/idcanet/vasc/impl/BeanVascRecordCreator.java
new file mode 100644
index 0000000..dafcd8b
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/BeanVascRecordCreator.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl;
+
+import com.idcanet.vasc.core.VascRecordCreator;
+import com.idcanet.vasc.core.VascTable;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class BeanVascRecordCreator implements VascRecordCreator {
+
+ private Class objectClass = null;
+
+
+ public BeanVascRecordCreator() {
+
+ }
+ public BeanVascRecordCreator(Class objectClass) {
+ setObjectClass(objectClass);
+ }
+
+ public Object newRecord(VascTable table) throws Exception {
+ return objectClass.newInstance();
+ }
+
+ public Class getObjectClass() {
+ return objectClass;
+ }
+ public void setObjectClass(Class objectClass) {
+ this.objectClass=objectClass;
+ }
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/DefaultVascTextValue.java b/src/com/idcanet/vasc/impl/DefaultVascTextValue.java
new file mode 100644
index 0000000..7920d11
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/DefaultVascTextValue.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl;
+
+import com.idcanet.vasc.core.VascTextValue;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class DefaultVascTextValue implements VascTextValue {
+
+ public String getTextValue(String text) {
+ return text;
+ }
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/column/BeanPropertyVascColumnValue.java b/src/com/idcanet/vasc/impl/column/BeanPropertyVascColumnValue.java
new file mode 100644
index 0000000..74c5cce
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/column/BeanPropertyVascColumnValue.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl.column;
+
+import com.idcanet.vasc.core.column.VascColumnValue;
+import com.idcanet.vasc.core.column.VascTableColumn;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class BeanPropertyVascColumnValue implements VascColumnValue {
+
+ private String property = null;
+
+ public BeanPropertyVascColumnValue() {
+
+ }
+ public BeanPropertyVascColumnValue(String property) {
+ setProperty(property);
+ }
+
+ public Object getValue(VascTableColumn column) {
+ if(getProperty()==null) {
+ return null;
+ }
+ if(getProperty().equals("")) {
+ return "";
+ }
+ return getProperty();
+ }
+
+ /**
+ * @return the property
+ */
+ public String getProperty() {
+ return property;
+ }
+
+ /**
+ * @param property the property to set
+ */
+ public void setProperty(String property) {
+ this.property = property;
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/column/NullVascColumnValue.java b/src/com/idcanet/vasc/impl/column/NullVascColumnValue.java
new file mode 100644
index 0000000..530714a
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/column/NullVascColumnValue.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl.column;
+
+import com.idcanet.vasc.core.column.VascColumnValue;
+import com.idcanet.vasc.core.column.VascTableColumn;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class NullVascColumnValue implements VascColumnValue {
+
+ public Object getValue(VascTableColumn column) {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/serv5/Serv5HibernateVascDataSource.java b/src/com/idcanet/vasc/impl/serv5/Serv5HibernateVascDataSource.java
new file mode 100644
index 0000000..3595336
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/serv5/Serv5HibernateVascDataSource.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl.serv5;
+
+import java.util.List;
+import java.util.logging.Level;
+
+import com.idcanet.serv5.services.hibernate3.Hibernate3Factory;
+import com.idcanet.vasc.core.VascDataSource;
+import com.idcanet.xtes.xpql.query.Query;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class Serv5HibernateVascDataSource implements VascDataSource {
+
+ private String session = null;
+
+ public Serv5HibernateVascDataSource() {
+
+ }
+ public Serv5HibernateVascDataSource(String session) {
+ setSession(session);
+ }
+
+ public List executeQuery(Query query) throws Exception {
+ try {
+ /*
+ Query q = Hibernate3Factory.getSession("flowstats").createQuery(query.toString());
+ q.setMaxResults(crudTable.getQueryLimit());
+ if(crudTable.getViewOnly()) {
+ q.setReadOnly(true);
+ }
+ for(CrudParameterOption para:crudTable.getQueryParameterOptions().values()) {
+ if(para.getValueHolder().getValue()==null) {
+ logger.finer("Value is null of parameter: "+para.getName());
+ return;
+ }
+ try {
+ Object value = para.getValueHolder().getValue();
+ logger.finer("Setting parameter: "+para.getName()+" with: "+value);
+ if(para.getValueProperty()!=null) {
+ q.setParameter(para.getName(),BeanUtils.getValue(value,BeanUtils.getPropertyDescriptor(value,para.getValueProperty())));
+ } else {
+ q.setParameter(para.getName(),value);
+ }
+ } catch (Exception e) {
+ logger.log(Level.WARNING,e.getMessage(),e);
+ }
+ }
+
+ List data = q.list();
+ logger.info("Query returned: "+data.size()+" of: "+crudTable.getQueryName());
+ crudTable.getSelectionInList().setList(data);
+ */
+ return null;
+ } finally {
+ Hibernate3Factory.getSession("flowstats").close(); // close session in threads
+ }
+ }
+
+ public void persist(Object object) throws Exception {
+ try {
+ Hibernate3Factory.getSession(getSession()).persist(object);
+ } finally {
+ Hibernate3Factory.getSession(getSession()).close();
+ }
+ }
+ /**
+ * @return the session
+ */
+ public String getSession() {
+ return session;
+ }
+ /**
+ * @param session the session to set
+ */
+ public void setSession(String session) {
+ this.session = session;
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java b/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java
new file mode 100644
index 0000000..9ac62b3
--- /dev/null
+++ b/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.impl.swt;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+import com.idcanet.vasc.core.VascTable;
+import com.idcanet.vasc.core.VascUserOption;
+import com.idcanet.vasc.core.VascViewRenderer;
+import com.idcanet.vasc.core.actions.RowVascAction;
+import com.idcanet.vasc.core.column.VascTableColumn;
+
+import fr.jayasoft.binding.jface.adapter.JFaceComponentFactory;
+import fr.jayasoft.binding.jface.utils.table.AbstractColumn;
+import fr.jayasoft.binding.jface.utils.table.PropertyColumn;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Mar 21, 2007
+ */
+public class SwtVascViewRenderer implements VascViewRenderer {
+
+ private Logger logger = null;
+ private Composite parent = null;
+ private VascTable table = null;
+
+ public SwtVascViewRenderer(Composite parent) {
+ logger = Logger.getLogger(SwtVascViewRenderer.class.getName());
+ this.parent=parent;
+ }
+
+ public void renderView(VascTable table) {
+ this.table=table;
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ parent.setLayout(layout);
+
+ Composite header = new Composite(parent, SWT.NONE);
+ GridLayout headerLayout = new GridLayout();
+ headerLayout.numColumns = 6;
+ header.setLayout(headerLayout);
+ header.setLayoutData(new GridData(SWT.NONE));
+
+ Composite body = new Composite(parent, SWT.NONE);
+ GridLayout bodyLayout = new GridLayout();
+ bodyLayout.numColumns = 1;
+ body.setLayout(bodyLayout);
+ body.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite footer = new Composite(parent, SWT.NONE);
+ GridLayout footerLayout = new GridLayout();
+ footerLayout.numColumns = 6;
+ footer.setLayout(footerLayout);
+ footer.setLayoutData(new GridData(SWT.NONE));
+
+ createHeader(header);
+ createBody(body);
+ createFooter(footer);
+
+ // should be last
+ partCreated();
+ }
+
+
+
+ public void createHeader(Composite header) {
+ logger.finest("Creating header");
+
+ header.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ Color c = new Color(header.getDisplay(),255,255,255);
+ header.setBackground(c);
+
+ if(table.getHeaderName()!=null) {
+ Font headerFont = new Font(header.getDisplay(), "verdana", 16, SWT.BOLD);
+ Label l = new Label(header, SWT.CENTER);
+ l.setFont(headerFont);
+ l.setText(table.getVascTextValue().getTextValue(table.getHeaderName()));
+ l.setBackground(c);
+ }
+
+ // create options
+ for(VascUserOption option:table.getUserOptions()) {
+
+ /*
+ if(option.getLabelText()!=null) {
+ Label l = new Label(header,SWT.WRAP);
+ l.setText(crudTable.i18n(cpo.getLabelText()));
+ l.setBackground(c);
+ }
+
+ // create ValueHolder
+ cpo.setValueHolder(new ValueHolder(null));
+ // create control
+ cpo.setTempObjectPropertyControl(cpo.getPropertyEditor().createPropertyEditor(header,cpo.getValueHolder()));
+
+ cpo.getValueHolder().addPropertyChangeListener(this);
+ */
+ }
+ }
+ public void createBody(Composite body) {
+ logger.finer("Creating body");
+
+ final TableViewer tableViewer = JFaceComponentFactory.createTableViewer(body,table.getSelectionInList(),getTableColumns(crudTable),false);
+ final Table table2 = tableViewer.getTable();
+ table2.setLayoutData(new GridData(GridData.FILL_BOTH));
+ table2.setHeaderVisible(true);
+ table2.setLinesVisible(true);
+
+ //Add sort indicator and sort data when column selected
+ Listener sortListener = new Listener() {
+ public void handleEvent(Event e) {
+ // determine new sort column and direction
+ TableColumn sortColumn = table2.getSortColumn();
+ TableColumn currentColumn = (TableColumn) e.widget;
+ int dir = table2.getSortDirection();
+ if (sortColumn == currentColumn) {
+ dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
+ } else {
+ table2.setSortColumn(currentColumn);
+ dir = SWT.UP;
+ }
+ // sort the data based on column and direction
+ String prop = (String)currentColumn.getData("PROP");
+
+ List l = new ArrayList(10);
+ /*
+ for(int i=0;i
+
+
+
+ LIMIT
+
+
+
+
+
+ OFFSET
+
+
+
+
+
+
+
+
+
+ SELECT
+ USERS.USERNAME AS USERNAME
+ USERS.PASSWD AS PASSWORD
+ FROM
+ USERS
+
+ Bla bla
+ Also see this site http://www.google.com
+
+
+
+
+
+
+
+
+ AND role is in
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/com/idcanet/vasc/tests/SimpleTest.java b/tests/com/idcanet/vasc/tests/SimpleTest.java
new file mode 100644
index 0000000..e26a7f5
--- /dev/null
+++ b/tests/com/idcanet/vasc/tests/SimpleTest.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2004-2006 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.tests;
+
+import java.io.InputStream;
+import java.util.logging.LogManager;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import com.idcanet.vasc.core.VascTable;
+import com.idcanet.vasc.core.column.VascTableColumn;
+import com.idcanet.vasc.impl.BeanVascRecordCreator;
+import com.idcanet.vasc.impl.DefaultVascTextValue;
+import com.idcanet.vasc.impl.column.BeanPropertyVascColumnValue;
+import com.idcanet.vasc.impl.serv5.Serv5HibernateVascDataSource;
+import com.idcanet.vasc.impl.swt.SwtVascViewRenderer;
+import com.idcanet.xtes.core.TemplateStore;
+import com.idcanet.xtes.core.XTESParser;
+import com.idcanet.xtes.xpql.query.Query;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests a simple x4o xml language.
+ *
+ * @author Willem Cazander
+ * @version 1.0 Jul 24, 2006
+ */
+public class SimpleTest extends TestCase {
+
+ public void setUp() throws Exception {
+ // enable all logs
+ InputStream loggingProperties = this.getClass().getResourceAsStream("/META-INF/logging.properties");
+ LogManager.getLogManager().readConfiguration( loggingProperties );
+ loggingProperties.close();
+
+ // load xtes queries
+ }
+
+ public void tearDown() throws Exception {
+ }
+
+ public void testAll() throws Exception {
+
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setText("Hello, world!");
+
+ XTESParser parser = new XTESParser();
+ parser.parseResource("/META-INF/xtes/tests.xml");
+ TemplateStore store = XTESParser.getTemplateStore(parser.getElementContext());
+ Query query = store.getQuery("testUsers2");
+
+ VascTable table = new VascTable();
+ table.setName("Testje");
+ table.setHeaderName("TableHeader");
+ table.setToolTip("tooltip text");
+ table.setDescription("en de omscheiving");
+ table.setHelpId("someKey");
+ table.setVascDataSource(new Serv5HibernateVascDataSource("flowstats"));
+ table.setVascTextValue(new DefaultVascTextValue());
+ table.setVascViewRenderer(new SwtVascViewRenderer(shell));
+ table.setQuery(query);
+ table.setVascRecordCreator(new BeanVascRecordCreator());
+
+ VascTableColumn column = new VascTableColumn();
+ column.setName("test");
+ column.setToolTip("tooltip");
+ column.setDefaultValue("DEFFFFFF");
+ column.setHelpId("helpColumnKey");
+ column.setWidth(200);
+ //column.setVascColumnEditor(vascColumnEditor);
+ //column.setVascColumnRenderer(vascColumnRenderer);
+ column.setVascColumnValue(new BeanPropertyVascColumnValue("someValue"));
+ table.addTableColumns(column);
+
+
+ table.getV
+
+ shell.open();
+ // Set up the event loop.
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ // If no more entries in event queue
+ display.sleep();
+ }
+ }
+ display.dispose();
+ }
+}
\ No newline at end of file