Package gri.data

Examples of gri.data.ListDataType


   
    public static class AllTextWidgetFactory implements TypedWidgetFactory {
        public Widget createWidget(DataType type) {
            //list:
            if (type instanceof ListDataType) {
                ListDataType listType = (ListDataType)type;
                if (type.getRepresentationClass().isAssignableFrom(List.class)) {
                    DataType memberType = listType.getMemberType();
                    WidgetFactory memberWidgetFactory = new TypedWidgetFactoryWrapper(this, memberType);
                   
                    Widget widget = new WidgetList(memberWidgetFactory);
                    return widget;
                }
View Full Code Here


    public void writeDataType(DataType type, Element elem) {
        elem.setAttribute("content", type.getContentType());
       
        //append memberType element for list data types:
        if (type instanceof ListDataType) {
            ListDataType listType = (ListDataType)type;
           
            Element memberTypeElem = new Element("memberType");
            writeDataType(listType.getMemberType(), memberTypeElem);
           
            elem.addContent(memberTypeElem);
        }
    }
View Full Code Here

        String contentType = elem.getAttributeValue("content");
       
        if (contentType.equals(ListDataType.LIST_CONTENT)) {
            Element memberTypeElem = elem.getChild("memberType");
            DataType memberType = readDataType(memberTypeElem);
            return new ListDataType(List.class, memberType);
        }
        else    
            return typeMapping.getDefaultTypeForContent(contentType);
       
    }
View Full Code Here

TOP

Related Classes of gri.data.ListDataType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.