[svn r229] init add vasc
This commit is contained in:
parent
5684546942
commit
d62b09bd3b
39 changed files with 1804 additions and 0 deletions
326
src/com/idcanet/vasc/core/VascTable.java
Normal file
326
src/com/idcanet/vasc/core/VascTable.java
Normal file
|
|
@ -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<VascTableColumn> tableColumns = null;
|
||||
private List<RowVascAction> rowActions = null;
|
||||
private List<ColumnVascAction> columnActions = null;
|
||||
private List<GlobalVascAction> globalActions = null;
|
||||
private VascDataSource vascDataSource = null;
|
||||
private Query query = null;
|
||||
private List<Object> tableData = null;
|
||||
private Object selectedObject = null;
|
||||
private VascRecordCreator vascRecordCreator = null;
|
||||
private VascViewRenderer vascViewRenderer = null;
|
||||
private VascTextValue vascTextValue = null;
|
||||
private List<VascUserOption> userOptions = null;
|
||||
private String helpId = null;
|
||||
|
||||
public VascTable() {
|
||||
tableColumns = new ArrayList<VascTableColumn>(6);
|
||||
rowActions = new ArrayList<RowVascAction>(6);
|
||||
columnActions = new ArrayList<ColumnVascAction>(6);
|
||||
globalActions = new ArrayList<GlobalVascAction>(6);
|
||||
tableData = new ArrayList<Object>(6);
|
||||
userOptions = new ArrayList<VascUserOption>(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the columnActions
|
||||
*/
|
||||
public List<ColumnVascAction> 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<GlobalVascAction> 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<RowVascAction> 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<VascTableColumn> getTableColumns() {
|
||||
return tableColumns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableColumns the tableColumns to set
|
||||
*/
|
||||
public void addTableColumns(VascTableColumn tableColumn) {
|
||||
tableColumns.add(tableColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the tableData
|
||||
*/
|
||||
public List<Object> getTableData() {
|
||||
return tableData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tableData the tableData to set
|
||||
*/
|
||||
public void setTableData(List<Object> 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<VascUserOption> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue