Search in sources :

Example 6 with PropertyData

use of com.twinsoft.convertigo.eclipse.views.projectexplorer.PropertyData in project convertigo by convertigo.

the class PropertyTableRowTreeObject method add.

public IPropertyTreeObject add(Object object, boolean bChangeName) {
    if (object instanceof PropertyData) {
        PropertyData propertyData = (PropertyData) object;
        Class<? extends TreeParent> c = propertyData.getOwnerClass();
        if (c.equals(getColumnClass())) {
            XMLVector<Object> col = propertyData.getData();
            if (bChangeName)
                col.set(0, getAvailableColumnName((String) col.get(0), 0));
            return addColumn(newColumn(col));
        } else if (c.equals(getClass())) {
            PropertyTableTreeObject table = getParentTable();
            if (table != null)
                return table.add(object, bChangeName);
        }
    } else if (object instanceof PropertyTableRowTreeObject) {
        PropertyTableTreeObject table = getParentTable();
        if (table != null)
            return table.add(object, false);
    } else if (object instanceof PropertyTableColumnTreeObject)
        return addColumn((PropertyTableColumnTreeObject) object);
    return null;
}
Also used : PropertyData(com.twinsoft.convertigo.eclipse.views.projectexplorer.PropertyData)

Aggregations

PropertyData (com.twinsoft.convertigo.eclipse.views.projectexplorer.PropertyData)6 EngineException (com.twinsoft.convertigo.engine.EngineException)3 Element (org.w3c.dom.Element)3 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)2 Node (org.w3c.dom.Node)2 NodeList (org.w3c.dom.NodeList)2