Package smilehouse.opensyncro.pipes

Examples of smilehouse.opensyncro.pipes.ConverterListItem


                    String id1 = "type";
                    String label1 = "converter_type";
                    ModelModifier modifier1 = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            //PipeComponentData componentData = (PipeComponentData) model;
                            ConverterListItem componentImpl = (ConverterListItem) model;
                            //if(!componentData.getImplementation().implementationExists()) {

                            // Assume component implementation exists
                            /*if(!componentImpl.implementationExists()) {
                             // If implementation is not there, show error...
                             return "!!! Class not found: "
                             + componentImpl.getClassName() + " !!!";
                             } else {
                             */
                            //PipeComponentIF impl = componentImpl.getInstance();
                            //return impl.getName();
                            return componentImpl.getConverter().getName();
                            //}
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                        // We don't want to change it, we just want to see it
                        }
                    };
                    // Just want to show it...
                    UneditingEditor editor1 = new UneditingEditor();
                    FieldInfo typeFieldInfo = new FieldInfo(id1, label1, modifier1, editor1);
                    converterFieldInfo.addColumn(typeFieldInfo);
                }

                // TODO: Converter component's Edit button should be disabled if the Converter does not
                //       implement GUIConfigurationIF
                {
                    // ---------------
                    // Edit link field
                    // ---------------
                    String id2 = "edit";
                    String label2 = "edit";
                    ModelModifier modifier2 = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            ConverterListItem componentData = (ConverterListItem) model;

                            HashMap m = new HashMap();
                            m.put(COMPONENT_ID, componentData.getConverter().getID());
                            m.put(DATA_ID, componentData.getConverterData().getId().toString());
                            return m;

                        }

                        public void setModelValue(Object model, Object value) throws Exception {
View Full Code Here


                                //dataId = pcdata.getId();
                                break;
                            case PipeComponentIF.TYPE_CONVERTER:
                                pcdata = new PipeComponentData();
                                ConverterListItem cl = pipe.addConverter(
                                    (ConverterIF) newComponent,
                                    pcdata);
                                pers.save(cl);

                                pers.save(pipe);
View Full Code Here

TOP

Related Classes of smilehouse.opensyncro.pipes.ConverterListItem

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.