Package org.criticalfailure.torchlight.core.application.data.model

Examples of org.criticalfailure.torchlight.core.application.data.model.Version


         */
        public String getColumnText(Object element, int columnIndex)
        {
            if(element instanceof Version)
            {
                Version e = (Version)element;
               
                switch(columnIndex)
                {
                    case 0: // name
                        return e.getName();
                       
                    case 1: // default?
                        return "";
                       
                    case 2: // description
                        return e.getDescription();
                }
            }
           
            return null;
        }
View Full Code Here


         */
        public Object getValue(Object element, String property)
        {
            if(element instanceof Version)
            {
                Version e = (Version)element;
               
                if("name".equals(property))
                {
                    return e.getName();
                }
                else if("default".equals(property))
                {
                    return Boolean.valueOf(e.isDefault());
                }
                else if("description".equals(property))
                {
                    return e.getDescription();
                }
            }
           
            return null;
        }
View Full Code Here

         */
        public void modify(Object element, String property, Object value)
        {
            if(element instanceof Version)
            {
                Version e = (Version)element;
               
                if("name".equals(property))
                {
                    e.setName((String)value);
                }
                else if("default".equals(property))
                {
                    e.setDefault(((Boolean)value).booleanValue());
                }
                else if("description".equals(property))
                {
                    e.setDescription((String)value);
                }
            }
        }
View Full Code Here

    @Override
    protected void addButtonClicked(SelectionEvent e)
    {
        logger.debug("add button clicked");
       
        Version ed = new Version();
        ed.setName(localeResources.getLocaleString("edition.chooser.new.default.name"));
        ed.setDescription(localeResources.getLocaleString("edition.chooser.new.default.description"));
        ed.setDefault(false);
       
//        Application.getApplication().getDataManager().addEdition(ed);
       
        // activate the name column for editing
        viewer.editElement(ed, 0);
View Full Code Here

TOP

Related Classes of org.criticalfailure.torchlight.core.application.data.model.Version

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.